Add reporting thread and defines for output of versions and build dates/times.

This commit is contained in:
Gerhard Hoffmann 2023-12-20 16:48:57 +01:00
parent ba99795bf3
commit fafea93a62

View File

@ -1,9 +1,35 @@
TEMPLATE = lib
TARGET = CAslave
VERSION="1.0.0"
VERSION="1.0.1"
HEADERS += \
../include/reporting_thread.h
SOURCES += \
../src/reporting_thread.cpp
include(../DCLibraries.pri)
win32 {
BUILD_DATE=$$system("date /t")
BUILD_TIME=$$system("time /t")
GIT_COMMIT=""
EXTENDED_VERSION=""
EXTENDED_VERSION_LIB=""
} else {
BUILD_DATE=$$system("date +%d-%m-%y")
BUILD_TIME=$$system("date +%H:%M:%S")
GIT_COMMIT=$$system("git log -1 --format=oneline . | cut -d' ' -f1")
EXTENDED_VERSION_LIB_="libCAslave-$${VERSION}-$${GIT_COMMIT}"
}
DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
DEFINES+=APP_BUILD_TIME=\\\"$$BUILD_TIME\\\"
DEFINES+=APP_EXTENDED_VERSION=\\\"$$EXTENDED_VERSION\\\"
DEFINES+=APP_EXTENDED_VERSION_LIB=\\\"$$EXTENDED_VERSION_LIB\\\"
DEFINES+=THIS_IS_CA_SLAVE
DESTDIR=$${_PRO_FILE_PWD_}/../build