Skip to content

Commit

Permalink
new approach to build date/time, sorry for the mess
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaspar Schmid committed Sep 21, 2015
1 parent 508c97e commit 523793c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
14 changes: 0 additions & 14 deletions ImagePlay/ImagePlay.pro
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,13 @@ QMAKE_TARGET_PRODUCT = "ImagePlay"
QMAKE_TARGET_DESCRIPTION = ""
QMAKE_TARGET_COPYRIGHT = ""

# this is hell, different locals and operating systems handle
# date and time differently
#win32 {
# BUILD_DATE = $$system("date /T")
# BUILD_TIME = $$system("time /T")
#} else {
# BUILD_DATE = $$system("date")
# BUILD_TIME = $$system("time")
#}

BUILD_DATE = "18.09.2015"

DEFINES += \
APP_VERSION=\"\\\"$$VERSION\\\"\" \
APP_COMPANY=\"\\\"$$QMAKE_TARGET_COMPANY\\\"\" \
APP_PRODUCT=\"\\\"$$QMAKE_TARGET_PRODUCT\\\"\" \
APP_DESCRIPTION=\"\\\"$$QMAKE_TARGET_DESCRIPTION\\\"\" \
APP_COPYRIGHT=\"\\\"$$QMAKE_TARGET_COPYRIGHT\\\"\" \
APP_NAME=\\\"$$TARGET\\\" \
#IMAGEPLAY_BUILDDATE=\"\\\"$$BUILD_DATE\\\"\" \
#IMAGEPLAY_VERSION=\\\"$$VERSION\\\"

message($$DEFINES)

Expand Down
6 changes: 3 additions & 3 deletions ImagePlay/include/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ class IPProcessGridScene;
// constants

#ifndef IMAGEPLAY_VERSION
#define IMAGEPLAY_VERSION "6.0.0"
#define IMAGEPLAY_VERSION "6.0.0-rc.0"
#endif

#ifndef IMAGEPLAY_BUILDDATE
#define IMAGEPLAY_BUILDDATE "UNKNOWN"
#define IMAGEPLAY_BUILDDATE __DATE__
#endif

#ifndef IMAGEPLAY_BUILDTIME
#define IMAGEPLAY_BUILDTIME ""
#define IMAGEPLAY_BUILDTIME __TIME__
#endif

#define MAX_RECENT_PROJECTS 10
Expand Down
4 changes: 2 additions & 2 deletions ImagePlay/src/AboutWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ AboutWindow::AboutWindow(QWidget *parent) :
{
ui->setupUi(this);

QString version("<b>Version: </b> %1, <b>Build Date: </b> %2");
QString version("<b>Version: </b> %1, <b>Build Date: </b> %2 %3");

ui->labelVersion->setText(version.arg(IMAGEPLAY_VERSION).arg(IMAGEPLAY_BUILDDATE));
ui->labelVersion->setText(version.arg(IMAGEPLAY_VERSION).arg(IMAGEPLAY_BUILDDATE).arg(IMAGEPLAY_BUILDTIME));
}

AboutWindow::~AboutWindow()
Expand Down

0 comments on commit 523793c

Please sign in to comment.