Skip to content

Commit

Permalink
Revert "Readding Win support and switching to NSIS Installer - arsene…
Browse files Browse the repository at this point in the history
…tar#393"

This reverts commit 13c1a39.
  • Loading branch information
thekhalifa committed Nov 14, 2016
1 parent 13c1a39 commit 3cb99c7
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 399 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.DS_Store
__pycache__
*.so
*.exe
*.mo
*.waf*
.lock-waf*
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# dupeGuru

[dupeGuru][dupeguru] is a cross-platform (Linux, OS X and Windows) GUI tool to find duplicate files in
[dupeGuru][dupeguru] is a cross-platform (Linux and OS X) 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 Qt5.
is written in Objective-C and uses Cocoa. On Linux, it's written in Python and uses Qt5.

## Current status: People wanted

Expand All @@ -29,6 +29,13 @@ triaging, code review, critical bugfixes, releases management.
But anything non-critical, I'm not going to implement it myself because I see every issue as a
contribution opportunity.

### Windows maintainer wanted

As [described on my website][nowindows], dupeGuru v4.0 dropped Windows support
because there isn't anyone to bear the burden of Windows maintenance. If
you're a Windows developer and are interested in taking this task, [don't
hesitate to let me know][contrib-issue].

### OS X maintainer wanted

My Mac Mini is already a couple of years old and is likely to be my last Apple purchase. When it
Expand Down Expand Up @@ -70,12 +77,6 @@ If you're on linux, you can build the ap for local development with `make`:
The `Makefile` is a recent addition, however. You might have to fallback to the legacy build
scripts.

If you're on Windows, you can build using the winmake batch script

> winmake bootstrap
> winmake build
> python run.py

### Legacy build

If you're on OS X or that if the `make` method didn't work, you can build dupeGuru with the
Expand Down
95 changes: 10 additions & 85 deletions package.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@
import json
from argparse import ArgumentParser
import platform
import glob

from hscommon.plat import ISOSX, ISWINDOWS, ISLINUX
from hscommon.plat import ISOSX
from hscommon.build import (
print_and_do, copy_packages, build_debian_changelog,
get_module_version, filereplace, copy, setup_package_argparser,
package_cocoa_app_in_dmg, copy_all,
add_to_pythonpath, copy_qt_plugins, find_in_path
package_cocoa_app_in_dmg, copy_all
)

def parse_args():
Expand All @@ -30,76 +28,6 @@ def package_cocoa(args):
app_path = 'build/dupeGuru.app'
package_cocoa_app_in_dmg(app_path, '.', args)

def package_windows():
if not ISWINDOWS:
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')
distdir = 'dist'

if op.exists(distdir):
shutil.rmtree(distdir)

plugin_dest = distdir
plugin_names = ['accessible', 'codecs', 'iconengines', 'imageformats']
copy_qt_plugins(plugin_names, plugin_dest)

# Since v4.2.3, cx_freeze started to falsely include tkinter in the package. We exclude it
# explicitly because of that.
options = {
'build_exe': {
'includes': 'atexit',
'excludes': ['tkinter'],
'bin_excludes': ['icudt51', 'icuin51.dll', 'icuuc51.dll'],
#'icon': 'images\\dgse_logo.ico',
'include_msvcr': True,
},
'install_exe': {
'install_dir': 'dist',
}
}

executables = [
Executable(
'run.py',
base='Win32GUI',
#targetDir=distdir,
icon='images\\dgse_logo.ico',
targetName='dupeGuru.exe'
)
]

setup(
script_args=['install'],
options=options,
executables=executables
)

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)
#AK: added this as cxfreeze is not picking it up
shutil.copy(find_in_path('sqlite3.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'))
locale_path = op.join('build', 'locale')
print("Copying {} to dist\\locale".format(locale_path))
shutil.copytree(locale_path, op.join(distdir, 'locale'))

# NSIS has to be in your PATH for this to work
installer_file = 'scripts/dupguru.nsi'
print_and_do('makensis scripts/dupguru.nsi')

def copy_files_to_package(destpath, packages, with_so):
# when with_so is true, we keep .so files in the package, and otherwise, we don't. We need this
# flag because when building debian src pkg, we *don't* want .so files (they're compiled later)
Expand Down Expand Up @@ -200,17 +128,14 @@ def main():
if ui == 'cocoa':
package_cocoa(args)
elif ui == 'qt':
if ISWINDOWS:
package_windows()
elif ISLINUX:
if not args.arch_pkg:
distname, _, _ = platform.dist()
else:
distname = 'arch'
if distname == 'arch':
package_arch()
else:
package_debian()
if not args.arch_pkg:
distname, _, _ = platform.dist()
else:
distname = 'arch'
if distname == 'arch':
package_arch()
else:
package_debian()

if __name__ == '__main__':
main()
Expand Down
3 changes: 0 additions & 3 deletions requirements-win.txt

This file was deleted.

153 changes: 0 additions & 153 deletions scripts/dupeguru.nsi

This file was deleted.

Loading

0 comments on commit 3cb99c7

Please sign in to comment.