Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 15 additions & 19 deletions .github/actions/qt-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
version:
description: Qt Version
required: false
default: 6.8.3
default: 6.10.0
abis:
description: ABIs to Build
required: false
Expand All @@ -33,9 +33,10 @@ runs:

- name: Setup Android Environment
uses: android-actions/setup-android@v3
id: setup-android
with:
cmdline-tools-version: 12266719
packages: 'platform-tools platforms;android-36 build-tools;36.0.0' # ndk;26.1.10909125,27.2.12479018'
cmdline-tools-version: 13114758
packages: 'platform-tools platforms;android-35 build-tools;35.0.0' # ndk;27.2.12479018'
log-accepted-android-sdk-licenses: false

- name: Install Android NDK
Expand All @@ -44,17 +45,21 @@ runs:
with:
ndk-version: r27c
add-to-path: false
local-cache: true

- run: |
- name: Update Android SDK / NDK / Tools
shell: bash
run: |
echo "ANDROID_NDK_ROOT=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV"
echo "ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV"
echo "ANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV"
shell: bash

- name: Update Android SDK / NDK / Tools
if: runner.os != 'Windows'
run: sdkmanager --update
shell: bash
if [[ "$RUNNER_OS" == "Windows" ]]; then
"${ANDROID_SDK_ROOT}"/cmdline-tools/latest/bin/sdkmanager.bat --update
"${GITHUB_WORKSPACE}"/android/gradlew.bat --version
else
sdkmanager --update
"${GITHUB_WORKSPACE}"/android/gradlew --version
fi

- name: Setup Caching
uses: ./.github/actions/cache
Expand Down Expand Up @@ -127,12 +132,3 @@ runs:
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
setup-python: false
cache: true

- name: Build Info
shell: bash
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
"${GITHUB_WORKSPACE}"/android/gradlew.bat --version
else
"${GITHUB_WORKSPACE}"/android/gradlew --version
fi
2 changes: 1 addition & 1 deletion .github/workflows/android-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
fail-fast: false
matrix:
build_type: [Release]
qt_version: [6.8.3]
qt_version: [6.10.0]

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

env:
ARTIFACT: QGroundControl.apk
QT_VERSION: 6.8.3
QT_VERSION: 6.10.0
QT_ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/deploy/android/android_release.keystore
QT_ANDROID_KEYSTORE_ALIAS: QGCAndroidKeyStore
QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

env:
ARTIFACT: QGroundControl.apk
QT_VERSION: 6.8.3
QT_VERSION: 6.10.0
QT_ANDROID_KEYSTORE_PATH: ${{ github.workspace }}\deploy\android\android_release.keystore
QT_ANDROID_KEYSTORE_ALIAS: QGCAndroidKeyStore
QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
shell: cmd

env:
QT_VERSION: 6.8.3
QT_VERSION: 6.10.0
GST_VERSION: 1.22.12

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
env:
ARTIFACT: QGroundControl.app
PACKAGE: QGroundControl
QT_VERSION: 6.8.3
QT_VERSION: 6.10.0

steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
shell: bash

env:
QT_VERSION: 6.8.3
QT_VERSION: 6.10.0

steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lupdate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install Qt for Linux
uses: jurplel/install-qt-action@v4
with:
version: 6.8.3
version: 6.10.0
cache: true

- name: Update translation files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
shell: bash

env:
QT_VERSION: 6.8.3
QT_VERSION: 6.10.0

steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
shell: cmd

env:
QT_VERSION: 6.8.3
QT_VERSION: 6.10.0

steps:
- name: Checkout repo
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,6 @@ docs/.vitepress/dist/

CMakeUserPresets.json
cpm_modules

.qtcreator/
.claude/
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ include(Toolchain)
# ----------------------------------------------------------------------------
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIG>/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIG>")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIG>")
if(ANDROID)
set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
else()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIG>")
endif()

# ----------------------------------------------------------------------------
# CMake Policies
Expand All @@ -146,6 +150,8 @@ endif()
# Qt6 Configuration
# ============================================================================

set(QT_NO_PRIVATE_MODULE_WARNING ON)

