Adding a field of the build type to the spashscreen.

For example, if the community distributes Cura in a different way, they
can set CURA_BUILDTYPE via 'cmake -DCURA_BUILDTYPE=' and whenever Cura
is launched " (PPA)" will be appended. Of course, this could be done by
appending " (PPA)" to CURA_VERSION, but in case of my Ubuntu/Debian
packaging it will only need one modification in debian/changelog to
change the version. During build (debian/rules) this version will be
read from debian/changelog.
Changing the version number across different files, is a waste of time.

Finally, we can use that field in the future to indicate debug or other
other special builds.
This commit is contained in:
Thomas Karl Pietrowski 2016-06-04 13:55:35 +02:00
parent 15f84c758b
commit c62ab6e937
4 changed files with 8 additions and 2 deletions

View file

@ -21,6 +21,9 @@ class CuraSplashScreen(QSplashScreen):
painter.setPen(QColor(0, 0, 0, 255))
version = Application.getInstance().getVersion().split("-")
buildtype = Application.getInstance().getBuildType()
if buildtype:
version += " (%s)" %(buildtype)
painter.setFont(QFont("Proxima Nova Rg", 20 ))
painter.drawText(0, 0, 330 * self._scale, 230 * self._scale, Qt.AlignHCenter | Qt.AlignBottom, version[0])