diff --git a/install/pyinstaller.spec b/install/pyinstaller.spec index 6ee8f814..9f539d78 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 d55573bd..c6d29f0b 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')