summaryrefslogtreecommitdiff
path: root/lib/utils/paths.py
diff options
context:
space:
mode:
authorrejbasket <39080670+rejbasket@users.noreply.github.com>2021-12-08 22:18:41 +0100
committerGitHub <noreply@github.com>2021-12-08 22:18:41 +0100
commit41ace3a9e53b52b4271554d7aedd88d533ee5f5e (patch)
tree83dd3887459eeb79c95177bf318598ee01514fa1 /lib/utils/paths.py
parent49d0f88278798a6c061ce70dd6c1aafb0b1f7a6a (diff)
add macOS and windows installer (#1352)
Diffstat (limited to 'lib/utils/paths.py')
-rwxr-xr-x[-rw-r--r--]lib/utils/paths.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/utils/paths.py b/lib/utils/paths.py
index 938c5f33..2a95f6e7 100644..100755
--- a/lib/utils/paths.py
+++ b/lib/utils/paths.py
@@ -10,13 +10,19 @@ from os.path import dirname, realpath
def get_bundled_dir(name):
if getattr(sys, 'frozen', None) is not None:
- return realpath(os.path.join(sys._MEIPASS, "..", name))
+ if sys.platform == "darwin":
+ return realpath(os.path.join(sys._MEIPASS, "..", 'Resources', name))
+ else:
+ return realpath(os.path.join(sys._MEIPASS, "..", name))
else:
return realpath(os.path.join(dirname(realpath(__file__)), '..', '..', name))
def get_resource_dir(name):
if getattr(sys, 'frozen', None) is not None:
- return realpath(os.path.join(sys._MEIPASS, name))
+ if sys.platform == "darwin":
+ return realpath(os.path.join(sys._MEIPASS, "..", 'Resources', name))
+ else:
+ return realpath(os.path.join(sys._MEIPASS, name))
else:
return realpath(os.path.join(dirname(realpath(__file__)), '..', '..', name))