From ba99795bf33194e664eee56fea9dc3f0628b282b Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Wed, 20 Dec 2023 16:47:59 +0100 Subject: [PATCH] Add download thread and define macros to output versions and build times. --- lib_ca_master/lib_ca_master.pro | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/lib_ca_master/lib_ca_master.pro b/lib_ca_master/lib_ca_master.pro index 9c4eaf1..b29764c 100644 --- a/lib_ca_master/lib_ca_master.pro +++ b/lib_ca_master/lib_ca_master.pro @@ -1,19 +1,40 @@ TEMPLATE = lib TARGET = CAmaster -VERSION="1.0.0" +VERSION="1.0.1" HEADERS += \ ../include/com.h \ ../include/datIf.h \ - ../include/prot.h + ../include/prot.h \ + ../include/download_thread.h SOURCES += \ ../src/com.cpp \ ../src/datIf.cpp \ - ../src/prot.cpp + ../src/prot.cpp \ + ../src/download_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="libCAmaster-$${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_MASTER DESTDIR=$${_PRO_FILE_PWD_}/../build