From 8a482e328c7d95bde64a766c912aef738df5fc83 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Wed, 5 Feb 2025 16:23:14 +0100 Subject: [PATCH] directory for binary calling opkg-commands --- Opkg/Opkg.pro | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ Opkg/main.cpp | 14 ++++++++++ 2 files changed, 91 insertions(+) create mode 100644 Opkg/Opkg.pro create mode 100644 Opkg/main.cpp diff --git a/Opkg/Opkg.pro b/Opkg/Opkg.pro new file mode 100644 index 0000000..b980d76 --- /dev/null +++ b/Opkg/Opkg.pro @@ -0,0 +1,77 @@ +QT += core + +TARGET = ExecOpkgCmds + +VERSION="1.0.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}" + + +INCLUDEPATH += \ + plugins \ + $${INCLUDEINTERFACES} \ + $${_PRO_FILE_PWD_}/../UpdatePTUDevCtrl \ + $${_PRO_FILE_PWD_}/../common/include + +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 ) { + CONFIG += link_pkgconfig + QMAKE_CXXFLAGS += -O2 -std=c++17 # for GCC >= 4.7 + # QMAKE_CXXFLAGS += -Wno-deprecated-copy + PTU5BASEPATH = /opt/devel/ptu5 + + INCLUDEPATH += $$PTU5BASEPATH/qt/libs/devicecontroller/include + LIBS += -L$$PTU5BASEPATH/qt/libs/devicecontroller/library + + ARCH = PTU5 + DEFINES+=PTU5 +} +contains( CONFIG, PTU5_YOCTO ) { + QMAKE_CXXFLAGS += -std=c++17 # for GCC >= 4.7 + # QMAKE_CXXFLAGS += -Wno-deprecated-copy + PTU5BASEPATH = /opt/devel/ptu5 + ARCH = PTU5 + DEFINES+=PTU5 +} +contains( CONFIG, DesktopLinux ) { + # 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 += \ + main.cpp + +# HEADERS += \ + +########################################################################################## +# 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 +} diff --git a/Opkg/main.cpp b/Opkg/main.cpp new file mode 100644 index 0000000..627d253 --- /dev/null +++ b/Opkg/main.cpp @@ -0,0 +1,14 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +int main(int argc, char **argv) { + return 0; +}