diff --git a/packaging/win32/deluge-bbfreeze.py b/packaging/win32/deluge-bbfreeze.py index 73c7a323d..bf49f886e 100644 --- a/packaging/win32/deluge-bbfreeze.py +++ b/packaging/win32/deluge-bbfreeze.py @@ -54,9 +54,8 @@ build_version = deluge.common.get_version() python_path = os.path.dirname(sys.executable) if python_path.endswith("Scripts"): python_path = python_path[:-8] -python_path += os.path.sep -gtk_root = os.path.join(gtk.__path__[0], "..", "runtime") + os.path.sep -build_dir = "..\\build-win32\\deluge-bbfreeze-" + build_version + "\\" +gtk_root = os.path.join(gtk.__path__[0], "..", "runtime") +build_dir = os.path.join("build-win32", "deluge-bbfreeze-" + build_version) if DEBUG: print("Python Path: %s" % python_path) @@ -89,7 +88,7 @@ fzr.setIcon(os.path.join(os.path.dirname(deluge.common.__file__), "ui", "data", # Hide cmd console popup for these console entries force gui_script True. force_gui = ["deluge-web", "deluged", "deluge-console"] script_list = [] -for script in glob.glob(python_path + "Scripts\\deluge*-script.py*"): +for script in glob.glob(os.path.join(python_path, "Scripts\\deluge*-script.py*")): # Copy the scripts to remove the '-script' suffix before adding to freezer. new_script = script.replace("-script", "") shutil.copy(script, new_script) diff --git a/packaging/win32/deluge-win32-installer.nsi b/packaging/win32/deluge-win32-installer.nsi index b78e8836e..bbf825c86 100644 --- a/packaging/win32/deluge-win32-installer.nsi +++ b/packaging/win32/deluge-win32-installer.nsi @@ -25,7 +25,7 @@ SetCompressorDictSize 64 !define PROGRAM_WEB_SITE "http://deluge-torrent.org" # Python files generated with bbfreeze -!define BUILD_DIR "..\build-win32" +!define BUILD_DIR "build-win32" !define BBFREEZE_DIR "${BUILD_DIR}\deluge-bbfreeze-${PROGRAM_VERSION}" # --- Interface settings --- diff --git a/setup.py b/setup.py index 22a355c38..ada3a9267 100755 --- a/setup.py +++ b/setup.py @@ -266,32 +266,34 @@ cmdclass = { 'test': PyTest, } -# Data files to be installed to the system -_data_files = [ - ('share/icons/hicolor/scalable/apps', ['deluge/ui/data/icons/hicolor/scalable/apps/deluge.svg']), - ('share/icons/hicolor/128x128/apps', ['deluge/ui/data/icons/hicolor/128x128/apps/deluge.png']), - ('share/icons/hicolor/16x16/apps', ['deluge/ui/data/icons/hicolor/16x16/apps/deluge.png']), - ('share/icons/hicolor/192x192/apps', ['deluge/ui/data/icons/hicolor/192x192/apps/deluge.png']), - ('share/icons/hicolor/22x22/apps', ['deluge/ui/data/icons/hicolor/22x22/apps/deluge.png']), - ('share/icons/hicolor/24x24/apps', ['deluge/ui/data/icons/hicolor/24x24/apps/deluge.png']), - ('share/icons/hicolor/256x256/apps', ['deluge/ui/data/icons/hicolor/256x256/apps/deluge.png']), - ('share/icons/hicolor/32x32/apps', ['deluge/ui/data/icons/hicolor/32x32/apps/deluge.png']), - ('share/icons/hicolor/36x36/apps', ['deluge/ui/data/icons/hicolor/36x36/apps/deluge.png']), - ('share/icons/hicolor/48x48/apps', ['deluge/ui/data/icons/hicolor/48x48/apps/deluge.png']), - ('share/icons/hicolor/64x64/apps', ['deluge/ui/data/icons/hicolor/64x64/apps/deluge.png']), - ('share/icons/hicolor/72x72/apps', ['deluge/ui/data/icons/hicolor/72x72/apps/deluge.png']), - ('share/icons/hicolor/96x96/apps', ['deluge/ui/data/icons/hicolor/96x96/apps/deluge.png']), - ('share/pixmaps', ['deluge/ui/data/pixmaps/deluge.png', 'deluge/ui/data/pixmaps/deluge.xpm']), - ('share/man/man1', [ - 'docs/man/deluge.1', - 'docs/man/deluged.1', - 'docs/man/deluge-gtk.1', - 'docs/man/deluge-web.1', - 'docs/man/deluge-console.1']) -] +# Data files to be installed to the system. +_data_files = [] +if not windows_check(): + _data_files = [ + ('share/icons/hicolor/scalable/apps', ['deluge/ui/data/icons/hicolor/scalable/apps/deluge.svg']), + ('share/icons/hicolor/128x128/apps', ['deluge/ui/data/icons/hicolor/128x128/apps/deluge.png']), + ('share/icons/hicolor/16x16/apps', ['deluge/ui/data/icons/hicolor/16x16/apps/deluge.png']), + ('share/icons/hicolor/192x192/apps', ['deluge/ui/data/icons/hicolor/192x192/apps/deluge.png']), + ('share/icons/hicolor/22x22/apps', ['deluge/ui/data/icons/hicolor/22x22/apps/deluge.png']), + ('share/icons/hicolor/24x24/apps', ['deluge/ui/data/icons/hicolor/24x24/apps/deluge.png']), + ('share/icons/hicolor/256x256/apps', ['deluge/ui/data/icons/hicolor/256x256/apps/deluge.png']), + ('share/icons/hicolor/32x32/apps', ['deluge/ui/data/icons/hicolor/32x32/apps/deluge.png']), + ('share/icons/hicolor/36x36/apps', ['deluge/ui/data/icons/hicolor/36x36/apps/deluge.png']), + ('share/icons/hicolor/48x48/apps', ['deluge/ui/data/icons/hicolor/48x48/apps/deluge.png']), + ('share/icons/hicolor/64x64/apps', ['deluge/ui/data/icons/hicolor/64x64/apps/deluge.png']), + ('share/icons/hicolor/72x72/apps', ['deluge/ui/data/icons/hicolor/72x72/apps/deluge.png']), + ('share/icons/hicolor/96x96/apps', ['deluge/ui/data/icons/hicolor/96x96/apps/deluge.png']), + ('share/pixmaps', ['deluge/ui/data/pixmaps/deluge.png', 'deluge/ui/data/pixmaps/deluge.xpm']), + ('share/man/man1', [ + 'docs/man/deluge.1', + 'docs/man/deluged.1', + 'docs/man/deluge-gtk.1', + 'docs/man/deluge-web.1', + 'docs/man/deluge-console.1']) + ] -if not windows_check() and os.path.exists(desktop_data): - _data_files.append(('share/applications', [desktop_data])) + if os.path.exists(desktop_data): + _data_files.append(('share/applications', [desktop_data])) entry_points = { 'console_scripts': [