From 41ace3a9e53b52b4271554d7aedd88d533ee5f5e Mon Sep 17 00:00:00 2001 From: rejbasket <39080670+rejbasket@users.noreply.github.com> Date: Wed, 8 Dec 2021 22:18:41 +0100 Subject: add macOS and windows installer (#1352) --- lib/utils/paths.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) mode change 100644 => 100755 lib/utils/paths.py (limited to 'lib/utils/paths.py') diff --git a/lib/utils/paths.py b/lib/utils/paths.py old mode 100644 new mode 100755 index 938c5f33..2a95f6e7 --- 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)) -- cgit v1.2.3