Browse Source

Fix CuraVerison.py configuration

Lipu Fei 5 years ago
parent
commit
b463b0c35b
3 changed files with 7 additions and 4 deletions
  1. 2 0
      CMakeLists.txt
  2. 5 1
      cura/ApplicationMetadata.py
  3. 0 3
      cura/CuraVersion.py.in

+ 2 - 0
CMakeLists.txt

@@ -24,6 +24,8 @@ set(CURA_CLOUD_API_ROOT "" CACHE STRING "Alternative Cura cloud API root")
 set(CURA_CLOUD_API_VERSION "" CACHE STRING "Alternative Cura cloud API version")
 
 configure_file(${CMAKE_SOURCE_DIR}/cura.desktop.in ${CMAKE_BINARY_DIR}/cura.desktop @ONLY)
+
+
 configure_file(cura/CuraVersion.py.in CuraVersion.py @ONLY)
 
 

+ 5 - 1
cura/ApplicationMetadata.py

@@ -9,6 +9,7 @@ DEFAULT_CURA_DISPLAY_NAME = "Ultimaker Cura"
 DEFAULT_CURA_VERSION = "master"
 DEFAULT_CURA_BUILD_TYPE = ""
 DEFAULT_CURA_DEBUG_MODE = False
+DEFAULT_CURA_SDK_VERSION = "6.1.0"
 
 try:
     from cura.CuraVersion import CuraAppName  # type: ignore
@@ -41,4 +42,7 @@ try:
 except ImportError:
     CuraDebugMode = DEFAULT_CURA_DEBUG_MODE
 
-from cura.CuraVersion import CuraSDKVersion  # type: ignore
+# Each release has a fixed SDK version coupled with it. It doesn't make sense to make it configurable because, for
+# example Cura 3.2 with SDK version 6.1 will not work. So the SDK version is hard-coded here and left out of the
+# CuraVersion.py.in template.
+CuraSDKVersion = "6.1.0"

+ 0 - 3
cura/CuraVersion.py.in

@@ -6,9 +6,6 @@ CuraAppDisplayName = "@CURA_APP_DISPLAY_NAME@"
 CuraVersion = "@CURA_VERSION@"
 CuraBuildType = "@CURA_BUILDTYPE@"
 CuraDebugMode = True if "@_cura_debugmode@" == "ON" else False
-
-CuraSDKVersion = "6.1.0"
-
 CuraCloudAPIRoot = "@CURA_CLOUD_API_ROOT@"
 CuraCloudAPIVersion = "@CURA_CLOUD_API_VERSION@"
 CuraCloudAccountAPIRoot = "@CURA_CLOUD_ACCOUNT_API_ROOT@"