1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-25 08:01:39 +00:00

Compare commits

..

7 Commits

Author SHA1 Message Date
Virgil Dupras
f5f29d775c Adapt IPhotoPlistParser to Python 3.4
This also means that Python 3.3 isn't supported anymore for that part.
Updated README accordingly.
2014-05-03 15:12:13 -04:00
Virgil Dupras
ebd7f1b4ce pe v2.10.0 2014-05-03 13:57:00 -04:00
Virgil Dupras
279b7ad10c Fix typo in README 2014-05-03 13:53:16 -04:00
Virgil Dupras
878205fc49 Fix empty ignore List dialog bug in PE
Re-instantiating a new scanner for PE  made the ignore list dialog
target the wrong ignore list. We now only instantiate a scanner once.

Fixes #253
2014-05-03 13:44:38 -04:00
Virgil Dupras
b16df32150 I'm giving PyCharm a try 2014-05-03 13:39:39 -04:00
Virgil Dupras
04b06f7704 Removed the setNativeMenuBar() call under Qt
I put it there to make the menu usable under Ubuntu 13.10, but since
14.04, this line actually brakes it.
2014-05-03 09:34:41 -04:00
Virgil Dupras
c6ea1c62d4 Fixed Windows packaging 2014-04-21 10:00:53 -04:00
9 changed files with 37 additions and 20 deletions

1
.gitignore vendored
View File

@@ -5,6 +5,7 @@
*.pyd
*.waf*
.lock-waf*
.idea
build
dist

View File

@@ -3,7 +3,7 @@
[dupeGuru][dupeguru] is a cross-platform (Linux, OS X, Windows) GUI tool to find duplicate files in
a system. It's written mostly in Python 3 and has the peculiarity of using
[multiple GUI toolkits][cross-toolkit], all using the same core Python code. On OS X, the UI layer
is written in Objective-C and uses Cocoa. On Linux and Windows, it's written in Python and uses Qt4.
is written in Objective-C and uses Cocoa. On Linux and Windows, it's written in Python and uses Qt5.
dupeGuru comes in 3 editions (standard, music and picture) which are all buildable from this same
source tree. You choose the edition you want to build in a ``configure.py`` flag.
@@ -47,7 +47,7 @@ Prerequisites are installed through `pip`. However, some of them are not "pip in
to be installed manually.
* All systems: [Python 3.3+][python] and [setuptools][setuptools]
* Mac OS X: The last XCode to have the 10.6 SDK included.
* Mac OS X: The last XCode to have the 10.7 SDK included. Python 3.4+.
* Windows: Visual Studio 2010, [PyQt 5.0+][pyqt], [cx_Freeze][cxfreeze] and
[Advanced Installer][advinst] (you only need the last two if you want to create an installer)

View File

