From f87af3f6eda5cc87678d3194c583029a34f19287 Mon Sep 17 00:00:00 2001 From: Holden Date: Wed, 10 Apr 2024 08:39:29 -0400 Subject: [PATCH] Android qmake fixes --- QGCCommon.pri | 2 +- android.pri | 62 +++++++++++++++++++++++----------------------- qgroundcontrol.pro | 1 - 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/QGCCommon.pri b/QGCCommon.pri index fcb766618fc..5041e7a889f 100644 --- a/QGCCommon.pri +++ b/QGCCommon.pri @@ -242,7 +242,7 @@ AndroidBuild { message(Android version info: $${ANDROID_VERSION_CODE} bitness:$${ANDROID_VERSION_BITNESS} major:$${MAJOR_VERSION} minor:$${MINOR_VERSION} patch:$${PATCH_VERSION} dev:$${DEV_VERSION}) - ANDROID_VERSION_NAME = APP_VERSION_STR + ANDROID_VERSION_NAME = $${APP_VERSION_STR} QMAKE_LFLAGS += -Wl,-Bsymbolic } diff --git a/android.pri b/android.pri index c95c598c2bf..fdd9c60e684 100644 --- a/android.pri +++ b/android.pri @@ -74,44 +74,44 @@ contains(DEFINES, NO_SERIAL_LINK) { # OTHER_FILES makes the specified files be visible in Qt Creator for editing -exists($$PWD/custom/android/AndroidManifest.xml) { - OTHER_FILES += \ - $$PWD/custom/android/AndroidManifest.xml +exists($$ANDROID_PACKAGE_CUSTOM_SOURCE_DIR/AndroidManifest.xml) { + DISTFILES += \ + $$ANDROID_PACKAGE_CUSTOM_SOURCE_DIR/AndroidManifest.xml } else { - OTHER_FILES += \ - $$PWD/android/AndroidManifest.xml + DISTFILES += \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/AndroidManifest.xml } -OTHER_FILES += \ - $$PWD/android/res/xml/device_filter.xml \ - $$PWD/android/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java \ - $$PWD/android/src/com/hoho/android/usbserial/driver/CommonUsbSerialDriver.java \ - $$PWD/android/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java \ - $$PWD/android/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java \ - $$PWD/android/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java \ - $$PWD/android/src/com/hoho/android/usbserial/driver/UsbId.java \ - $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialDriver.java \ - $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialProber.java \ - $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialRuntimeException.java \ - $$PWD/android/src/org/mavlink/qgroundcontrol/QGCActivity.java \ - $$PWD/android/src/org/mavlink/qgroundcontrol/UsbIoManager.java \ - $$PWD/android/src/org/freedesktop/gstreamer/androidmedia/GstAhcCallback.java \ - $$PWD/android/src/org/freedesktop/gstreamer/androidmedia/GstAhsCallback.java \ - $$PWD/android/src/org/freedesktop/gstreamer/androidmedia/GstAmcOnFrameAvailableListener.java - DISTFILES += \ - $$PWD/android/gradle/wrapper/gradle-wrapper.jar \ - $$PWD/android/gradlew \ - $$PWD/android/res/values/libs.xml \ - $$PWD/android/build.gradle \ - $$PWD/android/gradle/wrapper/gradle-wrapper.properties \ - $$PWD/android/gradlew.bat + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/build.gradle \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/gradle/wrapper/gradle-wrapper.jar \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/gradle/wrapper/gradle-wrapper.properties \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/gradlew \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/gradlew.bat \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/res/values/libs.xml \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/res/xml/device_filter.xml \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/res/xml/network_security_config.xml \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/res/xml/qtprovider_paths.xml \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/com/hoho/android/usbserial/driver/CommonUsbSerialDriver.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/com/hoho/android/usbserial/driver/UsbId.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/com/hoho/android/usbserial/driver/UsbSerialDriver.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/com/hoho/android/usbserial/driver/UsbSerialProber.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/com/hoho/android/usbserial/driver/UsbSerialRuntimeException.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/org/freedesktop/gstreamer/androidmedia/GstAhcCallback.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/org/freedesktop/gstreamer/androidmedia/GstAhsCallback.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/org/freedesktop/gstreamer/androidmedia/GstAmcOnFrameAvailableListener.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/org/mavlink/qgroundcontrol/QGCActivity.java \ + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/org/mavlink/qgroundcontrol/UsbIoManager.java SOURCES += \ - $$PWD/android/src/AndroidInterface.cc + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/AndroidInterface.cc HEADERS += \ - $$PWD/android/src/AndroidInterface.h + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src/AndroidInterface.h INCLUDEPATH += \ - $$PWD/android/src + $$ANDROID_PACKAGE_QGC_SOURCE_DIR/src diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index 97953e49275..677ff00a41e 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -1205,7 +1205,6 @@ AndroidBuild { contains (CONFIG, DISABLE_BUILTIN_ANDROID) { message("Skipping builtin support for Android") } else { - QT -= core-private include(android.pri) } }