From ed3f342e7f7c42fc859a287cf91da97e743150db Mon Sep 17 00:00:00 2001 From: "j.spijker@ultimaker.com" Date: Wed, 29 Jun 2022 15:48:04 +0200 Subject: [PATCH] Search unsecure when not frozen Also added share//resources releative to sys.executable Contributes to CURA-9365 --- cura/CuraApplication.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index fbc208b423..dd67e48c20 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -355,9 +355,14 @@ class CuraApplication(QtApplication): Resources.addSecureSearchPath(os.path.join(self._app_install_dir, "share", "cura", "resources")) if not hasattr(sys, "frozen"): - Resources.addSecureSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")) - Resources.addSecureSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "..", "resources")) - Resources.addSecureSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "..", "plugins")) + Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")) + + # local Conan cache + Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "..", "resources")) + Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "..", "plugins")) + + # venv site-packages + Resources.addSearchPath(os.path.join(os.path.dirname(sys.executable), "..", "share", "cura", "resources")) @classmethod def _initializeSettingDefinitions(cls):