diff --git a/mainwindow.cpp b/mainwindow.cpp index 09cc827c8..277d6a2b1 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -55,7 +55,7 @@ MainWindow* mainWindow; QTimer autorecovery_timer; QString config_fn; -QString appName = "Olive (January 2019 | Alpha)"; +QString appName; bool demoNoticeShown = false; void MainWindow::setup_layout(bool reset) { @@ -94,6 +94,13 @@ void MainWindow::setup_layout(bool reset) { MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { + appName = "Olive (January 2019 | Alpha"; +#ifdef GITHASH + appName += " | "; + appName += GITHASH; +#endif + appName += ")"; + enable_launch_with_project = false; setup_debug(); diff --git a/olive.pro b/olive.pro index d690c4821..48ed5688a 100644 --- a/olive.pro +++ b/olive.pro @@ -27,6 +27,11 @@ DEFINES += QT_DEPRECATED_WARNINGS # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 +# Tries to get the current Git short hash +system("which git") { + GITHASHVAR = $$system(git --git-dir $$PWD/.git --work-tree $$PWD log -1 --format=%h) + DEFINES += GITHASH=\\"\"$$GITHASHVAR\\"\" +} SOURCES += \ main.cpp \