find_package(Qt6
${QGC_QT_MINIMUM_VERSION}...${QGC_QT_MAXIMUM_VERSION}
REQUIRED
Expand All @@ -157,6 +163,7 @@ find_package(Qt6
Gui
LinguistTools
Location
LocationPrivate
Multimedia
Network
Positioning
Expand Down Expand Up @@ -282,6 +289,10 @@ qt_add_translations(${CMAKE_PROJECT_NAME}
LUPDATE_OPTIONS -no-obsolete
TS_FILE_DIR "${CMAKE_SOURCE_DIR}/translations"
TS_FILE_BASE ${CMAKE_PROJECT_NAME}
# TS_FILES_OUTPUT_VARIABLE _ts_files_generated
# TS_OUTPUT_DIRECTORY "{CMAKE_SOURCE_DIR}/translations"
# QM_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/i18n"
# MERGE_QT_TRANSLATIONS
)

# ----------------------------------------------------------------------------
Expand Down
13 changes: 1 addition & 12 deletions android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@

<!-- %%INSERT_PERMISSIONS -->

<uses-permission android:name="android.permission.USB_PERMISSION" />
<!-- Need MulticastLock to receive broadcast UDP packets -->
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<!-- Needed to keep working while 'asleep' -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- Needed for read/write to SD Card Path in AppSettings -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- For Android 11+ (API 30+), MANAGE_EXTERNAL_STORAGE is needed for full SD card access -->
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />

<!-- %%INSERT_FEATURES -->

<uses-feature android:name="android.hardware.audio.output" android:required="false" />
Expand All @@ -41,7 +30,7 @@
android:requestLegacyExternalStorage="true"
android:allowBackup="true"
android:fullBackupOnly="false"
android:icon="@drawable/icon"
android:icon="-- %%INSERT_APP_ICON%% --"
android:usesCleartextTraffic="true"
android:networkSecurityConfig="@xml/network_security_config">
<!-- android:theme="@style/AppTheme" -->
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ android {
ndkVersion = androidNdkVersion

// Extract native libraries from the APK
packagingOptions.jniLibs.useLegacyPackaging = true
// packagingOptions.jniLibs.useLegacyPackaging = true

sourceSets {
main {
Expand All @@ -66,7 +66,7 @@ android {

tasks.withType(JavaCompile) {
options.incremental = true
// options.compilerArgs += ['-Xlint:deprecation']
options.compilerArgs += ['-Xlint:all'] // deprecation
}

buildFeatures {
Expand Down
2 changes: 1 addition & 1 deletion android/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="devices">USB Devices</string>
<string name="CdcAcm">CDC ACM USB Device</string>
<string name="ChromeCcd">Chrome CCD USB Device</string>
Expand Down
7 changes: 7 additions & 0 deletions android/res/xml/qtprovider_paths.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<!-- For getFilesDirectory() -->
<files-path name="files_path" path="/"/>
<!-- For getExternalStorageDirectory() -->
<external-path name="external_path" path="/"/>
<!-- For getExternalFilesDir() -->
<external-files-path name="external_files_path" path="/"/>
<!-- For getExternalCacheDir() -->
<external-cache-path name="external_cache_path" path="/"/>
</paths>
5 changes: 3 additions & 2 deletions cmake/CustomOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ option(QGC_DISABLE_PX4_PLUGIN_FACTORY "Disable PX4 plugin factory" OFF)
# ----------------------------------------------------------------------------
# Android Platform
# ----------------------------------------------------------------------------
set(QGC_QT_ANDROID_TARGET_SDK_VERSION "36" CACHE STRING "Android target SDK version")
set(QGC_QT_ANDROID_COMPILE_SDK_VERSION "35" CACHE STRING "Android compile SDK version")
set(QGC_QT_ANDROID_TARGET_SDK_VERSION "35" CACHE STRING "Android target SDK version")
set(QGC_QT_ANDROID_MIN_SDK_VERSION "28" CACHE STRING "Android minimum SDK version")
set(QGC_ANDROID_PACKAGE_NAME "${QGC_PACKAGE_NAME}" CACHE STRING "Android package identifier")
set(QGC_ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/android" CACHE PATH "Android package source directory")
Expand Down Expand Up @@ -134,7 +135,7 @@ set(QGC_WINDOWS_RESOURCE_FILE_PATH "${CMAKE_SOURCE_DIR}/deploy/windows/QGroundCo
# Qt Configuration
# ============================================================================

set(QGC_QT_MINIMUM_VERSION "6.8.3" CACHE STRING "Minimum supported Qt version")
set(QGC_QT_MINIMUM_VERSION "6.10.0" CACHE STRING "Minimum supported Qt version")
set(QGC_QT_MAXIMUM_VERSION "6.10.0" CACHE STRING "Maximum supported Qt version")

set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml" CACHE PATH "QML output directory")
Expand Down
60 changes: 54 additions & 6 deletions cmake/platform/Android.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ endif()
# ----------------------------------------------------------------------------
# Android NDK Version Validation
# ----------------------------------------------------------------------------
if(Qt6_VERSION VERSION_EQUAL "6.8.3")
if(NOT CMAKE_ANDROID_NDK_VERSION VERSION_EQUAL "26.1" AND NOT CMAKE_ANDROID_NDK_VERSION VERSION_EQUAL "27.2")
message(FATAL_ERROR "QGC: Invalid NDK Version: ${CMAKE_ANDROID_NDK_VERSION}. Qt 6.8.3 requires NDK 26.1 or 27.2")
if(Qt6_VERSION VERSION_EQUAL "6.10.0")
if(NOT CMAKE_ANDROID_NDK_VERSION VERSION_EQUAL "27.2")
message(FATAL_ERROR "QGC: Invalid NDK Version: ${CMAKE_ANDROID_NDK_VERSION}. Qt 6.10.0 requires NDK 27.2")
endif()
endif()

Expand Down Expand Up @@ -64,13 +64,13 @@ set_target_properties(${CMAKE_PROJECT_NAME}
# QT_ANDROID_SDK_BUILD_TOOLS_REVISION
QT_ANDROID_MIN_SDK_VERSION ${QGC_QT_ANDROID_MIN_SDK_VERSION}
QT_ANDROID_TARGET_SDK_VERSION ${QGC_QT_ANDROID_TARGET_SDK_VERSION}
# QT_ANDROID_COMPILE_SDK_VERSION
QT_ANDROID_COMPILE_SDK_VERSION ${QGC_QT_ANDROID_COMPILE_SDK_VERSION}
QT_ANDROID_PACKAGE_NAME "${QGC_ANDROID_PACKAGE_NAME}"
QT_ANDROID_PACKAGE_SOURCE_DIR "${QGC_ANDROID_PACKAGE_SOURCE_DIR}"
QT_ANDROID_VERSION_NAME "${CMAKE_PROJECT_VERSION}"
QT_ANDROID_VERSION_CODE ${ANDROID_VERSION_CODE}
# QT_ANDROID_APP_NAME
# QT_ANDROID_APP_ICON
QT_ANDROID_APP_NAME "${CMAKE_PROJECT_NAME}"
QT_ANDROID_APP_ICON "@drawable/icon"
# QT_QML_IMPORT_PATH
QT_QML_ROOT_PATH "${CMAKE_SOURCE_DIR}"
# QT_ANDROID_SYSTEM_LIBS_PREFIX
Expand Down Expand Up @@ -98,4 +98,52 @@ else()
message(WARNING "QGC: Failed to add Android OpenSSL libraries")
endif()

# ----------------------------------------------------------------------------
# Android Permissions
# ----------------------------------------------------------------------------

if(QGC_ENABLE_BLUETOOTH)
qt_add_android_permission(${CMAKE_PROJECT_NAME}
NAME android.permission.BLUETOOTH_SCAN
ATTRIBUTES
minSdkVersion 31
usesPermissionFlags neverForLocation
)
qt_add_android_permission(${CMAKE_PROJECT_NAME}
NAME android.permission.BLUETOOTH_CONNECT
ATTRIBUTES
minSdkVersion 31
usesPermissionFlags neverForLocation
)
endif()

if(NOT QGC_NO_SERIAL_LINK)
qt_add_android_permission(${CMAKE_PROJECT_NAME}
NAME android.permission.USB_PERMISSION
)
endif()

# Need MulticastLock to receive broadcast UDP packets
qt_add_android_permission(${CMAKE_PROJECT_NAME}
NAME android.permission.CHANGE_WIFI_MULTICAST_STATE
)

# Needed to keep working while 'asleep'
qt_add_android_permission(${CMAKE_PROJECT_NAME}
NAME android.permission.WAKE_LOCK
)

# Needed for read/write to SD Card Path in AppSettings
qt_add_android_permission(${CMAKE_PROJECT_NAME}
NAME android.permission.WRITE_EXTERNAL_STORAGE
)
qt_add_android_permission(${CMAKE_PROJECT_NAME}
NAME android.permission.READ_EXTERNAL_STORAGE
ATTRIBUTES
maxSdkVersion 33
)
qt_add_android_permission(${CMAKE_PROJECT_NAME}
NAME android.permission.MANAGE_EXTERNAL_STORAGE
)

message(STATUS "QGC: Android platform configuration applied")
4 changes: 4 additions & 0 deletions cmake/platform/Windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,8 @@ else()
message(WARNING "QGC: No Windows resource file found")
endif()

if(MSVC)
# qt_add_win_app_sdk(${CMAKE_PROJECT_NAME} PRIVATE)
endif()

message(STATUS "QGC: Windows platform configuration applied")
2 changes: 1 addition & 1 deletion deploy/docker/Dockerfile-build-android
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN mkdir -p $ANDROID_SDK_ROOT/cmdline-tools/latest && \
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools" "platforms;android-35" "build-tools;35.0.0" "ndk;26.1.10909125"

# Qt setup and environment variables
ENV QT_VERSION="6.8.3"
ENV QT_VERSION="6.10.0"
ENV QT_PATH="/opt/Qt"
ENV QT_HOST="linux"
ENV QT_HOST_ARCH="gcc_64"
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker/Dockerfile-build-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN chmod +x /tmp/qt/*.sh && \
/tmp/qt/install-qt-debian.sh && \
rm -rf /tmp/qt # keep the image slim

ENV QT_ROOT_DIR=/opt/Qt/6.8.3/gcc_64
ENV QT_ROOT_DIR=/opt/Qt/6.10.0/gcc_64
ENV PATH=$QT_ROOT_DIR/bin:$PATH

# ---------- Git safe directory (avoids “detected dubious ownership”) ----------
Expand Down
2 changes: 1 addition & 1 deletion deploy/linux/appimagecraft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build:
cmake:
source_dir: src/
extra_variables:
- Qt6_ROOT=/home/runner/work/_temp/Qt/6.8.3/gcc_64
- Qt6_ROOT=/home/runner/work/_temp/Qt/6.10.0/gcc_64
environment:
BUILD_TYPE: Release

Expand Down
Loading
Loading