This commit is contained in:
Kovid Goyal 2008-05-18 19:23:03 -07:00
parent bed44736dd
commit 1766639e38
2 changed files with 6 additions and 0 deletions

View File

@ -179,6 +179,7 @@ _check_symlinks_prescript()
subprocess.check_call(['make']) subprocess.check_call(['make'])
files.append((os.path.abspath('pictureflow.so'), 'pictureflow.so')) files.append((os.path.abspath('pictureflow.so'), 'pictureflow.so'))
subprocess.check_call(['install_name_tool', '-change', 'libpictureflow.0.dylib', '@executable_path/../Frameworks/libpictureflow.dylib', 'pictureflow.so']) subprocess.check_call(['install_name_tool', '-change', 'libpictureflow.0.dylib', '@executable_path/../Frameworks/libpictureflow.dylib', 'pictureflow.so'])
subprocess.check_call(['install_name_tool', '-change', '/System/Library/Frameworks/Python.framework/Versions/2.5/Python', '@executable_path/../Frameworks/Python.framework/Versions/2.5/Python', 'pictureflow.so'])
for i in range(2): for i in range(2):
deps = BuildAPP.qt_dependencies(files[i][0]) deps = BuildAPP.qt_dependencies(files[i][0])
BuildAPP.fix_qt_dependencies(files[i][0], deps) BuildAPP.fix_qt_dependencies(files[i][0], deps)

View File

@ -1426,6 +1426,11 @@ class HTMLConverter(object, LoggingInterface):
path = munge_paths(self.target_prefix, tag['href'])[0] path = munge_paths(self.target_prefix, tag['href'])[0]
ext = os.path.splitext(path)[1] ext = os.path.splitext(path)[1]
if ext: ext = ext[1:].lower() if ext: ext = ext[1:].lower()
enc = sys.getfilesystemencoding()
if not enc:
enc = 'utf8'
if isinstance(path, unicode):
path = path.encode(enc, 'replace')
if os.access(path, os.R_OK) and os.path.isfile(path): if os.access(path, os.R_OK) and os.path.isfile(path):
if ext in ['png', 'jpg', 'bmp', 'jpeg']: if ext in ['png', 'jpg', 'bmp', 'jpeg']:
self.process_image(path, tag_css) self.process_image(path, tag_css)