summaryrefslogtreecommitdiff
path: root/lib/utils
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
parent49d0f88278798a6c061ce70dd6c1aafb0b1f7a6a (diff)
add macOS and windows installer (#1352)
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):