mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-10 19:52:50 -03:00
Fix PyInstaller to point to new resources directory, for OSX and Windows
This commit is contained in:
parent
e81f809882
commit
0b588e543a
2 changed files with 7 additions and 7 deletions
|
@ -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=[],
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
Loading…
Reference in a new issue