mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-29 01:18:51 -04: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=['.'],
|
pathex=['.'],
|
||||||
binaries=None,
|
binaries=None,
|
||||||
datas=[
|
datas=[
|
||||||
('../images/*', 'images'),
|
('../resources/images/*', 'images'),
|
||||||
('../locale/*', 'locale'),
|
('../resources/locale/*', 'locale'),
|
||||||
('../onionshare/*.html', 'html'),
|
('../resources/html/*', 'html'),
|
||||||
('../version.txt', '.')
|
('../resources/version.txt', '.')
|
||||||
],
|
],
|
||||||
hiddenimports=[],
|
hiddenimports=[],
|
||||||
hookspath=[],
|
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')
|
resources_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))), 'resources')
|
||||||
else:
|
else:
|
||||||
# Check if app is "frozen" with pyinstaller
|
# Check if app is "frozen" with pyinstaller
|
||||||
# https://pythonhosted.org/pyinstaller/#run-time-information
|
# https://pythonhosted.org/PyInstaller/#run-time-information
|
||||||
if getattr(sys, 'frozen', false):
|
if getattr(sys, 'frozen', False):
|
||||||
resources_dir = sys._meipass
|
resources_dir = sys._MEIPASS
|
||||||
else:
|
else:
|
||||||
resources_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))), 'resources')
|
resources_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))), 'resources')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue