2024-05-05 17:23:08 +02:00
|
|
|
QT += core gui
|
|
|
|
QT += widgets serialport network
|
2024-02-29 11:36:24 +01:00
|
|
|
|
|
|
|
TARGET = ATBDownloadDCFirmware
|
|
|
|
|
|
|
|
VERSION="0.1.0"
|
|
|
|
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}"
|
|
|
|
|
2024-05-14 16:38:19 +02:00
|
|
|
!contains(CONFIG, INCLUDEINTERFACES) {
|
|
|
|
INCLUDEINTERFACES=/opt/ptu5/opt/DCLibraries/include
|
|
|
|
}
|
|
|
|
|
|
|
|
INCLUDEPATH += \
|
|
|
|
plugins \
|
|
|
|
$${INCLUDEINTERFACES} \
|
|
|
|
$${_PRO_FILE_PWD_}/../UpdatePTUDevCtrl \
|
|
|
|
$${_PRO_FILE_PWD_}/../common/include
|
|
|
|
|
2024-02-29 11:36:24 +01:00
|
|
|
CONFIG += c++17
|
|
|
|
|
|
|
|
DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
|
|
|
|
DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
|
|
|
|
DEFINES+=APP_BUILD_TIME=\\\"$$BUILD_TIME\\\"
|
|
|
|
DEFINES+=APP_EXTENDED_VERSION=\\\"$$EXTENDED_VERSION\\\"
|
|
|
|
|
|
|
|
# keep comments, as /* fall through */
|
|
|
|
QMAKE_CXXFLAGS += -C
|
|
|
|
QMAKE_CXXFLAGS += -g
|
|
|
|
QMAKE_CXXFLAGS += -Wno-deprecated-copy -O
|
|
|
|
|
|
|
|
contains( CONFIG, PTU5 ) {
|
|
|
|
greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
|
|
|
|
CONFIG += link_pkgconfig
|
|
|
|
lessThan(QT_MAJOR_VERSION, 5): PKGCONFIG += qextserialport
|
|
|
|
QMAKE_CXXFLAGS += -O2 -std=c++17 # for GCC >= 4.7
|
|
|
|
# QMAKE_CXXFLAGS += -Wno-deprecated-copy
|
2024-03-19 09:30:20 +01:00
|
|
|
PTU5BASEPATH = /opt/devel/ptu5
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PTU5BASEPATH/qt/libs/devicecontroller/include
|
|
|
|
LIBS += -L$$PTU5BASEPATH/qt/libs/devicecontroller/library
|
|
|
|
|
2024-02-29 11:36:24 +01:00
|
|
|
ARCH = PTU5
|
|
|
|
DEFINES+=PTU5
|
|
|
|
}
|
|
|
|
contains( CONFIG, PTU5_YOCTO ) {
|
|
|
|
greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
|
|
|
|
QMAKE_CXXFLAGS += -std=c++17 # for GCC >= 4.7
|
|
|
|
# QMAKE_CXXFLAGS += -Wno-deprecated-copy
|
|
|
|
PTU5BASEPATH = /opt/devel/ptu5
|
|
|
|
ARCH = PTU5
|
|
|
|
DEFINES+=PTU5
|
|
|
|
|
|
|
|
# add qmqtt lib
|
|
|
|
#LIBS += -lQt5Qmqtt
|
|
|
|
}
|
|
|
|
contains( CONFIG, DesktopLinux ) {
|
|
|
|
greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
|
|
|
|
lessThan(QT_MAJOR_VERSION, 5): CONFIG += extserialport
|
|
|
|
# QMAKE_CC = ccache $$QMAKE_CC
|
|
|
|
# QMAKE_CXX = ccache $$QMAKE_CXX
|
|
|
|
QMAKE_CXXFLAGS += -std=c++17
|
|
|
|
# QMAKE_CXXFLAGS += -Wno-deprecated-copy
|
|
|
|
linux-clang { QMAKE_CXXFLAGS += -Qunused-arguments }
|
|
|
|
ARCH = DesktopLinux
|
|
|
|
DEFINES+=DesktopLinux
|
|
|
|
}
|
|
|
|
|
|
|
|
SOURCES += \
|
2024-05-05 17:23:08 +02:00
|
|
|
main.cpp \
|
|
|
|
mainwindow.cpp \
|
2024-05-14 16:38:19 +02:00
|
|
|
../common/src/message_handler.cpp \
|
|
|
|
../UpdatePTUDevCtrl/commandline_parser.cpp \
|
|
|
|
update.cpp \
|
|
|
|
dc_download.cpp \
|
|
|
|
../common/src/System.cpp
|
|
|
|
|
2024-05-05 17:23:08 +02:00
|
|
|
|
|
|
|
HEADERS += \
|
|
|
|
mainwindow.h \
|
2024-05-14 16:38:19 +02:00
|
|
|
../common/include/message_handler.h \
|
|
|
|
../UpdatePTUDevCtrl/commandline_parser.h \
|
|
|
|
update.h \
|
|
|
|
dc_download.h \
|
|
|
|
../common/include/System.h
|
|
|
|
|
2024-02-29 11:36:24 +01:00
|
|
|
|
|
|
|
OTHER_FILES += \
|
2024-05-14 16:38:19 +02:00
|
|
|
ATBDownloadDCFirmware.ini \
|
|
|
|
../ATBUpdateTool.ini
|
2024-02-29 11:36:24 +01:00
|
|
|
|
|
|
|
|
2024-05-05 17:23:08 +02:00
|
|
|
FORMS += \
|
|
|
|
mainwindow.ui
|
|
|
|
|
2024-02-29 11:36:24 +01:00
|
|
|
##########################################################################################
|
|
|
|
# for running program on target through QtCreator
|
|
|
|
contains( CONFIG, PTU5 ) {
|
|
|
|
qnx: target.path = /tmp/$${TARGET}/bin
|
|
|
|
else: unix:!android: target.path = /opt/app/tools/atbupdate/
|
|
|
|
!isEmpty(target.path): INSTALLS += target
|
|
|
|
}
|