Merge branch 'CURA-9365_fix_building_cura_main' into 5.1

This commit is contained in:
Ghostkeeper 2022-06-30 17:48:38 +02:00
commit 83bad98ea3
No known key found for this signature in database
GPG key ID: 68F39EA88EEED5FF
51 changed files with 1970 additions and 285 deletions

View file

@ -6,7 +6,7 @@
# ---------
DEFAULT_CURA_APP_NAME = "cura"
DEFAULT_CURA_DISPLAY_NAME = "Ultimaker Cura"
DEFAULT_CURA_VERSION = "master"
DEFAULT_CURA_VERSION = "dev"
DEFAULT_CURA_BUILD_TYPE = ""
DEFAULT_CURA_DEBUG_MODE = False

View file

@ -136,7 +136,7 @@ class Backup:
return False
current_version = Version(self._application.getVersion())
version_to_restore = Version(self.meta_data.get("cura_release", "master"))
version_to_restore = Version(self.meta_data.get("cura_release", "dev"))
if current_version < version_to_restore:
# Cannot restore version newer than current because settings might have changed.

View file

@ -355,8 +355,14 @@ class CuraApplication(QtApplication):
Resources.addSecureSearchPath(os.path.join(self._app_install_dir, "share", "cura", "resources"))
if not hasattr(sys, "frozen"):
resource_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")
Resources.addSecureSearchPath(resource_path)
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):

View file

@ -100,6 +100,7 @@ class CuraPackageManager(PackageManager):
return package_id
Logger.error("Could not find package_id for file: {} with GUID: {} ".format(file_name, guid))
Logger.error(f"Bundled paths searched: {list(Resources.getSecureSearchPaths())}")
return ""
def getMachinesUsingPackage(self, package_id: str) -> Tuple[List[Tuple[GlobalStack, str, str]], List[Tuple[GlobalStack, str, str]]]:

View file

@ -1,13 +0,0 @@
# Copyright (c) 2020 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
CuraAppName = "@CURA_APP_NAME@"
CuraAppDisplayName = "@CURA_APP_DISPLAY_NAME@"
CuraVersion = "@CURA_VERSION@"
CuraBuildType = "@CURA_BUILDTYPE@"
CuraDebugMode = True if "@_cura_debugmode@" == "ON" else False
CuraCloudAPIRoot = "@CURA_CLOUD_API_ROOT@"
CuraCloudAPIVersion = "@CURA_CLOUD_API_VERSION@"
CuraCloudAccountAPIRoot = "@CURA_CLOUD_ACCOUNT_API_ROOT@"
CuraMarketplaceRoot = "@CURA_MARKETPLACE_ROOT@"
CuraDigitalFactoryURL = "@CURA_DIGITAL_FACTORY_URL@"