diff --git a/.dockerignore b/.dockerignore index e2a1739156b..724cfc15826 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,3 +13,5 @@ docker-compose.yml # Ignore OS-specific files .DS_Store *.swp + +CMakeLists.txt.user* diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000000..791982fa7e5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: "💬 Developer Chat" + url: https://discord.gg/dronecode + about: "QGroundControl developers (and many regular/deeply-involved users) can be found on the #QGroundControl channel on the Dronecode Discord." diff --git a/.github/actions/qt-android/action.yml b/.github/actions/qt-android/action.yml index 00dcbab4f6f..e2e9990f449 100644 --- a/.github/actions/qt-android/action.yml +++ b/.github/actions/qt-android/action.yml @@ -56,6 +56,7 @@ runs: key: ${{ runner.os }}-Android-${{ matrix.BuildType }} max-size: 1G save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + verbose: 1 evict-old-files: 'job' - name: Install Qt for ${{ runner.os }} diff --git a/.github/actions/upload/action.yml b/.github/actions/upload/action.yml index a8ce9d9a974..13b3498cfb0 100644 --- a/.github/actions/upload/action.yml +++ b/.github/actions/upload/action.yml @@ -4,16 +4,15 @@ inputs: artifact_name: description: Artifact name required: true + package_name: + description: Package name + required: true aws_key_id: description: AWS access key ID required: false aws_secret_access_key: description: AWS secret access key required: false - source: - description: Source location - required: false - default: package github_token: description: GitHub Token required: false @@ -24,8 +23,8 @@ runs: - name: Save artifact uses: actions/upload-artifact@v4 with: - name: ${{ inputs.artifact_name }} - path: ${{ runner.temp }}/shadow_build_dir/${{ inputs.source }}/${{ inputs.artifact_name }} + name: ${{ inputs.package_name }} + path: ${{ runner.temp }}/shadow_build_dir/${{ inputs.artifact_name }} - name: Configure AWS Credentials if: ${{ github.event_name == 'push' && !github.event.pull_request.head.repo.fork && inputs.aws_key_id != '' && inputs.aws_secret_access_key != '' }} diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 62bd1393dfd..90d35da8c80 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,3 @@ ---- version: 2 updates: @@ -8,7 +7,6 @@ updates: interval: daily groups: github-actions: - update-types: - - patch - - minor + patterns: + - '*' open-pull-requests-limit: 5 diff --git a/.github/workflows/android-linux.yml b/.github/workflows/android-linux.yml index 64ade02b724..88a1f23d086 100644 --- a/.github/workflows/android-linux.yml +++ b/.github/workflows/android-linux.yml @@ -7,17 +7,16 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/linux.yml' - - '.github/workflows/macos.yml' - - '.github/workflows/windows.yml' + paths: + - '.github/workflows/android-linux.yml' + - 'deploy/android/**' + - 'src/**' + +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: build: @@ -33,6 +32,7 @@ jobs: env: ARTIFACT: QGroundControl.apk + PACKAGE: QGroundControl QT_VERSION: 6.8.1 GST_VERSION: 1.22.12 QT_ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/deploy/android/android_release.keystore @@ -42,12 +42,6 @@ jobs: QT_ANDROID_ABIS: ${{ matrix.BuildType == 'Release' && 'armeabi-v7a;arm64-v8a' || 'arm64-v8a' }} steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - android: 'false' - continue-on-error: true - - name: Checkout repo uses: actions/checkout@v4 with: @@ -97,9 +91,9 @@ jobs: uses: ./.github/actions/upload with: artifact_name: ${{ env.ARTIFACT }} + package_name: ${{ env.PACKAGE }} aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - source: '' github_token: ${{ secrets.GITHUB_TOKEN }} # - name: Deploy to Play Store diff --git a/.github/workflows/android-macos.yml b/.github/workflows/android-macos.yml index dae5c9a367f..03f8cef329f 100644 --- a/.github/workflows/android-macos.yml +++ b/.github/workflows/android-macos.yml @@ -3,6 +3,11 @@ name: Android-MacOS on: workflow_dispatch: +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + jobs: build: runs-on: macos-latest diff --git a/.github/workflows/android-windows.yml b/.github/workflows/android-windows.yml index 01bb551375d..1a9f580fc2b 100644 --- a/.github/workflows/android-windows.yml +++ b/.github/workflows/android-windows.yml @@ -7,17 +7,16 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/linux.yml' - - '.github/workflows/macos.yml' - - '.github/workflows/windows.yml' + paths: + - '.github/workflows/android-windows.yml' + - 'deploy/android/**' + - 'src/**' + +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: build: diff --git a/.github/workflows/custom.yml b/.github/workflows/custom.yml index 7ce2482e6a0..8ab5cb1ad88 100644 --- a/.github/workflows/custom.yml +++ b/.github/workflows/custom.yml @@ -7,19 +7,16 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/android.yml' - - '.github/workflows/linux.yml' - - '.github/workflows/macos.yml' + paths: + - 'src/**' + - 'custom-example/**' + - 'deploy/windows/**' + +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: build: @@ -84,6 +81,7 @@ jobs: max-size: 1G variant: sccache save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + verbose: 1 evict-old-files: 'job' - name: Install Qt for Windows (x64) diff --git a/.github/workflows/docker-linux.yml b/.github/workflows/docker-linux.yml index 0ebabcacbff..e4db0affca8 100644 --- a/.github/workflows/docker-linux.yml +++ b/.github/workflows/docker-linux.yml @@ -7,19 +7,16 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/android.yml' - - '.github/workflows/macos.yml' - - '.github/workflows/windows.yml' + paths: + - 'src/**' + - 'deploy/docker/**' + - 'deploy/linux/**' + +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: build: diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index eaef8e962a2..b22d761e53d 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -3,6 +3,11 @@ name: iOS on: workflow_dispatch: +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + jobs: build: runs-on: macos-latest @@ -17,6 +22,7 @@ jobs: env: ARTIFACT: QGroundControl.app + PACKAGE: QGroundControl QT_VERSION: 6.8.1 GST_VERSION: 1.22.12 @@ -28,10 +34,7 @@ jobs: brew uninstall google-chrome sudo rm -rf /Users/runner/Library/Android sudo rm -rf /Applications/Xcode_14* - sudo rm -rf /Applications/Xcode_15.0* - sudo rm -rf /Applications/Xcode_15.1* - sudo rm -rf /Applications/Xcode_15.2* - sudo rm -rf /Applications/Xcode_15.3* + sudo rm -rf /Applications/Xcode_15* ls /Applications df -h @@ -60,9 +63,11 @@ jobs: - name: Set Up Cache uses: hendrikmuhs/ccache-action@main with: + create-symlink: true key: ${{ runner.os }}-iOS-${{ matrix.BuildType }} max-size: 1G save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + verbose: 1 evict-old-files: 'job' - name: Install Qt for MacOS @@ -106,5 +111,5 @@ jobs: - name: Save App uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACT }} + name: ${{ env.PACKAGE }} path: ${{ runner.temp }}/shadow_build_dir/*.app diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index be4dd0feb25..513c2dc92af 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -7,19 +7,16 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/android.yml' - - '.github/workflows/macos.yml' - - '.github/workflows/windows.yml' + paths: + - '.github/workflows/linux.yml' + - 'deploy/linux/**' + - 'src/**' + +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: build: @@ -28,6 +25,7 @@ jobs: strategy: matrix: BuildType: [Debug, Release] + # Arch: [x64] # Arm64 defaults: run: @@ -35,16 +33,11 @@ jobs: env: ARTIFACT: QGroundControl-x86_64.AppImage + PACKAGE: QGroundControl-x86_64 QT_VERSION: 6.8.1 GST_VERSION: 1.22.12 steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - large-packages: false - continue-on-error: true - - name: Checkout repo uses: actions/checkout@v4 with: @@ -86,6 +79,7 @@ jobs: key: ${{ runner.os }}-${{ matrix.BuildType }} max-size: 1G save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + verbose: 1 evict-old-files: 'job' - name: Install Qt for Linux (x64) @@ -133,7 +127,7 @@ jobs: uses: ./.github/actions/upload with: artifact_name: ${{ env.ARTIFACT }} + package_name: ${{ env.PACKAGE }} aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - source: '' github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3b32b32ff90..11d9c42823a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -7,19 +7,16 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/android.yml' - - '.github/workflows/linux.yml' - - '.github/workflows/windows.yml' + paths: + - '.github/workflows/macos.yml' + - 'deploy/macos/**' + - 'src/**' + +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: build: @@ -35,6 +32,7 @@ jobs: env: ARTIFACT: QGroundControl.dmg + PACKAGE: QGroundControl QT_VERSION: 6.8.1 GST_VERSION: 1.22.12 @@ -75,6 +73,7 @@ jobs: key: ${{ runner.os }}-${{ matrix.BuildType }} max-size: 1G save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + verbose: 1 evict-old-files: 'job' - name: Install Qt @@ -117,7 +116,7 @@ jobs: uses: ./.github/actions/upload with: artifact_name: ${{ env.ARTIFACT }} + package_name: ${{ env.PACKAGE }} aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - source: '' github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 965daae8b96..92aa2e056d2 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -7,19 +7,16 @@ on: - 'Stable*' tags: - 'v*' - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' pull_request: - paths-ignore: - - 'android/**' - - 'deploy/**' - - 'docs/**' - - '.github/workflows/docs_deploy.yml' - - '.github/workflows/android.yml' - - '.github/workflows/linux.yml' - - '.github/workflows/macos.yml' + paths: + - '.github/workflows/windows.yml' + - 'deploy/windows/**' + - 'src/**' + +concurrency: + # cancel jobs on PRs only + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: build: @@ -36,6 +33,7 @@ jobs: env: ARTIFACT: QGroundControl-installer.exe + PACKAGE: QGroundControl-installer QT_VERSION: 6.8.1 GST_VERSION: 1.22.12 SCCACHE_GHA_ENABLED: "true" @@ -134,7 +132,7 @@ jobs: uses: ./.github/actions/upload with: artifact_name: ${{ env.ARTIFACT }} + package_name: ${{ env.PACKAGE }} aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - source: '' github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 791b8d1a5de..58527d43a1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,6 +123,16 @@ endif() # Qt6 Configuration ####################################################### +set(QT_SILENCE_MISSING_DEPENDENCY_TARGET_WARNING ON) +set(QT_MINIMUM_VERSION 6.8.1) + +find_program(QMAKE_EXECUTABLE NAMES qmake HINTS ${QT_ROOT_DIR} ${QTDIR} ENV QTDIR PATH_SUFFIXES bin) +execute_process(COMMAND ${QMAKE_EXECUTABLE} -query QT_VERSION OUTPUT_VARIABLE QT_VERSION) +if(QT_VERSION LESS QT_MINIMUM_VERSION) + MESSAGE(FATAL_ERROR "Minimum supported Qt version: ${QT_MINIMUM_VERSION}. + Installed version: ${QT_VERSION}") +endif() + include(Qt6QGCConfiguration) set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml" CACHE PATH "Install path for QML" FORCE) @@ -165,16 +175,6 @@ if(ANDROID) # QT_ANDROID_KEYSTORE_STORE_PASS, QT_ANDROID_KEYSTORE_KEY_PASS endif() -set(QT_SILENCE_MISSING_DEPENDENCY_TARGET_WARNING ON) -set(QT_MINIMUM_VERSION 6.8.1) - -find_program(QMAKE_EXECUTABLE NAMES qmake HINTS ${QTDIR} ENV QTDIR PATH_SUFFIXES bin) -execute_process(COMMAND ${QMAKE_EXECUTABLE} -query QT_VERSION OUTPUT_VARIABLE QT_VERSION) -if(QT_VERSION LESS QT_MINIMUM_VERSION) - MESSAGE(FATAL_ERROR "Minimum supported Qt version: ${QT_MINIMUM_VERSION}. - Installed version: ${QT_VERSION}") -endif() - find_package(Qt6 ${QT_MINIMUM_VERSION} REQUIRED @@ -195,7 +195,6 @@ find_package(Qt6 Sensors Sql Svg - Test TextToSpeech Widgets Xml @@ -207,6 +206,7 @@ find_package(Qt6 Quick3D Quick3DTools SerialPort + Test HINTS ${QT_LIBRARY_HINTS} ) @@ -466,11 +466,19 @@ target_link_libraries(${CMAKE_PROJECT_NAME} QGC QmlControls ) + if(QGC_BUILD_TESTING) add_subdirectory(test) target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE qgctest) endif() +target_precompile_headers(${CMAKE_PROJECT_NAME} + PRIVATE + + + +) + qt_import_plugins(${CMAKE_PROJECT_NAME} INCLUDE Qt6::QSvgPlugin EXCLUDE_BY_TYPE geoservices diff --git a/cmake/Git.cmake b/cmake/Git.cmake index 2fd9ed7ec57..a4a716ab91c 100644 --- a/cmake/Git.cmake +++ b/cmake/Git.cmake @@ -62,7 +62,6 @@ execute_process( cmake_print_variables(QGC_APP_DATE) string(FIND ${QGC_APP_VERSION} "v" QGC_APP_VERSION_VALID) -cmake_print_variables(QGC_APP_VERSION_VALID) if(QGC_APP_VERSION_VALID GREATER -1) string(REPLACE "v" "" QGC_APP_VERSION ${QGC_APP_VERSION}) else() diff --git a/cmake/modules/vulkan.cmake b/cmake/modules/vulkan.cmake new file mode 100644 index 00000000000..dce8ddd0edf --- /dev/null +++ b/cmake/modules/vulkan.cmake @@ -0,0 +1,83 @@ +add_library(mbgl-vendor-vulkan-headers INTERFACE) + +target_include_directories( + mbgl-vendor-vulkan-headers SYSTEM + INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/Vulkan-Headers/include/ +) + +set_target_properties( + mbgl-vendor-vulkan-headers + PROPERTIES + INTERFACE_MAPLIBRE_NAME "Vulkan-Headers" + INTERFACE_MAPLIBRE_URL "https://github.com/KhronosGroup/Vulkan-Headers.git" + INTERFACE_MAPLIBRE_LICENSE ${CMAKE_CURRENT_LIST_DIR}/Vulkan-Headers/LICENSE.md +) + +add_library(mbgl-vendor-VulkanMemoryAllocator INTERFACE) + +target_include_directories( + mbgl-vendor-VulkanMemoryAllocator SYSTEM + INTERFACE + ${CMAKE_CURRENT_LIST_DIR}/VulkanMemoryAllocator/include/ +) + +set_target_properties( + mbgl-vendor-VulkanMemoryAllocator + PROPERTIES + INTERFACE_MAPLIBRE_NAME "VulkanMemoryAllocator" + INTERFACE_MAPLIBRE_URL "https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git" + INTERFACE_MAPLIBRE_LICENSE ${CMAKE_CURRENT_LIST_DIR}/VulkanMemoryAllocator/LICENSE.txt +) + +set(ENABLE_OPT OFF) +set(ENABLE_HLSL OFF) +set(ENABLE_GLSLANG_BINARIES OFF) +set(GLSLANG_TESTS_DEFAULT OFF) +set(ENABLE_PCH OFF) + +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.25") + add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/glslang SYSTEM) +else() + add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/glslang) +endif() + +get_target_property(glslang_inc glslang INTERFACE_INCLUDE_DIRECTORIES) +set_target_properties(glslang PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES ${glslang_inc}) + +set_target_properties( + glslang + PROPERTIES + INTERFACE_MAPLIBRE_NAME "glslang" + INTERFACE_MAPLIBRE_URL "https://github.com/KhronosGroup/glslang.git" + INTERFACE_MAPLIBRE_LICENSE ${CMAKE_CURRENT_LIST_DIR}/glslang/LICENSE.txt +) + +set_target_properties( + SPIRV + PROPERTIES + INTERFACE_MAPLIBRE_NAME "SPIRV" + INTERFACE_MAPLIBRE_URL "https://github.com/KhronosGroup/glslang.git" + INTERFACE_MAPLIBRE_LICENSE ${CMAKE_CURRENT_LIST_DIR}/glslang/LICENSE.txt +) + +set_target_properties( + glslang-default-resource-limits + PROPERTIES + INTERFACE_MAPLIBRE_NAME "glslang-default-resource-limits" + INTERFACE_MAPLIBRE_URL "https://github.com/KhronosGroup/glslang.git" + INTERFACE_MAPLIBRE_LICENSE ${CMAKE_CURRENT_LIST_DIR}/glslang/LICENSE.txt +) + +export(TARGETS + mbgl-vendor-vulkan-headers + mbgl-vendor-VulkanMemoryAllocator + glslang + SPIRV + glslang-default-resource-limits + MachineIndependent + OSDependent + GenericCodeGen + + APPEND FILE MapboxCoreTargets.cmake +) \ No newline at end of file diff --git a/deploy/docker/Dockerfile-build-macos b/deploy/docker/Dockerfile-build-macos index c857ef28d77..31d269656c2 100644 --- a/deploy/docker/Dockerfile-build-macos +++ b/deploy/docker/Dockerfile-build-macos @@ -8,13 +8,8 @@ ENV QT_DESKTOP=$QT_PATH/${QT_VERSION}/clang_64 ENV PATH=$QT_DESKTOP/bin:/usr/local/bin:$PATH -# Install Homebrew (if not already installed) -RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \ - && eval "$(/usr/local/bin/brew shellenv)" \ - && brew update - -# Install necessary dependencies via Homebrew -RUN brew install cmake ninja git +COPY tools/setup/macos-dependencies.sh /tmp/qt/ +RUN /tmp/qt/macos-dependencies.sh # Install Qt using Homebrew RUN brew install qt@${QT_VERSION} \ diff --git a/deploy/macos/MacCertificates.p12.enc b/deploy/macos/MacCertificates.p12.enc new file mode 100644 index 00000000000..0c4db32a582 Binary files /dev/null and b/deploy/macos/MacCertificates.p12.enc differ diff --git a/src/main.cc b/src/main.cc index abf4584617e..3a2d3f108f1 100644 --- a/src/main.cc +++ b/src/main.cc @@ -55,6 +55,7 @@ int WindowsCrtReportHook(int reportType, char* message, int* returnValue) // To shut down QGC on Ctrl+C on Linux #ifdef Q_OS_LINUX +#ifndef Q_OS_ANDROID #include @@ -68,6 +69,7 @@ void sigHandler(int s) } } +#endif /* Q_OS_ANDROID */ #endif /* Q_OS_LINUX */ //----------------------------------------------------------------------------- @@ -124,12 +126,10 @@ int main(int argc, char *argv[]) AppMessages::installHandler(); #ifdef Q_OS_MACOS -#ifndef Q_OS_IOS // Prevent Apple's app nap from screwing us over // tip: the domain can be cross-checked on the command line with QProcess::execute("defaults", {"write org.qgroundcontrol.qgroundcontrol NSAppSleepDisabled -bool YES"}); #endif -#endif #ifdef Q_OS_WIN // Set our own OpenGL buglist @@ -172,7 +172,7 @@ int main(int argc, char *argv[]) // Add additional command line option flags here }; - ParseCmdLineOptions(argc, argv, rgCmdLineOptions, sizeof(rgCmdLineOptions)/sizeof(rgCmdLineOptions[0]), false); + ParseCmdLineOptions(argc, argv, rgCmdLineOptions, std::size(rgCmdLineOptions), false); if (stressUnitTests) { runUnitTests = true; } @@ -194,8 +194,10 @@ int main(int argc, char *argv[]) QGCApplication app(argc, argv, runUnitTests); #ifdef Q_OS_LINUX +#ifndef Q_OS_ANDROID std::signal(SIGINT, sigHandler); std::signal(SIGTERM, sigHandler); +#endif #endif app.init(); diff --git a/test/AutoPilotPlugins/CMakeLists.txt b/test/AutoPilotPlugins/CMakeLists.txt index 8be814fec6c..4e6e34e7ad6 100644 --- a/test/AutoPilotPlugins/CMakeLists.txt +++ b/test/AutoPilotPlugins/CMakeLists.txt @@ -8,6 +8,7 @@ qt_add_library(AutoPilotPluginsTest target_link_libraries(AutoPilotPluginsTest PRIVATE + Qt6::Test APMAutoPilotPlugin AutoPilotPlugins PX4AutoPilotPlugin diff --git a/test/AutoPilotPlugins/RadioConfigTest.cc b/test/AutoPilotPlugins/RadioConfigTest.cc index ded0f62fbaa..c564deba921 100644 --- a/test/AutoPilotPlugins/RadioConfigTest.cc +++ b/test/AutoPilotPlugins/RadioConfigTest.cc @@ -18,6 +18,8 @@ #include "AutoPilotPlugin.h" #include "MultiSignalSpy.h" +#include + /// @file /// @brief QRadioComponentController Widget unit test /// diff --git a/test/FactSystem/FactSystemTestBase.cc b/test/FactSystem/FactSystemTestBase.cc index 8cc344b234c..0e0217404d5 100644 --- a/test/FactSystem/FactSystemTestBase.cc +++ b/test/FactSystem/FactSystemTestBase.cc @@ -19,7 +19,6 @@ #include "MAVLinkProtocol.h" #include -#include /// FactSystem Unit Test FactSystemTestBase::FactSystemTestBase(void) diff --git a/test/MissionManager/CameraSectionTest.cc b/test/MissionManager/CameraSectionTest.cc index 99922571ee0..5a292fcac17 100644 --- a/test/MissionManager/CameraSectionTest.cc +++ b/test/MissionManager/CameraSectionTest.cc @@ -15,6 +15,7 @@ #include "SimpleMissionItem.h" #include "MultiSignalSpy.h" +#include #include CameraSectionTest::CameraSectionTest(void) diff --git a/test/MissionManager/FWLandingPatternTest.cc b/test/MissionManager/FWLandingPatternTest.cc index c2bceb72d80..85c2cd24143 100644 --- a/test/MissionManager/FWLandingPatternTest.cc +++ b/test/MissionManager/FWLandingPatternTest.cc @@ -12,6 +12,7 @@ #include "MultiSignalSpy.h" #include "FixedWingLandingComplexItem.h" +#include #include FWLandingPatternTest::FWLandingPatternTest(void) diff --git a/test/MissionManager/LandingComplexItemTest.cc b/test/MissionManager/LandingComplexItemTest.cc index 3f596734ddb..a081258538e 100644 --- a/test/MissionManager/LandingComplexItemTest.cc +++ b/test/MissionManager/LandingComplexItemTest.cc @@ -15,6 +15,8 @@ #include "CameraSection.h" #include "SimpleMissionItem.h" +#include + const char* SimpleLandingComplexItem::settingsGroup = "SimpleLandingComplexItemUnitTest"; const char* SimpleLandingComplexItem::jsonComplexItemTypeValue = "utSimpleLandingPattern"; diff --git a/test/MissionManager/MissionControllerManagerTest.cc b/test/MissionManager/MissionControllerManagerTest.cc index 30800e8a9f7..2c4b07c1770 100644 --- a/test/MissionManager/MissionControllerManagerTest.cc +++ b/test/MissionManager/MissionControllerManagerTest.cc @@ -13,6 +13,8 @@ #include "Vehicle.h" #include "MultiSignalSpy.h" +#include + MissionControllerManagerTest::MissionControllerManagerTest(void) { diff --git a/test/MissionManager/QGCMapPolygonTest.cc b/test/MissionManager/QGCMapPolygonTest.cc index 1911ac58806..6757f1c272a 100644 --- a/test/MissionManager/QGCMapPolygonTest.cc +++ b/test/MissionManager/QGCMapPolygonTest.cc @@ -13,6 +13,9 @@ #include "MultiSignalSpy.h" #include "QmlObjectListModel.h" +#include +#include + QGCMapPolygonTest::QGCMapPolygonTest(void) { _polyPoints << QGeoCoordinate(47.635638361473475, -122.09269407980834 ) << diff --git a/test/MissionManager/QGCMapPolylineTest.cc b/test/MissionManager/QGCMapPolylineTest.cc index 12ae9f61541..9a9fb31422e 100644 --- a/test/MissionManager/QGCMapPolylineTest.cc +++ b/test/MissionManager/QGCMapPolylineTest.cc @@ -13,6 +13,9 @@ #include "QGCMapPolyline.h" #include "QmlObjectListModel.h" +#include +#include + QGCMapPolylineTest::QGCMapPolylineTest(void) { _linePoints << QGeoCoordinate(47.635638361473475, -122.09269407980834 ) << diff --git a/test/MissionManager/SectionTest.cc b/test/MissionManager/SectionTest.cc index b500363717d..3760fd060ed 100644 --- a/test/MissionManager/SectionTest.cc +++ b/test/MissionManager/SectionTest.cc @@ -13,6 +13,8 @@ #include "MultiSignalSpy.h" #include "Section.h" +#include + SectionTest::SectionTest(void) : _simpleItem(nullptr) { diff --git a/test/MissionManager/StructureScanComplexItemTest.cc b/test/MissionManager/StructureScanComplexItemTest.cc index 51b133a3dca..5774ea59c05 100644 --- a/test/MissionManager/StructureScanComplexItemTest.cc +++ b/test/MissionManager/StructureScanComplexItemTest.cc @@ -14,6 +14,7 @@ #include "PlanMasterController.h" #include +#include StructureScanComplexItemTest::StructureScanComplexItemTest(void) { diff --git a/test/MissionManager/SurveyComplexItemTest.cc b/test/MissionManager/SurveyComplexItemTest.cc index 726fe2b114b..db2b09534ec 100644 --- a/test/MissionManager/SurveyComplexItemTest.cc +++ b/test/MissionManager/SurveyComplexItemTest.cc @@ -12,6 +12,8 @@ #include "PlanViewSettings.h" #include "MultiSignalSpy.h" +#include + SurveyComplexItemTest::SurveyComplexItemTest(void) { _rgSurveySignals[surveyVisualTransectPointsChangedIndex] = SIGNAL(visualTransectPointsChanged()); diff --git a/test/MissionManager/TransectStyleComplexItemTestBase.cc b/test/MissionManager/TransectStyleComplexItemTestBase.cc index 72ab1d37949..532bc9f230f 100644 --- a/test/MissionManager/TransectStyleComplexItemTestBase.cc +++ b/test/MissionManager/TransectStyleComplexItemTestBase.cc @@ -13,6 +13,8 @@ #include "PlanViewSettings.h" #include "MissionItem.h" +#include + TransectStyleComplexItemTestBase::TransectStyleComplexItemTestBase(void) { } diff --git a/test/Vehicle/MAVLinkLogManagerTest.cc b/test/Vehicle/MAVLinkLogManagerTest.cc index 3405e7e98ef..c187d322291 100644 --- a/test/Vehicle/MAVLinkLogManagerTest.cc +++ b/test/Vehicle/MAVLinkLogManagerTest.cc @@ -14,7 +14,6 @@ #include #include -#include void MAVLinkLogManagerTest::_testInitMAVLinkLogManager() { diff --git a/test/Vehicle/SendMavCommandWithSignallingTest.cc b/test/Vehicle/SendMavCommandWithSignallingTest.cc index 8d0b3123362..c18661c62c1 100644 --- a/test/Vehicle/SendMavCommandWithSignallingTest.cc +++ b/test/Vehicle/SendMavCommandWithSignallingTest.cc @@ -11,6 +11,9 @@ #include "MultiVehicleManager.h" #include "MockLink.h" +#include +#include + SendMavCommandWithSignallingTest::TestCase_t SendMavCommandWithSignallingTest::_rgTestCases[] = { { MockLink::MAV_CMD_MOCKLINK_ALWAYS_RESULT_ACCEPTED, MAV_RESULT_ACCEPTED, Vehicle::MavCmdResultCommandResultOnly, 1 }, { MockLink::MAV_CMD_MOCKLINK_ALWAYS_RESULT_FAILED, MAV_RESULT_FAILED, Vehicle::MavCmdResultCommandResultOnly, 1 }, diff --git a/test/qgcunittest/CMakeLists.txt b/test/qgcunittest/CMakeLists.txt index ac3352de528..b1919e6e2ad 100644 --- a/test/qgcunittest/CMakeLists.txt +++ b/test/qgcunittest/CMakeLists.txt @@ -17,10 +17,10 @@ target_link_libraries(qgcunittest Settings Vehicle VehicleComponents + Qt6::Test PUBLIC Qt6::Core Qt6::Positioning - Qt6::Test MAVLink MockLink ) diff --git a/test/qgcunittest/MultiSignalSpy.h b/test/qgcunittest/MultiSignalSpy.h index 7733e9ca842..2065efa29da 100644 --- a/test/qgcunittest/MultiSignalSpy.h +++ b/test/qgcunittest/MultiSignalSpy.h @@ -10,7 +10,6 @@ #pragma once #include -#include #include class QSignalSpy; diff --git a/tools/HeaderUpdater.py b/tools/HeaderUpdater.py index 791afa97133..1df939d3cc5 100644 --- a/tools/HeaderUpdater.py +++ b/tools/HeaderUpdater.py @@ -3,7 +3,7 @@ import re # Define the file extensions you want to target -TARGET_EXTENSIONS = ['.cpp', '.cc', '.h'] # Add other extensions as needed +TARGET_EXTENSIONS = ['.cpp', '.cc', '.h', '.qml'] # Add other extensions as needed # Define the new header with a placeholder for the updated year HEADER_TEMPLATE = '''/**************************************************************************** diff --git a/tools/setup/macos-dependencies.sh b/tools/setup/macos-dependencies.sh index 2dfd9434b73..8539e4fac07 100644 --- a/tools/setup/macos-dependencies.sh +++ b/tools/setup/macos-dependencies.sh @@ -4,7 +4,8 @@ if ! command -v brew &> /dev/null then # install Homebrew if not installed yet /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" + eval "$(/usr/local/bin/brew shellenv)" fi brew update -brew install cmake ninja ccache geographiclib SDL2 exiv2 expat zlib shapelib pkgconf create-dmg \ No newline at end of file +brew install cmake ninja ccache geographiclib git SDL2 exiv2 expat zlib shapelib pkgconf create-dmg