Browse Source

Make Cura app display name configurable

CURA-5842
Lipu Fei 6 years ago
parent
commit
ff4dfcf9a6
3 changed files with 5 additions and 2 deletions
  1. 1 0
      CMakeLists.txt
  2. 3 2
      cura/CuraApplication.py
  3. 1 0
      cura/CuraVersion.py.in

+ 1 - 0
CMakeLists.txt

@@ -17,6 +17,7 @@ if(CURA_DEBUGMODE)
     set(_cura_debugmode "ON")
 endif()
 
+set(CURA_APP_DISPLAY_NAME "Ultimaker Cura" CACHE STRING "Display name of Cura")
 set(CURA_VERSION "master" CACHE STRING "Version name of Cura")
 set(CURA_BUILDTYPE "" CACHE STRING "Build type of Cura, eg. 'PPA'")
 set(CURA_SDK_VERSION "" CACHE STRING "SDK version of Cura")

+ 3 - 2
cura/CuraApplication.py

@@ -128,8 +128,9 @@ if TYPE_CHECKING:
 numpy.seterr(all = "ignore")
 
 try:
-    from cura.CuraVersion import CuraVersion, CuraBuildType, CuraDebugMode, CuraSDKVersion
+    from cura.CuraVersion import CuraAppDisplayName, CuraVersion, CuraBuildType, CuraDebugMode, CuraSDKVersion
 except ImportError:
+    CuraAppDisplayName = "Ultimaker Cura"
     CuraVersion = "master"  # [CodeStyle: Reflecting imported value]
     CuraBuildType = ""
     CuraDebugMode = False
@@ -161,7 +162,7 @@ class CuraApplication(QtApplication):
 
     def __init__(self, *args, **kwargs):
         super().__init__(name = "cura",
-                         app_display_name = "Ultimaker Cura",
+                         app_display_name = CuraAppDisplayName,
                          version = CuraVersion,
                          buildtype = CuraBuildType,
                          is_debug_mode = CuraDebugMode,

+ 1 - 0
cura/CuraVersion.py.in

@@ -1,6 +1,7 @@
 # Copyright (c) 2015 Ultimaker B.V.
 # Cura is released under the terms of the LGPLv3 or higher.
 
+CuraAppDisplayName = "@CURA_APP_DISPLAY_NAME@"
 CuraVersion = "@CURA_VERSION@"
 CuraBuildType = "@CURA_BUILDTYPE@"
 CuraDebugMode = True if "@_cura_debugmode@" == "ON" else False