Search unsecure when not frozen

Also added share/<dep>/resources releative to sys.executable

Contributes to CURA-9365
This commit is contained in:
j.spijker@ultimaker.com 2022-06-29 15:48:04 +02:00 committed by Jelle Spijker
parent 2cee093d0b
commit ed3f342e7f

View File

@ -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):