From 48badaa92793ea55e607d7eefa05027e005bcafb Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 7 Apr 2010 13:59:40 +0200 Subject: [PATCH 1/3] pe v1.8.6 --- cocoa/pe/Info.plist | 2 +- help_pe/changelog.yaml | 7 ++++++- qt/pe/app.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cocoa/pe/Info.plist b/cocoa/pe/Info.plist index 09b3c971..cc549275 100644 --- a/cocoa/pe/Info.plist +++ b/cocoa/pe/Info.plist @@ -23,7 +23,7 @@ CFBundleSignature hsft CFBundleVersion - 1.8.5 + 1.8.6 NSMainNibFile MainMenu NSPrincipalClass diff --git a/help_pe/changelog.yaml b/help_pe/changelog.yaml index 82b01945..1189242c 100644 --- a/help_pe/changelog.yaml +++ b/help_pe/changelog.yaml @@ -1,7 +1,12 @@ +- date: 2010-04-07 + version: 1.8.6 + description: | + * Fixed a crash when performing very big scans. + * Fixed a rare crash during results loading. (#90) - date: 2010-03-01 version: 1.8.5 description: | - * Fixed a bug preventing some iPhoto Libraries to be read. (Mac OS X) + * Fixed a bug preventing some iPhoto Libraries to be read. [Mac OS X] * Improved results loading and saving speed. - date: 2010-02-18 version: 1.8.4 diff --git a/qt/pe/app.py b/qt/pe/app.py index 5622a4da..609c0f8e 100644 --- a/qt/pe/app.py +++ b/qt/pe/app.py @@ -56,7 +56,7 @@ class File(fs.File): class DupeGuru(DupeGuruBase): LOGO_NAME = 'logo_pe' NAME = 'dupeGuru Picture Edition' - VERSION = '1.8.5' + VERSION = '1.8.6' DELTA_COLUMNS = frozenset([2, 5, 6]) def __init__(self): From e6486e08ab67600156e9bbb690fb413bc19a97d5 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 7 Apr 2010 15:04:09 +0100 Subject: [PATCH 2/3] Qt: fixed help packaging. --- package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.py b/package.py index 37309cb6..ecfd0e1e 100644 --- a/package.py +++ b/package.py @@ -55,7 +55,7 @@ def package_windows(edition): print_and_do("del dist\\*90.dll") # They're in vcredist, no need to include them print_and_do("del dist\\POWRPROF.dll") # no need of that crap print_and_do("del dist\\SHLWAPI.dll") # no need of that crap - print_and_do("xcopy /Y /S /I ..\\..\\help_me\\dupeguru_me_help dist\\help") + print_and_do("xcopy /Y /S /I ..\\..\\help_{0}\\dupeguru_{0}_help dist\\help".format(edition)) # AdvancedInstaller.com has to be in your PATH # this is so we don'a have to re-commit installer.aip at every version change From 5573352ce6d09d27f8c45f8b1299f3ed128ea04a Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 7 Apr 2010 16:30:04 +0100 Subject: [PATCH 3/3] PyInstaller is fucked up. Moved to cxFreeze. --- package.py | 34 +++++------- qt/base/cxfreeze_fix.py | 5 ++ qt/me/dgme.spec | 19 ------- qt/me/verinfo | 28 ---------- qt/pe/dgpe.spec | 19 ------- qt/pe/installer.aip | 116 +++++++++++++--------------------------- qt/pe/start.py | 3 +- qt/pe/verinfo | 28 ---------- qt/se/dgse.spec | 21 -------- qt/se/verinfo | 28 ---------- 10 files changed, 56 insertions(+), 245 deletions(-) create mode 100644 qt/base/cxfreeze_fix.py delete mode 100644 qt/me/dgme.spec delete mode 100644 qt/me/verinfo delete mode 100644 qt/pe/dgpe.spec delete mode 100644 qt/pe/verinfo delete mode 100644 qt/se/dgse.spec delete mode 100644 qt/se/verinfo diff --git a/package.py b/package.py index ecfd0e1e..07decb08 100644 --- a/package.py +++ b/package.py @@ -25,7 +25,7 @@ def package_cocoa(edition): }[edition] build_dmg(app_path, '.') -def package_windows(edition): +def package_windows(edition, with_upx=True): # On Windows, PyInstaller is used to build an exe (py2exe creates a very bad looking icon) # The release version is outdated. Use at least r672 on http://svn.pyinstaller.org/trunk if sys.platform != "win32": @@ -37,30 +37,25 @@ def package_windows(edition): os.chdir(op.join('qt', edition)) from app import DupeGuru - # Removing build and dist - if op.exists('build'): - shutil.rmtree('build') if op.exists('dist'): shutil.rmtree('dist') - version = DupeGuru.VERSION - versioncomma = version.replace('.', ', ') + ', 0' - verinfo = open('verinfo').read() - verinfo = verinfo.replace('$versioncomma', versioncomma).replace('$version', version) - fp = open('verinfo_tmp', 'w') - fp.write(verinfo) - fp.close() - print_and_do("python C:\\Python26\\pyinstaller\\Build.py dg{0}.spec".format(edition)) - os.remove('verinfo_tmp') + + cmd = 'cxfreeze --base-name Win32GUI --target-name "{0}.exe" --icon {1} start.py' + target_name = {'se': 'dupeGuru', 'me': 'dupeGuru ME', 'pe': 'dupeGuru PE'}[edition] + icon_path = '..\\..\\images\\dg{0}_logo.ico'.format(edition) + print_and_do(cmd.format(target_name, icon_path)) + + if with_upx: + libs = [name for name in os.listdir('dist') if op.splitext(name)[1] in ('.pyd', '.dll', '.exe')] + for lib in libs: + print_and_do("upx --best \"dist\\{0}\"".format(lib)) - print_and_do("del dist\\*90.dll") # They're in vcredist, no need to include them - print_and_do("del dist\\POWRPROF.dll") # no need of that crap - print_and_do("del dist\\SHLWAPI.dll") # no need of that crap print_and_do("xcopy /Y /S /I ..\\..\\help_{0}\\dupeguru_{0}_help dist\\help".format(edition)) # AdvancedInstaller.com has to be in your PATH # this is so we don'a have to re-commit installer.aip at every version change shutil.copy('installer.aip', 'installer_tmp.aip') - print_and_do('AdvancedInstaller.com /edit installer_tmp.aip /SetVersion %s' % version) + print_and_do('AdvancedInstaller.com /edit installer_tmp.aip /SetVersion %s' % DupeGuru.VERSION) print_and_do('AdvancedInstaller.com /build installer_tmp.aip -force') os.remove('installer_tmp.aip') os.chdir(op.join('..', '..')) @@ -104,15 +99,12 @@ def main(): edition = conf['edition'] ui = conf['ui'] dev = conf['dev'] - if dev: - print "You can't package in dev mode" - return print "Packaging dupeGuru {0} with UI {1}".format(edition.upper(), ui) if ui == 'cocoa': package_cocoa(edition) elif ui == 'qt': if sys.platform == "win32": - package_windows(edition) + package_windows(edition, with_upx=not dev) elif sys.platform == "linux2": package_debian(edition) else: diff --git a/qt/base/cxfreeze_fix.py b/qt/base/cxfreeze_fix.py new file mode 100644 index 00000000..e715499c --- /dev/null +++ b/qt/base/cxfreeze_fix.py @@ -0,0 +1,5 @@ +# cxfreeze has some problems detecting all dependencies. +# This modules explicitly import those problematic modules. + +import lxml._elementpath +import gzip \ No newline at end of file diff --git a/qt/me/dgme.spec b/qt/me/dgme.spec deleted file mode 100644 index 0e21463b..00000000 --- a/qt/me/dgme.spec +++ /dev/null @@ -1,19 +0,0 @@ -# -*- mode: python -*- -a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), 'start.py'], - pathex=[]) -pyz = PYZ(a.pure) -exe = EXE(pyz, - a.scripts, - exclude_binaries=1, - name=os.path.join('build\\pyi.win32\\dupeGuru ME', 'dupeGuru ME.exe'), - debug=False, - strip=False, - upx=True, - console=False , icon='..\\..\\images\\dgme_logo.ico', version='verinfo_tmp') -coll = COLLECT( exe, - a.binaries, - a.zipfiles, - a.datas, - strip=False, - upx=True, - name=os.path.join('dist')) diff --git a/qt/me/verinfo b/qt/me/verinfo deleted file mode 100644 index 6384c49e..00000000 --- a/qt/me/verinfo +++ /dev/null @@ -1,28 +0,0 @@ -VSVersionInfo( - ffi=FixedFileInfo( - filevers=($versioncomma), - prodvers=($versioncomma), - mask=0x17, - flags=0x0, - OS=0x4, - fileType=0x1, - subtype=0x0, - date=(0, 0) - ), - kids=[ - StringFileInfo( - [ - StringTable( - '040904b0', - [StringStruct('CompanyName', 'Hardcoded Software'), - StringStruct('FileDescription', 'dupeGuru Music Edition'), - StringStruct('FileVersion', '$version'), - StringStruct('InternalName', 'dupeGuru ME.exe'), - StringStruct('LegalCopyright', '(c) Hardcoded Software. All rights reserved.'), - StringStruct('OriginalFilename', 'dupeGuru ME.exe'), - StringStruct('ProductName', 'dupeGuru Music Edition'), - StringStruct('ProductVersion', '$versioncomma')]) - ]), - VarFileInfo([VarStruct('Translation', [1033])]) - ] -) diff --git a/qt/pe/dgpe.spec b/qt/pe/dgpe.spec deleted file mode 100644 index ab00fde5..00000000 --- a/qt/pe/dgpe.spec +++ /dev/null @@ -1,19 +0,0 @@ -# -*- mode: python -*- -a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), 'start.py'], - pathex=[]) -pyz = PYZ(a.pure) -exe = EXE(pyz, - a.scripts, - exclude_binaries=1, - name=os.path.join('build\\pyi.win32\\dupeGuru PE', 'dupeGuru PE.exe'), - debug=False, - strip=False, - upx=True, - console=False , icon='..\\..\\images\\dgpe_logo.ico', version='verinfo_tmp') -coll = COLLECT( exe, - a.binaries, - a.zipfiles, - a.datas, - strip=False, - upx=True, - name=os.path.join('dist')) diff --git a/qt/pe/installer.aip b/qt/pe/installer.aip index 390693d8..d6d8f4a4 100644 --- a/qt/pe/installer.aip +++ b/qt/pe/installer.aip @@ -1,5 +1,5 @@ - + @@ -28,110 +28,65 @@ - - - - - - - - - + - - - - - - - - - - - - - - - - - + - - - - - - - - + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - + @@ -261,6 +216,7 @@ + diff --git a/qt/pe/start.py b/qt/pe/start.py index dfedc359..6ef886ad 100644 --- a/qt/pe/start.py +++ b/qt/pe/start.py @@ -11,10 +11,11 @@ from PyQt4.QtCore import QCoreApplication from PyQt4.QtGui import QApplication, QIcon, QPixmap import base.dg_rc +import base.cxfreeze_fix from app import DupeGuru -# This is a workaround for a pyinstaller problem where compiled dupeguru can't read tiff files +# This is a workaround for a cxfreeze problem where compiled dupeguru can't read tiff files from PIL import TiffImagePlugin, TiffTags if __name__ == "__main__": diff --git a/qt/pe/verinfo b/qt/pe/verinfo deleted file mode 100644 index d70ee2a0..00000000 --- a/qt/pe/verinfo +++ /dev/null @@ -1,28 +0,0 @@ -VSVersionInfo( - ffi=FixedFileInfo( - filevers=($versioncomma), - prodvers=($versioncomma), - mask=0x17, - flags=0x0, - OS=0x4, - fileType=0x1, - subtype=0x0, - date=(0, 0) - ), - kids=[ - StringFileInfo( - [ - StringTable( - '040904b0', - [StringStruct('CompanyName', 'Hardcoded Software'), - StringStruct('FileDescription', 'dupeGuru Picture Edition'), - StringStruct('FileVersion', '$version'), - StringStruct('InternalName', 'dupeGuru PE.exe'), - StringStruct('LegalCopyright', '(c) Hardcoded Software. All rights reserved.'), - StringStruct('OriginalFilename', 'dupeGuru PE.exe'), - StringStruct('ProductName', 'dupeGuru Picture Edition'), - StringStruct('ProductVersion', '$versioncomma')]) - ]), - VarFileInfo([VarStruct('Translation', [1033])]) - ] -) diff --git a/qt/se/dgse.spec b/qt/se/dgse.spec deleted file mode 100644 index 7810d2e3..00000000 --- a/qt/se/dgse.spec +++ /dev/null @@ -1,21 +0,0 @@ -# -*- mode: python -*- -a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), 'start.py'], - pathex=[]) -pyz = PYZ(a.pure) -exe = EXE(pyz, - a.scripts, - exclude_binaries=1, - name=os.path.join('build\\pyi.win32\\dupeGuru', 'dupeGuru.exe'), - debug=False, - strip=False, - upx=True, - console=False, - icon='..\\..\\images\\dgse_logo.ico', - version='verinfo_tmp') -coll = COLLECT( exe, - a.binaries, - a.zipfiles, - a.datas, - strip=False, - upx=True, - name=os.path.join('dist')) diff --git a/qt/se/verinfo b/qt/se/verinfo deleted file mode 100644 index b32801d5..00000000 --- a/qt/se/verinfo +++ /dev/null @@ -1,28 +0,0 @@ -VSVersionInfo( - ffi=FixedFileInfo( - filevers=($versioncomma), - prodvers=($versioncomma), - mask=0x17, - flags=0x0, - OS=0x4, - fileType=0x1, - subtype=0x0, - date=(0, 0) - ), - kids=[ - StringFileInfo( - [ - StringTable( - '040904b0', - [StringStruct('CompanyName', 'Hardcoded Software'), - StringStruct('FileDescription', 'dupeGuru'), - StringStruct('FileVersion', '$version'), - StringStruct('InternalName', 'dupeGuru.exe'), - StringStruct('LegalCopyright', '(c) Hardcoded Software. All rights reserved.'), - StringStruct('OriginalFilename', 'dupeGuru.exe'), - StringStruct('ProductName', 'dupeGuru'), - StringStruct('ProductVersion', '$versioncomma')]) - ]), - VarFileInfo([VarStruct('Translation', [1033])]) - ] -)