diff --git a/functions.h b/functions.h index e7e1e0c..bfc00d7 100644 --- a/functions.h +++ b/functions.h @@ -506,6 +506,8 @@ namespace { string_checkconfig_ro("/external_root/opt/isa/version"); global::systemInfoText.append(checkconfig_str_val); global::systemInfoText.append(""); + global::systemInfoText.append("
Git: "); + global::systemInfoText.append(GIT_VERSION); global::systemInfoText.append("
Device UID: "); global::systemInfoText.append(deviceUID); global::systemInfoText.append("
Kernel version: "); diff --git a/inkbox.pro b/inkbox.pro index b0482c8..127430b 100644 --- a/inkbox.pro +++ b/inkbox.pro @@ -6,6 +6,17 @@ CONFIG += c++11 c++17 QMAKE_CXXFLAGS += -Wno-unused-function -Wno-unused-parameter +# Thanks to https://github.com/mrbindraw/TestVersion/blob/master/TestVersion.pro +GIT_VERSION = $$system(git describe --always --tags) +COMMAND_REMOVE_MAKEFILES=$$quote(rm $$system_path($$OUT_PWD\Makefile*)) +PRE_BUILD_TARGET = .dummyfile +updatemakefiles.target = $$PRE_BUILD_TARGET +updatemakefiles.commands = $$COMMAND_REMOVE_MAKEFILES +updatemakefiles.depends = FORCE +PRE_TARGETDEPS += $$PRE_BUILD_TARGET +QMAKE_EXTRA_TARGETS += updatemakefiles +DEFINES += GIT_VERSION=\\\"$$GIT_VERSION\\\" + # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0