From 911521d8e04985653b4c0c229a3570e2e65223a4 Mon Sep 17 00:00:00 2001 From: hsoft Date: Sat, 24 Oct 2009 16:30:37 +0000 Subject: [PATCH] dgpe qt: build related fixes. --HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40217 --- pe/qt/app.py | 2 +- pe/qt/dgpe.spec | 2 +- pe/qt/gen.py | 1 + pe/qt/start.py | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pe/qt/app.py b/pe/qt/app.py index a73914d7..88eb35e4 100644 --- a/pe/qt/app.py +++ b/pe/qt/app.py @@ -31,7 +31,7 @@ class File(fs.File): INITIAL_INFO.update({ 'dimensions': (0,0), }) - HANDLED_EXTS = set(['png', 'jpg', 'jpeg', 'gif', 'bmp', 'tiff']) + HANDLED_EXTS = set(['png', 'jpg', 'jpeg', 'gif', 'bmp', 'tiff', 'tif']) @classmethod def can_handle(cls, path): diff --git a/pe/qt/dgpe.spec b/pe/qt/dgpe.spec index 06e92f4e..673d9039 100644 --- a/pe/qt/dgpe.spec +++ b/pe/qt/dgpe.spec @@ -1,6 +1,6 @@ # -*- mode: python -*- a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), 'start.py'], - pathex=['C:\\src\\dupeguru\\pe\\qt']) + pathex=[]) pyz = PYZ(a.pure) exe = EXE(pyz, a.scripts, diff --git a/pe/qt/gen.py b/pe/qt/gen.py index 183aec92..caa7557e 100644 --- a/pe/qt/gen.py +++ b/pe/qt/gen.py @@ -16,6 +16,7 @@ from hsutil.build import print_and_do, build_all_qt_ui build_all_qt_ui(op.join('qtlib', 'ui')) build_all_qt_ui('base') build_all_qt_ui('.') +print_and_do("pyrcc4 base\\dg.qrc > base\\dg_rc.py") def move(src, dst): if not op.exists(src): diff --git a/pe/qt/start.py b/pe/qt/start.py index 7fb5a367..ace0fc0e 100644 --- a/pe/qt/start.py +++ b/pe/qt/start.py @@ -14,6 +14,9 @@ import base.dg_rc from app import DupeGuru +# This is a workaround for a pyinstaller problem where compiled dupeguru can't read tiff files +from PIL import TiffImagePlugin, TiffTags + if __name__ == "__main__": app = QApplication(sys.argv) app.setWindowIcon(QIcon(QPixmap(":/logo_pe")))