add meta-data json file

This commit is contained in:
Gerhard Hoffmann 2023-11-14 14:53:11 +01:00
parent ed8505c177
commit 078dd94e60

View File

@ -5,12 +5,8 @@ QT += serialport
INCLUDEPATH+=$$_PRO_FILE_PWD_
INCLUDEPATH+=$$_PRO_FILE_PWD_/support
INCLUDEPATH+=$$_PRO_FILE_PWD_/plugins
INCLUDEPATH+=$$_PRO_FILE_PWD_/include
INCLUDEPATH+=$$_PRO_FILE_PWD_/HMI
INCLUDEPATH+=$$_PRO_FILE_PWD_/HMI/screens
INCLUDEPATH+=$$_PRO_FILE_PWD_/HMI/support
INCLUDEPATH+=$$_PRO_FILE_PWD_/src
INCLUDEPATH+=$$_PRO_FILE_PWD_/src/ATBAPP
INCLUDEPATH+=$$_PRO_FILE_PWD_/src/ATBAPP/support
@ -21,12 +17,11 @@ QMAKE_CXXFLAGS += -Wno-deprecated-copy -O
# default
ARCH = PTU5
DEFINES+=ATB_QT_VERSION=\\\"5.11\\\"
contains( CONFIG, DesktopLinux ) {
QMAKE_CC = ccache $$QMAKE_CC
QMAKE_CXX = ccache $$QMAKE_CXX
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -std=c++17
# QMAKE_CXXFLAGS += -Wno-deprecated-ctor
linux-clang { QMAKE_CXXFLAGS += -Qunused-arguments }
ARCH = DesktopLinux
@ -35,7 +30,7 @@ contains( CONFIG, DesktopLinux ) {
contains( CONFIG, PTU5 ) {
# QMAKE_CC = ccache $$QMAKE_CC
# QMAKE_CXX = ccache $$QMAKE_CXX
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -std=c++17
linux-clang { QMAKE_CXXFLAGS += -Qunused-arguments }
CONFIG += link_pkgconfig
ARCH = PTU5
@ -57,6 +52,27 @@ INTERFACE_DEFINITION = $${PWD}/src/ATBAPP/VMCInterface.h
DEFINES += VMCPLUGIN_LIBRARY
win32 {
BUILD_DATE=$$system("date /t")
BUILD_TIME=$$system("time /t")
} 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="$${VERSION}-$${GIT_COMMIT}"
CONFIG += c++17
DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
DEFINES+=ATB_QT_VERSION=\\\"$${QT_VERSION}\\\"
DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
DEFINES+=APP_BUILD_TIME=\\\"$$BUILD_TIME\\\"
DEFINES+=APP_EXTENDED_VERSION=\\\"$$EXTENDED_VERSION\\\"
# Default rules for deployment.
#qnx: target.path = /tmp/$${TARGET}/bin
#else: unix:!android: target.path = /opt/$${TARGET}/bin
@ -83,16 +99,5 @@ SOURCES += \
src/ATBAPP/support/VMC/vmc.cpp \
src/ATBAPP/support/VendingData.cpp
DISTFILES += \
generate-version.sh
# Define how to create version.h
VERSION_H = $$PWD/include/version.h
version.output = $$PWD/include/version.h
version.commands = $$PWD/generate-version.sh $${ARCH} $${TARGET} $${INTERFACE} $${INTERFACE_DEFINITION} $${VERSION_H}
version.depends = FORCE
version.input = VERSION_H
version.variable_out = HEADERS
QMAKE_EXTRA_COMPILERS += version
QMAKE_CLEAN += $${PWD}/include/version.h
OTHER_FILES += \
plugins/metadata.json