Add download thread and define macros to output versions and build times.

This commit is contained in:
Gerhard Hoffmann 2023-12-20 16:47:59 +01:00
parent 135c508320
commit ba99795bf3

View File

@ -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