summaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils')
-rwxr-xr-x[-rw-r--r--]lib/utils/paths.py10
-rwxr-xr-x[-rw-r--r--]lib/utils/version.py5
2 files changed, 12 insertions, 3 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))
diff --git a/lib/utils/version.py b/lib/utils/version.py
index 2186ca23..0b46669a 100644..100755
--- a/lib/utils/version.py
+++ b/lib/utils/version.py
@@ -11,7 +11,10 @@ from ..i18n import _
def get_inkstitch_version():
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
- version = realpath(join(sys._MEIPASS, "..", "VERSION"))
+ if sys.platform == "darwin":
+ version = realpath(join(sys._MEIPASS, "..", 'Resources', "VERSION"))
+ else:
+ version = realpath(join(sys._MEIPASS, "..", "VERSION"))
else:
version = realpath(join(realpath(__file__), "..", "..", "..", 'VERSION'))
if isfile(version):