[Pkg-privacy-commits] [onionshare] 51/66: Fix PyInstaller to point to new resources directory, for OSX and Windows

Ulrike Uhlig u-guest at moszumanska.debian.org
Wed Apr 13 22:17:51 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository onionshare.

commit 0b588e543af58edeb1d2084d9e004e330ce35de1
Author: Micah Lee <micah at micahflee.com>
Date:   Tue Apr 12 15:21:47 2016 -0700

    Fix PyInstaller to point to new resources directory, for OSX and Windows
---
 install/pyinstaller.spec | 8 ++++----
 onionshare/helpers.py    | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/install/pyinstaller.spec b/install/pyinstaller.spec
index 6ee8f81..9f539d7 100644
--- a/install/pyinstaller.spec
+++ b/install/pyinstaller.spec
@@ -10,10 +10,10 @@ a = Analysis(
     pathex=['.'],
     binaries=None,
     datas=[
-        ('../images/*', 'images'),
-        ('../locale/*', 'locale'),
-        ('../onionshare/*.html', 'html'),
-        ('../version.txt', '.')
+        ('../resources/images/*', 'images'),
+        ('../resources/locale/*', 'locale'),
+        ('../resources/html/*', 'html'),
+        ('../resources/version.txt', '.')
     ],
     hiddenimports=[],
     hookspath=[],
diff --git a/onionshare/helpers.py b/onionshare/helpers.py
index d55573b..c6d29f0 100644
--- a/onionshare/helpers.py
+++ b/onionshare/helpers.py
@@ -41,9 +41,9 @@ def get_resource_path(filename):
             resources_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))), 'resources')
     else:
         # Check if app is "frozen" with pyinstaller
-        # https://pythonhosted.org/pyinstaller/#run-time-information
-        if getattr(sys, 'frozen', false):
-            resources_dir = sys._meipass
+        # https://pythonhosted.org/PyInstaller/#run-time-information
+        if getattr(sys, 'frozen', False):
+            resources_dir = sys._MEIPASS
         else:
             resources_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))), 'resources')
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git



More information about the Pkg-privacy-commits mailing list