From d73d859feda4d192c617b5fcae8c9875eb5602df Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Thu, 4 Sep 2014 13:20:39 -0700 Subject: [PATCH] fixed Windows/OSX image path problem, and updated NSIS Windows installer to install all the new .py files from refactoring --- onionshare_gui/common.py | 2 +- setup/onionshare-osx.spec | 10 +++---- setup/onionshare-win.spec | 7 +++++ setup/onionshare.nsi | 58 +++++++++++++++++++++++++++++++-------- 4 files changed, 60 insertions(+), 17 deletions(-) diff --git a/onionshare_gui/common.py b/onionshare_gui/common.py index ef690a7d..6c5c06a0 100644 --- a/onionshare_gui/common.py +++ b/onionshare_gui/common.py @@ -32,5 +32,5 @@ def get_image_path(filename): if platform.system() == 'Linux': prefix = os.path.join(sys.prefix, 'share/onionshare/images') else: - prefix = os.path.join(get_onionshare_gui_dir(), 'images') + prefix = os.path.join(os.path.dirname(get_onionshare_gui_dir()), 'images') return os.path.join(prefix, filename) diff --git a/setup/onionshare-osx.spec b/setup/onionshare-osx.spec index 878415ac..ef8986d8 100644 --- a/setup/onionshare-osx.spec +++ b/setup/onionshare-osx.spec @@ -8,11 +8,11 @@ a.datas += [ ('onionshare/strings.json', 'onionshare/strings.json', 'DATA'), ('onionshare/index.html', 'onionshare/index.html', 'DATA'), ('onionshare/404.html', 'onionshare/404.html', 'DATA'), - ('images/logo.png', 'onionshare_gui/images/logo.png', 'DATA'), - ('images/drop_files.png', 'onionshare_gui/images/drop_files.png', 'DATA'), - ('images/server_stopped.png', 'onionshare_gui/images/server_stopped.png', 'DATA'), - ('images/server_started.png', 'onionshare_gui/images/server_started.png', 'DATA'), - ('images/server_working.png', 'onionshare_gui/images/server_working.png', 'DATA'), + ('images/logo.png', 'images/logo.png', 'DATA'), + ('images/drop_files.png', 'images/drop_files.png', 'DATA'), + ('images/server_stopped.png', 'images/server_stopped.png', 'DATA'), + ('images/server_started.png', 'images/server_started.png', 'DATA'), + ('images/server_working.png', 'images/server_working.png', 'DATA'), ] pyz = PYZ(a.pure) exe = EXE(pyz, diff --git a/setup/onionshare-win.spec b/setup/onionshare-win.spec index d260408f..5d673ca4 100644 --- a/setup/onionshare-win.spec +++ b/setup/onionshare-win.spec @@ -3,6 +3,13 @@ a = Analysis(['setup/onionshare-launcher.py'], hiddenimports=['onionshare', 'onionshare_gui'], hookspath=None, runtime_hooks=None) +a.datas += [ + ('images/logo.png', 'images/logo.png', 'DATA'), + ('images/drop_files.png', 'images/drop_files.png', 'DATA'), + ('images/server_stopped.png', 'images/server_stopped.png', 'DATA'), + ('images/server_started.png', 'images/server_started.png', 'DATA'), + ('images/server_working.png', 'images/server_working.png', 'DATA'), +] pyz = PYZ(a.pure) exe = EXE(pyz, a.scripts, diff --git a/setup/onionshare.nsi b/setup/onionshare.nsi index 2c66c20f..3c931a7e 100644 --- a/setup/onionshare.nsi +++ b/setup/onionshare.nsi @@ -46,19 +46,37 @@ Section "install" File "${BINPATH}\onionshare.exe" File "${BINPATH}\LICENSE" SetOutPath "$INSTDIR\onionshare" - File "${BINPATH}\onionshare\404.html" File "${BINPATH}\onionshare\__init__.py" File "${BINPATH}\onionshare\__init__.pyc" + File "${BINPATH}\onionshare\404.html" + File "${BINPATH}\onionshare\helpers.py" + File "${BINPATH}\onionshare\helpers.pyc" File "${BINPATH}\onionshare\index.html" File "${BINPATH}\onionshare\onionshare.py" File "${BINPATH}\onionshare\onionshare.pyc" + File "${BINPATH}\onionshare\socks.py" + File "${BINPATH}\onionshare\socks.pyc" File "${BINPATH}\onionshare\strings.json" + File "${BINPATH}\onionshare\strings.py" + File "${BINPATH}\onionshare\strings.pyc" + File "${BINPATH}\onionshare\web.py" + File "${BINPATH}\onionshare\web.pyc" SetOutPath "$INSTDIR\onionshare_gui" - File "${BINPATH}\onionshare_gui\onionshare_gui.py" - File "${BINPATH}\onionshare_gui\onionshare_gui.pyc" File "${BINPATH}\onionshare_gui\__init__.py" File "${BINPATH}\onionshare_gui\__init__.pyc" - SetOutPath "$INSTDIR\onionshare_gui\images" + File "${BINPATH}\onionshare_gui\common.py" + File "${BINPATH}\onionshare_gui\common.pyc" + File "${BINPATH}\onionshare_gui\downloads.py" + File "${BINPATH}\onionshare_gui\downloads.pyc" + File "${BINPATH}\onionshare_gui\file_selection.py" + File "${BINPATH}\onionshare_gui\file_selection.pyc" + File "${BINPATH}\onionshare_gui\onionshare_gui.py" + File "${BINPATH}\onionshare_gui\onionshare_gui.pyc" + File "${BINPATH}\onionshare_gui\options.py" + File "${BINPATH}\onionshare_gui\options.pyc" + File "${BINPATH}\onionshare_gui\server_status.py" + File "${BINPATH}\onionshare_gui\server_status.pyc" + SetOutPath "$INSTDIR\images" File "${BINPATH}\images\logo.png" File "${BINPATH}\images\drop_files.png" File "${BINPATH}\images\server_stopped.png" @@ -157,22 +175,40 @@ Section "uninstall" Delete "$INSTDIR\LICENSE" Delete "$INSTDIR\onionshare.ico" Delete "$INSTDIR\uninstall.exe" - Delete "$INSTDIR\onionshare\404.html" Delete "$INSTDIR\onionshare\__init__.py" Delete "$INSTDIR\onionshare\__init__.pyc" + Delete "$INSTDIR\onionshare\404.html" + Delete "$INSTDIR\onionshare\helpers.py" + Delete "$INSTDIR\onionshare\helpers.pyc" Delete "$INSTDIR\onionshare\index.html" Delete "$INSTDIR\onionshare\onionshare.py" Delete "$INSTDIR\onionshare\onionshare.pyc" + Delete "$INSTDIR\onionshare\socks.py" + Delete "$INSTDIR\onionshare\socks.pyc" Delete "$INSTDIR\onionshare\strings.json" + Delete "$INSTDIR\onionshare\strings.py" + Delete "$INSTDIR\onionshare\strings.pyc" + Delete "$INSTDIR\onionshare\web.py" + Delete "$INSTDIR\onionshare\web.pyc" Delete "$INSTDIR\onionshare_gui\__init__.py" Delete "$INSTDIR\onionshare_gui\__init__.pyc" - Delete "$INSTDIR\onionshare_gui\images\logo.png" - Delete "$INSTDIR\onionshare_gui\images\drop_files.png" - Delete "$INSTDIR\onionshare_gui\images\server_stopped.png" - Delete "$INSTDIR\onionshare_gui\images\server_started.png" - Delete "$INSTDIR\onionshare_gui\images\server_working.png" + Delete "$INSTDIR\onionshare_gui\common.py" + Delete "$INSTDIR\onionshare_gui\common.pyc" + Delete "$INSTDIR\onionshare_gui\downloads.py" + Delete "$INSTDIR\onionshare_gui\downloads.pyc" + Delete "$INSTDIR\onionshare_gui\file_selection.py" + Delete "$INSTDIR\onionshare_gui\file_selection.pyc" Delete "$INSTDIR\onionshare_gui\onionshare_gui.py" Delete "$INSTDIR\onionshare_gui\onionshare_gui.pyc" + Delete "$INSTDIR\onionshare_gui\options.py" + Delete "$INSTDIR\onionshare_gui\options.pyc" + Delete "$INSTDIR\onionshare_gui\server_status.py" + Delete "$INSTDIR\onionshare_gui\server_status.pyc" + Delete "$INSTDIR\images\logo.png" + Delete "$INSTDIR\images\drop_files.png" + Delete "$INSTDIR\images\server_stopped.png" + Delete "$INSTDIR\images\server_started.png" + Delete "$INSTDIR\images\server_working.png" Delete "$INSTDIR\qt4_plugins\accessible\qtaccessiblewidgets4.dll" Delete "$INSTDIR\qt4_plugins\graphicssystems\qglgraphicssystem4.dll" Delete "$INSTDIR\qt4_plugins\iconengines\qsvgicon4.dll" @@ -216,8 +252,8 @@ Section "uninstall" Delete "$INSTDIR\win32wnet.pyd" rmDir "$INSTDIR\onionshare" - rmDir "$INSTDIR\onionshare_gui\images" rmDir "$INSTDIR\onionshare_gui" + rmDir "$INSTDIR\images" rmDir "$INSTDIR\Include" rmDir "$INSTDIR\qt4_plugins\accessible" rmDir "$INSTDIR\qt4_plugins\bearer"