mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:29:02 +08:00
Merge pull request #12337 from Ultimaker/SEC-253_resource_preference_injection_5.0.0
[SEC-253] [CURA-8964] resource preference injection 5.0.0
This commit is contained in:
commit
c33a2b66cc
@ -257,6 +257,7 @@ class CuraApplication(QtApplication):
|
|||||||
|
|
||||||
from UM.CentralFileStorage import CentralFileStorage
|
from UM.CentralFileStorage import CentralFileStorage
|
||||||
CentralFileStorage.setIsEnterprise(ApplicationMetadata.IsEnterpriseVersion)
|
CentralFileStorage.setIsEnterprise(ApplicationMetadata.IsEnterpriseVersion)
|
||||||
|
Resources.setIsEnterprise(ApplicationMetadata.IsEnterpriseVersion)
|
||||||
|
|
||||||
@pyqtProperty(str, constant=True)
|
@pyqtProperty(str, constant=True)
|
||||||
def ultimakerCloudApiRootUrl(self) -> str:
|
def ultimakerCloudApiRootUrl(self) -> str:
|
||||||
@ -348,12 +349,12 @@ class CuraApplication(QtApplication):
|
|||||||
Resources.addExpectedDirNameInData(dir_name)
|
Resources.addExpectedDirNameInData(dir_name)
|
||||||
|
|
||||||
app_root = os.path.abspath(os.path.join(os.path.dirname(sys.executable)))
|
app_root = os.path.abspath(os.path.join(os.path.dirname(sys.executable)))
|
||||||
Resources.addSearchPath(os.path.join(app_root, "share", "cura", "resources"))
|
Resources.addSecureSearchPath(os.path.join(app_root, "share", "cura", "resources"))
|
||||||
|
|
||||||
Resources.addSearchPath(os.path.join(self._app_install_dir, "share", "cura", "resources"))
|
Resources.addSecureSearchPath(os.path.join(self._app_install_dir, "share", "cura", "resources"))
|
||||||
if not hasattr(sys, "frozen"):
|
if not hasattr(sys, "frozen"):
|
||||||
resource_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")
|
resource_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")
|
||||||
Resources.addSearchPath(resource_path)
|
Resources.addSecureSearchPath(resource_path)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _initializeSettingDefinitions(cls):
|
def _initializeSettingDefinitions(cls):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user