mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-29 17:45:45 +08:00
Merge branch 'thopiekar-master-buildtype-in-splashscreen'
This commit is contained in:
commit
0e09d4a349
@ -6,7 +6,8 @@ include(GNUInstallDirs)
|
|||||||
|
|
||||||
set(URANIUM_SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/../uranium/scripts" CACHE DIRECTORY "The location of the scripts directory of the Uranium repository")
|
set(URANIUM_SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/../uranium/scripts" CACHE DIRECTORY "The location of the scripts directory of the Uranium repository")
|
||||||
|
|
||||||
set(CURA_VERSION "2.1.2" CACHE STRING "Version name of Cura")
|
set(CURA_VERSION "master" CACHE STRING "Version name of Cura")
|
||||||
|
set(CURA_BUILDTYPE "" CACHE STRING "Build type of Cura, eg. 'PPA'")
|
||||||
configure_file(cura/CuraVersion.py.in CuraVersion.py @ONLY)
|
configure_file(cura/CuraVersion.py.in CuraVersion.py @ONLY)
|
||||||
|
|
||||||
# Macro needed to list all sub-directory of a directory.
|
# Macro needed to list all sub-directory of a directory.
|
||||||
|
@ -63,9 +63,10 @@ if platform.system() == "Linux": # Needed for platform.linux_distribution, which
|
|||||||
ctypes.CDLL(find_library('GL'), ctypes.RTLD_GLOBAL)
|
ctypes.CDLL(find_library('GL'), ctypes.RTLD_GLOBAL)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from cura.CuraVersion import CuraVersion
|
from cura.CuraVersion import CuraVersion, CuraBuildType
|
||||||
except ImportError:
|
except ImportError:
|
||||||
CuraVersion = "master" # [CodeStyle: Reflecting imported value]
|
CuraVersion = "master" # [CodeStyle: Reflecting imported value]
|
||||||
|
CuraBuildType = ""
|
||||||
|
|
||||||
|
|
||||||
class CuraApplication(QtApplication):
|
class CuraApplication(QtApplication):
|
||||||
@ -92,7 +93,7 @@ class CuraApplication(QtApplication):
|
|||||||
SettingDefinition.addSupportedProperty("global_only", DefinitionPropertyType.Function, default = False)
|
SettingDefinition.addSupportedProperty("global_only", DefinitionPropertyType.Function, default = False)
|
||||||
SettingDefinition.addSettingType("extruder", int, str, UM.Settings.Validator)
|
SettingDefinition.addSettingType("extruder", int, str, UM.Settings.Validator)
|
||||||
|
|
||||||
super().__init__(name = "cura", version = CuraVersion)
|
super().__init__(name = "cura", version = CuraVersion, build_type = CuraBuildType)
|
||||||
|
|
||||||
self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png")))
|
self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png")))
|
||||||
|
|
||||||
|
@ -21,6 +21,9 @@ class CuraSplashScreen(QSplashScreen):
|
|||||||
painter.setPen(QColor(0, 0, 0, 255))
|
painter.setPen(QColor(0, 0, 0, 255))
|
||||||
|
|
||||||
version = Application.getInstance().getVersion().split("-")
|
version = Application.getInstance().getVersion().split("-")
|
||||||
|
buildtype = Application.getInstance().getBuildType()
|
||||||
|
if buildtype:
|
||||||
|
version += " (%s)" %(buildtype)
|
||||||
|
|
||||||
painter.setFont(QFont("Proxima Nova Rg", 20 ))
|
painter.setFont(QFont("Proxima Nova Rg", 20 ))
|
||||||
painter.drawText(0, 0, 330 * self._scale, 230 * self._scale, Qt.AlignHCenter | Qt.AlignBottom, version[0])
|
painter.drawText(0, 0, 330 * self._scale, 230 * self._scale, Qt.AlignHCenter | Qt.AlignBottom, version[0])
|
||||||
|
@ -2,3 +2,4 @@
|
|||||||
# Cura is released under the terms of the AGPLv3 or higher.
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
CuraVersion = "@CURA_VERSION@"
|
CuraVersion = "@CURA_VERSION@"
|
||||||
|
CuraBuildType = "@CURA_BUILDTYPE@"
|
Loading…
x
Reference in New Issue
Block a user