@@ -152,8 +152,8 @@ class DupeGuru(Broadcaster):
# select_dest_folder(prompt: str) --> str
# select_dest_file(prompt: str, ext: str) --> str
# in fairware prompts, we don't mention the edition, it's too long.
PROMPT_NAME = "dupeGuru"
SCANNER_CLASS = scanner.Scanner
def __init__(self, view):
if view.get_default(DEBUG_MODE_PREFERENCE):
@@ -166,7 +166,7 @@ class DupeGuru(Broadcaster):
os.makedirs(self.appdata)
self.directories = directories.Directories()
self.results = results.Results(self)
self.scanner = scanner.Scanner()
self.scanner = self.SCANNER_CLASS()
self.options = {
'escape_filter_regexp': True,
'clean_empty_dirs': False,

View File

@@ -1,2 +1,2 @@
__version__ = '2.9.0'
__version__ = '2.10.0'
__appname__ = 'dupeGuru Picture Edition'

View File

@@ -17,10 +17,10 @@ from .result_table import ResultTable
class DupeGuru(DupeGuruBase):
NAME = __appname__
METADATA_TO_READ = ['size', 'mtime', 'dimensions', 'exif_timestamp']
SCANNER_CLASS = ScannerPE
def __init__(self, view):
DupeGuruBase.__init__(self, view)
self.scanner = ScannerPE()
self.scanner.cache_path = op.join(self.appdata, 'cached_pictures.db')
def _get_dupe_sort_key(self, dupe, get_group, key, delta):

View File

@@ -8,24 +8,24 @@
import plistlib
class IPhotoPlistParser(plistlib.PlistParser):
class IPhotoPlistParser(plistlib._PlistParser):
"""A parser for iPhoto plists.
iPhoto plists tend to be malformed, so we have to subclass the built-in parser to be a bit more
lenient.
"""
def __init__(self):
plistlib.PlistParser.__init__(self)
plistlib._PlistParser.__init__(self, use_builtin_types=True, dict_type=dict)
# For debugging purposes, we remember the last bit of data to be analyzed so that we can
# log it in case of an exception
self.lastdata = ''
def getData(self):
self.lastdata = plistlib.PlistParser.getData(self)
def get_data(self):
self.lastdata = plistlib._PlistParser.get_data(self)
return self.lastdata
def end_integer(self):
try:
self.addObject(int(self.getData()))
self.add_object(int(self.get_data()))
except ValueError:
self.addObject(0)
self.add_object(0)

View File

@@ -1,3 +1,17 @@
=== 2.10.0 (2014-05-03)
* This is mostly a dependencies upgrade.
* Upgraded to Python 3.3.
* Upgraded to Qt 5.
* Minimum Windows version is now Windows 7 64bit.
* Minimum Ubuntu version is now 14.04.
* Minimum OS X version is now 10.7 (Lion).
* ... But with a couple of little improvements.
* Improved documentation.
* Overwrite subfolders' state when setting states in folder dialog (#248)
* Fix empty Ignore List dialog bug. (#253)
* The error report dialog now brings the user to Github issues.
=== 2.9.0 (2013-12-22)
* Read RAW pictures EXIF tags. [Mac] (#234)

View File

@@ -18,7 +18,7 @@ import glob
from hscommon.plat import ISWINDOWS, ISLINUX
from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, build_debian_changelog,
copy_qt_plugins, get_module_version, filereplace, copy, setup_package_argparser,
package_cocoa_app_in_dmg, copy_all)
package_cocoa_app_in_dmg, copy_all, find_in_path)
def parse_args():
parser = ArgumentParser()
@@ -38,6 +38,7 @@ def package_windows(edition, dev):
print("Qt packaging only works under Windows.")
return
from cx_Freeze import setup, Executable
from PyQt5.QtCore import QLibraryInfo
add_to_pythonpath('.')
app_version = get_module_version('core_{}'.format(edition))
distdir = 'dist'
@@ -80,13 +81,15 @@ def package_windows(edition, dev):
executables=executables
)
print("Removing useless DLLs")
# Huge useless dll that appeared with Qt5
for fn in glob.glob(op.join(distdir, 'icu*.dll')):
os.remove(fn)
print("Removing useless files")
# Debug info that cx_freeze brings in.
for fn in glob.glob(op.join(distdir, '*', '*.pdb')):
os.remove(fn)
print("Copying forgotten DLLs")
qtlibpath = QLibraryInfo.location(QLibraryInfo.LibrariesPath)
shutil.copy(op.join(qtlibpath, 'libEGL.dll'), distdir)
shutil.copy(find_in_path('msvcp110.dll'), distdir)
print("Copying the rest")
help_path = op.join('build', 'help')
print("Copying {} to dist\\help".format(help_path))
shutil.copytree(help_path, op.join(distdir, 'help'))

View File

@@ -71,7 +71,6 @@ class ResultWindow(QMainWindow):
def _setupMenu(self):
self.menubar = QMenuBar()
self.menubar.setNativeMenuBar(False)
self.menubar.setGeometry(QRect(0, 0, 630, 22))
self.menuFile = QMenu(self.menubar)
self.menuFile.setTitle(tr("File"))