From 0f6f18e7ddb2db7f9b9851938467070ce5c9ae6b Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 5 Feb 2024 11:30:15 +0100 Subject: [PATCH] Clean up some paths CURA-11483 --- cura/CuraApplication.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 827f0d8598..241113ece7 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -374,14 +374,15 @@ class CuraApplication(QtApplication): app_root = os.path.abspath(os.path.join(os.path.dirname(sys.executable))) - Resources.addSecureSearchPath(os.path.join(app_root, "share", "cura", "resources")) - Resources.addSecureSearchPath(os.path.join(app_root, "Resources", "share", "cura", "resources")) - Resources.addSecureSearchPath(os.path.join(app_root, "..", "Resources", "share", "cura", "resources")) - - Resources.addSecureSearchPath(os.path.join(self._app_install_dir, "share", "cura", "resources")) - Resources.addSecureSearchPath(os.path.join(self._app_install_dir, "Resources", "share", "cura", "resources")) - Resources.addSecureSearchPath( - os.path.join(self._app_install_dir, "..", "Resources", "share", "cura", "resources")) + if platform.system() == "Darwin": + Resources.addSecureSearchPath(os.path.join(app_root, "Resources", "share", "cura", "resources")) + Resources.addSecureSearchPath(os.path.join(app_root, "..", "Resources", "share", "cura", "resources")) + Resources.addSecureSearchPath( + os.path.join(self._app_install_dir, "..", "Resources", "share", "cura", "resources")) + else: + Resources.addSecureSearchPath(os.path.join(app_root, "share", "cura", "resources")) + Resources.addSecureSearchPath(os.path.join(self._app_install_dir, "share", "cura", "resources")) + Resources.addSecureSearchPath(os.path.join(app_root, "Resources", "share", "cura", "resources")) if not hasattr(sys, "frozen"): cura_data_root = os.environ.get('CURA_DATA_ROOT', None) @@ -396,7 +397,6 @@ class CuraApplication(QtApplication): # venv site-packages Resources.addSearchPath(os.path.join(app_root, "..", "share", "cura", "resources")) - Resources.addSearchPath(os.path.join(app_root, "..", "Resources", "share", "cura", "resources")) @classmethod def _initializeSettingDefinitions(cls):