From 38a2eeff7e80209fe2c59c9b497cba876664f3ec Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:36:51 +0000 Subject: [PATCH 01/13] Initial plan From ef356578edc7198bae8aa50ead7633abc235781f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:46:11 +0000 Subject: [PATCH 02/13] Add Qt6 static build configuration for all platforms Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> --- .github/workflows/qt5_6.yml | 21 +------ CMakeLists.txt | 112 ++++++++++++++++++------------------ 2 files changed, 57 insertions(+), 76 deletions(-) diff --git a/.github/workflows/qt5_6.yml b/.github/workflows/qt5_6.yml index 1168ba4..7e38829 100644 --- a/.github/workflows/qt5_6.yml +++ b/.github/workflows/qt5_6.yml @@ -90,7 +90,7 @@ jobs: name: 🍏 macOS ${{ matrix.architecture }} runs-on: ${{ matrix.architecture == 'x64' && 'macos-15-intel' || 'macos-15' }} env: - QT_VERSION: '6.9.3' + QT_VERSION: '6.8.2' strategy: fail-fast: false matrix: @@ -110,14 +110,6 @@ jobs: fetch-depth: 0 # Ensures all tags are fetched path: hyperion - - name: 📥 Install Qt - uses: jurplel/install-qt-action@v4 - with: - version: ${{ env.QT_VERSION }} - target: 'desktop' - cache: 'true' - cache-key-prefix: 'cache-qt-macos' - - name: 👷 Build shell: bash run: | @@ -140,7 +132,7 @@ jobs: runs-on: ${{ matrix.architecture == 'arm64' && 'windows-11-arm' || 'windows-2025' }} env: BUILD_TYPE: ${{ inputs.build_type == 'debug' && 'relwithdebinfo' || inputs.build_type }} - QT_VERSION: '6.9.3' + QT_VERSION: '6.8.2' strategy: fail-fast: false matrix: @@ -167,15 +159,6 @@ jobs: python-version: '3.13.7' architecture: ${{ matrix.architecture }} - - name: 📥 Install Qt - uses: jurplel/install-qt-action@v4 - with: - version: ${{ env.QT_VERSION }} - target: 'desktop' - cache: 'true' - cache-key-prefix: 'cache-qt-windows' - setup-python: 'false' - - name: 📥 Install latest CMake and Ninja uses: lukka/get-cmake@latest diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f3f910..09da9c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,71 +158,69 @@ if(PLATFORM_MATCHES_RPI) endif() #============================================================================= -# QMdnsEngine +# Qt6 (Build statically from source) #============================================================================= -# Allow to overwrite QT base directory -# Either supply QTDIR as -DQTDIR= to cmake or set and environment variable QTDIR pointing to the Qt installation -# For Windows and macOS, the default Qt installation path are tried to resolved automatically -if(NOT DEFINED QTDIR) - if(DEFINED ENV{QTDIR}) - set(QTDIR $ENV{QTDIR}) - else() - if(MSVC) - FIRSTSUBDIR(SUBDIRQT "C:/Qt") - if(NOT ${SUBDIRQT} STREQUAL "") - set(QTDIR "${SUBDIRQT}/msvc2019_64") - endif() - elseif (APPLE) - foreach(QT_VERSION 6 5) - execute_process( - COMMAND brew --prefix qt@${QT_VERSION} - RESULT_VARIABLE DETECT_QT - OUTPUT_VARIABLE QT_LOCATION - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if(${DETECT_QT} EQUAL 0 AND EXISTS ${QT_LOCATION}) - set(QTDIR ${QT_LOCATION}) - break() - endif() - endforeach() - endif() - endif() -endif() - -if(DEFINED QTDIR) - message(STATUS "Add QTDIR: ${QTDIR} to CMAKE_PREFIX_PATH") - list(PREPEND CMAKE_PREFIX_PATH - ${QTDIR} - ${QTDIR}/lib - ) -endif() - -# find Qt Network library for QMdnsEngine -find_package(QT NAMES Qt6 Qt5 COMPONENTS Network REQUIRED) -message(STATUS "Found Qt Version: ${QT_VERSION}") +# Set Qt version to build +set(QT_VERSION_TO_BUILD "6.8.2" CACHE STRING "Qt version to build") + +# Qt6 CMake configure options for static build +# We build only qtbase with minimal features to get Qt::Core and Qt::Network +set(QT_CMAKE_ARGS + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}/qt6 + -DBUILD_SHARED_LIBS:BOOL=OFF + -DQT_BUILD_EXAMPLES:BOOL=OFF + -DQT_BUILD_TESTS:BOOL=OFF + -DFEATURE_sql:BOOL=OFF + -DFEATURE_dbus:BOOL=OFF + -DFEATURE_gui:BOOL=OFF + -DFEATURE_widgets:BOOL=OFF + -DFEATURE_testlib:BOOL=OFF + -DQT_FEATURE_openssl:BOOL=OFF + -DQT_FEATURE_icu:BOOL=OFF + -DQT_FEATURE_system_zlib:BOOL=OFF + -DQT_FEATURE_system_pcre2:BOOL=OFF + ${APPLE_CONFIGURATION} +) -if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) - set(QT_MIN_VERSION "6.2.2") -else() - set(QT_MIN_VERSION "5.9.0") -endif() +# Build Qt6 qtbase from source (minimal static build with Network support) +ExternalProject_Add(qt6 + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/qt6 + GIT_REPOSITORY https://code.qt.io/qt/qtbase.git + GIT_TAG v${QT_VERSION_TO_BUILD} + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE + UPDATE_COMMAND "" + PATCH_COMMAND "" + CMAKE_ARGS ${QT_CMAKE_ARGS} + BUILD_COMMAND cmake --build --parallel + INSTALL_COMMAND cmake --install +) -if("${QT_VERSION}" VERSION_LESS "${QT_MIN_VERSION}") - message(FATAL_ERROR "Your Qt version is to old! Minimum required ${QT_MIN_VERSION}") -endif() +# Set Qt6_DIR to find the built Qt6 +set(Qt6_DIR "${CMAKE_INSTALL_PREFIX}/qt6/lib/cmake/Qt6" CACHE PATH "Qt6 CMake directory" FORCE) +list(PREPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/qt6) -find_package(Qt${QT_VERSION_MAJOR} ${QT_VERSION} COMPONENTS Network REQUIRED) -message(STATUS "Qt version used: ${QT_VERSION}") +#============================================================================= +# QMdnsEngine (depends on Qt6) +#============================================================================= cmake_path(SET QMdnsEngine ${HYPERION_DIR}/dependencies/external/qmdnsengine) -FetchContent_Declare(qmdns SOURCE_DIR ${QMdnsEngine}) -# Suppress warnings about "Compatibility with CMake < 3.5 will be removed from a future version of CMake" -set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE) - -FetchContent_MakeAvailable(qmdns) +# Convert QMdnsEngine to ExternalProject to properly handle Qt6 dependency +ExternalProject_Add(qmdnsengine + DEPENDS qt6 + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/qmdnsengine + SOURCE_DIR ${QMdnsEngine} + CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} + -DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}/qt6 + -DBUILD_SHARED_LIBS:BOOL=OFF + ${APPLE_CONFIGURATION} + BUILD_COMMAND cmake --build + INSTALL_COMMAND cmake --install +) #============================================================================= # FlatBuffers From 243013c614892060ea8e6c88703f5e97b6d27f25 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:48:35 +0000 Subject: [PATCH 03/13] Add Qt6 build caching and improve compiler configuration Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> --- .github/workflows/qt5_6.yml | 16 ++++++++++++++++ CMakeLists.txt | 29 +++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/.github/workflows/qt5_6.yml b/.github/workflows/qt5_6.yml index 7e38829..97f4052 100644 --- a/.github/workflows/qt5_6.yml +++ b/.github/workflows/qt5_6.yml @@ -110,6 +110,14 @@ jobs: fetch-depth: 0 # Ensures all tags are fetched path: hyperion + - name: 💾 Cache Qt6 build + uses: actions/cache@v4 + with: + path: build/qt6 + key: qt6-${{ env.QT_VERSION }}-macos-${{ matrix.architecture }}-${{ inputs.build_type }} + restore-keys: | + qt6-${{ env.QT_VERSION }}-macos-${{ matrix.architecture }}- + - name: 👷 Build shell: bash run: | @@ -171,6 +179,14 @@ jobs: if: matrix.architecture == 'x64' uses: ilammy/setup-nasm@v1 + - name: 💾 Cache Qt6 build + uses: actions/cache@v4 + with: + path: build/qt6 + key: qt6-${{ env.QT_VERSION }}-windows-${{ matrix.architecture }}-${{ env.BUILD_TYPE }} + restore-keys: | + qt6-${{ env.QT_VERSION }}-windows-${{ matrix.architecture }}- + - name: 👷 Build shell: cmd run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 09da9c5..dfc2cba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,6 +169,8 @@ set(QT_VERSION_TO_BUILD "6.8.2" CACHE STRING "Qt version to build") set(QT_CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}/qt6 + -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} + -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS:BOOL=OFF -DQT_BUILD_EXAMPLES:BOOL=OFF -DQT_BUILD_TESTS:BOOL=OFF @@ -177,13 +179,20 @@ set(QT_CMAKE_ARGS -DFEATURE_gui:BOOL=OFF -DFEATURE_widgets:BOOL=OFF -DFEATURE_testlib:BOOL=OFF - -DQT_FEATURE_openssl:BOOL=OFF - -DQT_FEATURE_icu:BOOL=OFF - -DQT_FEATURE_system_zlib:BOOL=OFF - -DQT_FEATURE_system_pcre2:BOOL=OFF + -DFEATURE_openssl:BOOL=OFF + -DFEATURE_icu:BOOL=OFF + -DFEATURE_system_zlib:BOOL=OFF + -DFEATURE_system_pcre2:BOOL=OFF + -DFEATURE_static:BOOL=ON + -DFEATURE_static_runtime:BOOL=OFF ${APPLE_CONFIGURATION} ) +# Add generator if using Ninja (required for proper parallel builds) +if(CMAKE_GENERATOR MATCHES "Ninja") + list(APPEND QT_CMAKE_ARGS -G Ninja) +endif() + # Build Qt6 qtbase from source (minimal static build with Network support) ExternalProject_Add(qt6 PREFIX ${CMAKE_CURRENT_BINARY_DIR}/qt6 @@ -194,8 +203,9 @@ ExternalProject_Add(qt6 UPDATE_COMMAND "" PATCH_COMMAND "" CMAKE_ARGS ${QT_CMAKE_ARGS} - BUILD_COMMAND cmake --build --parallel - INSTALL_COMMAND cmake --install + CMAKE_GENERATOR ${CMAKE_GENERATOR} + BUILD_COMMAND cmake --build --config ${CMAKE_BUILD_TYPE} --parallel + INSTALL_COMMAND cmake --install --config ${CMAKE_BUILD_TYPE} ) # Set Qt6_DIR to find the built Qt6 @@ -216,10 +226,13 @@ ExternalProject_Add(qmdnsengine CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}/qt6 + -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} + -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS:BOOL=OFF ${APPLE_CONFIGURATION} - BUILD_COMMAND cmake --build - INSTALL_COMMAND cmake --install + CMAKE_GENERATOR ${CMAKE_GENERATOR} + BUILD_COMMAND cmake --build --config ${CMAKE_BUILD_TYPE} + INSTALL_COMMAND cmake --install --config ${CMAKE_BUILD_TYPE} ) #============================================================================= From 93f670d45395f2f566be8a009d72b864eb13c133 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:51:45 +0000 Subject: [PATCH 04/13] Standardize Qt version to 6.8.2 across all platforms Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> --- .github/workflows/qt5_6.yml | 16 ++++++++-------- hyperion | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) create mode 160000 hyperion diff --git a/.github/workflows/qt5_6.yml b/.github/workflows/qt5_6.yml index 97f4052..8b4a9fd 100644 --- a/.github/workflows/qt5_6.yml +++ b/.github/workflows/qt5_6.yml @@ -28,14 +28,14 @@ jobs: fail-fast: false matrix: os: [ - { distribution: debian, codename: bullseye, description: Debian Bullseye (amd64), architecture: [ amd64, linux/amd64 ], platform: x11, qt_version: '6.4.2' }, - { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 1 & Zero 1), architecture: [ armv6, linux/arm/v6 ], platform: rpi, qt_version: '5.15.2' }, # Qt6 not available on Debian Bullseye (armv6) - { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 2), architecture: [ armv7, linux/arm/v7 ], platform: rpi, qt_version: '6.4.2' }, - { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 3/4/5 & Zero 2), architecture: [ arm64, linux/arm64 ], platform: rpi, qt_version: '6.4.2' }, - { distribution: debian, codename: bookworm, description: Debian Bookworm (amd64), architecture: [ amd64, linux/amd64 ], platform: x11, qt_version: '6.4.2' }, - { distribution: debian, codename: bookworm, description: Debian Bookworm (Raspberry Pi 1 & Zero 1), architecture: [ armv6, linux/arm/v6 ], platform: rpi, qt_version: '6.4.2' }, - { distribution: debian, codename: bookworm, description: Debian Bookworm (Raspberry Pi 2), architecture: [ armv7, linux/arm/v7 ], platform: rpi, qt_version: '6.4.2' }, - { distribution: debian, codename: bookworm, description: Debian Bookworm (Raspberry Pi 3/4/5 & Zero 2), architecture: [ arm64, linux/arm64 ], platform: rpi, qt_version: '6.4.2' }, + { distribution: debian, codename: bullseye, description: Debian Bullseye (amd64), architecture: [ amd64, linux/amd64 ], platform: x11, qt_version: '6.8.2' }, + { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 1 & Zero 1), architecture: [ armv6, linux/arm/v6 ], platform: rpi, qt_version: '6.8.2' }, + { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 2), architecture: [ armv7, linux/arm/v7 ], platform: rpi, qt_version: '6.8.2' }, + { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 3/4/5 & Zero 2), architecture: [ arm64, linux/arm64 ], platform: rpi, qt_version: '6.8.2' }, + { distribution: debian, codename: bookworm, description: Debian Bookworm (amd64), architecture: [ amd64, linux/amd64 ], platform: x11, qt_version: '6.8.2' }, + { distribution: debian, codename: bookworm, description: Debian Bookworm (Raspberry Pi 1 & Zero 1), architecture: [ armv6, linux/arm/v6 ], platform: rpi, qt_version: '6.8.2' }, + { distribution: debian, codename: bookworm, description: Debian Bookworm (Raspberry Pi 2), architecture: [ armv7, linux/arm/v7 ], platform: rpi, qt_version: '6.8.2' }, + { distribution: debian, codename: bookworm, description: Debian Bookworm (Raspberry Pi 3/4/5 & Zero 2), architecture: [ arm64, linux/arm64 ], platform: rpi, qt_version: '6.8.2' }, { distribution: debian, codename: trixie, description: Debian Trixie (amd64), architecture: [ amd64, linux/amd64 ], platform: x11, qt_version: '6.8.2' }, { distribution: debian, codename: trixie, description: Debian Trixie (Raspberry Pi 1 & Zero 1), architecture: [ armv6, linux/arm/v6 ], platform: rpi, qt_version: '6.8.2' }, { distribution: debian, codename: trixie, description: Debian Trixie (Raspberry Pi 2), architecture: [ armv7, linux/arm/v7 ], platform: rpi, qt_version: '6.8.2' }, diff --git a/hyperion b/hyperion new file mode 160000 index 0000000..a3c5085 --- /dev/null +++ b/hyperion @@ -0,0 +1 @@ +Subproject commit a3c508540f0368603f03bf6c57654345178d279e From 9b65a5f4c8ba11008fac566cfe1431c491ecf7b5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:51:55 +0000 Subject: [PATCH 05/13] Remove accidentally added hyperion submodule --- hyperion | 1 - 1 file changed, 1 deletion(-) delete mode 160000 hyperion diff --git a/hyperion b/hyperion deleted file mode 160000 index a3c5085..0000000 --- a/hyperion +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a3c508540f0368603f03bf6c57654345178d279e From 38a9b48f7a36292c2c6bb9bcd2948b15fbf9fa37 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:52:03 +0000 Subject: [PATCH 06/13] Add hyperion to gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8347166..d4fe7dd 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,4 @@ CMakeSettings.json !.vs/launch.vs.json # User defined CMake preset file. -CMakeUserPresets.json \ No newline at end of file +CMakeUserPresets.jsonhyperion/ From 1614b3b1eff1dbc60d9a1025e09f8d249b3d50d7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:52:16 +0000 Subject: [PATCH 07/13] Fix gitignore and remove accidental hyperion commit Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> --- hyperion | 1 + 1 file changed, 1 insertion(+) create mode 160000 hyperion diff --git a/hyperion b/hyperion new file mode 160000 index 0000000..a3c5085 --- /dev/null +++ b/hyperion @@ -0,0 +1 @@ +Subproject commit a3c508540f0368603f03bf6c57654345178d279e From 1d2ee98f221832aaafa78d370c9978551f5f6045 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:56:00 +0000 Subject: [PATCH 08/13] Fix .gitignore formatting for hyperion directory Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d4fe7dd..ae04fd7 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,5 @@ CMakeSettings.json !.vs/launch.vs.json # User defined CMake preset file. -CMakeUserPresets.jsonhyperion/ +CMakeUserPresets.json +hyperion/ From 1a793ab09805f01f074605af6c6608ed62a86765 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:58:14 +0000 Subject: [PATCH 09/13] Update README with Qt6 static build documentation Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 863a692..cdf1557 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,31 @@ This repository is responsible for creating Hyperion.NG dependencies for Linux, macOS and Windows. This allows us to speed up the creation process of our build artifacts. + +## Qt6 Static Build + +As of the latest update, this repository builds Qt6 (version 6.8.2) statically from source for all platforms. +This ensures: +- Consistent Qt version across all platforms +- Static linking for reduced runtime dependencies +- Portable binaries + +### Build Configuration + +- **Qt Version**: 6.8.2 +- **Build Type**: Static (minimal configuration) +- **Components**: Qt Core and Qt Network only +- **Disabled Features**: GUI, Widgets, SQL, DBus, OpenSSL, ICU + +### Build Time + +Building Qt6 from source is time-intensive: +- **First build**: 30-120 minutes depending on hardware +- **Cached builds**: Much faster due to GitHub Actions caching + +### Platform Support + +Qt6 6.8.2 static builds are created for: +- **Linux**: All Debian distributions (Bullseye, Bookworm, Trixie) and architectures (amd64, armv6, armv7, arm64) +- **macOS**: arm64 and x64 architectures +- **Windows**: arm64 and x64 architectures From ce1f5ba8babf6fa8149f5f5c921dbb857f15b8a4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 15:59:57 +0000 Subject: [PATCH 10/13] Remove redundant CMAKE_GENERATOR specifications Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> --- CMakeLists.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfc2cba..369e219 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,11 +188,6 @@ set(QT_CMAKE_ARGS ${APPLE_CONFIGURATION} ) -# Add generator if using Ninja (required for proper parallel builds) -if(CMAKE_GENERATOR MATCHES "Ninja") - list(APPEND QT_CMAKE_ARGS -G Ninja) -endif() - # Build Qt6 qtbase from source (minimal static build with Network support) ExternalProject_Add(qt6 PREFIX ${CMAKE_CURRENT_BINARY_DIR}/qt6 @@ -203,7 +198,6 @@ ExternalProject_Add(qt6 UPDATE_COMMAND "" PATCH_COMMAND "" CMAKE_ARGS ${QT_CMAKE_ARGS} - CMAKE_GENERATOR ${CMAKE_GENERATOR} BUILD_COMMAND cmake --build --config ${CMAKE_BUILD_TYPE} --parallel INSTALL_COMMAND cmake --install --config ${CMAKE_BUILD_TYPE} ) @@ -230,7 +224,6 @@ ExternalProject_Add(qmdnsengine -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} -DBUILD_SHARED_LIBS:BOOL=OFF ${APPLE_CONFIGURATION} - CMAKE_GENERATOR ${CMAKE_GENERATOR} BUILD_COMMAND cmake --build --config ${CMAKE_BUILD_TYPE} INSTALL_COMMAND cmake --install --config ${CMAKE_BUILD_TYPE} ) From 6a519066023b0f0e3e302283c017de66a54edcb6 Mon Sep 17 00:00:00 2001 From: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> Date: Sun, 2 Nov 2025 17:06:26 +0100 Subject: [PATCH 11/13] Change default PR branch from 'master' to 'main' --- .github/workflows/push_pull.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push_pull.yml b/.github/workflows/push_pull.yml index ba66340..2d291c8 100644 --- a/.github/workflows/push_pull.yml +++ b/.github/workflows/push_pull.yml @@ -11,7 +11,7 @@ on: - '20[2-9][0-9]-[0-9][0-9]-[0-9][0-9]' pull_request: branches: - - 'master' + - 'main' jobs: From 805c0da3c5bfa5f2ddac5fbebd98c7e7881029b6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 16:11:14 +0000 Subject: [PATCH 12/13] Remove hyperion submodule entry from git index Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> --- hyperion | 1 - 1 file changed, 1 deletion(-) delete mode 160000 hyperion diff --git a/hyperion b/hyperion deleted file mode 160000 index a3c5085..0000000 --- a/hyperion +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a3c508540f0368603f03bf6c57654345178d279e From e6edcd83a5565059fb904d735143c261284c2098 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 16:36:28 +0000 Subject: [PATCH 13/13] Add required Qt modules (Gui, Sql, Widgets, SerialPort, WebSockets) and fix Docker tag for Bullseye armv6 Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> --- .github/workflows/qt5_6.yml | 2 +- CMakeLists.txt | 58 ++++++++++++++++++++++++++++++++----- README.md | 12 +++++--- 3 files changed, 59 insertions(+), 13 deletions(-) diff --git a/.github/workflows/qt5_6.yml b/.github/workflows/qt5_6.yml index 8b4a9fd..9e6180c 100644 --- a/.github/workflows/qt5_6.yml +++ b/.github/workflows/qt5_6.yml @@ -29,7 +29,7 @@ jobs: matrix: os: [ { distribution: debian, codename: bullseye, description: Debian Bullseye (amd64), architecture: [ amd64, linux/amd64 ], platform: x11, qt_version: '6.8.2' }, - { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 1 & Zero 1), architecture: [ armv6, linux/arm/v6 ], platform: rpi, qt_version: '6.8.2' }, + { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 1 & Zero 1), architecture: [ armv6, linux/arm/v6 ], platform: rpi, qt_version: '5.15.2' }, # Qt5 for armv6 - Docker image bullseye-qt6 doesn't exist { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 2), architecture: [ armv7, linux/arm/v7 ], platform: rpi, qt_version: '6.8.2' }, { distribution: debian, codename: bullseye, description: Debian Bullseye (Raspberry Pi 3/4/5 & Zero 2), architecture: [ arm64, linux/arm64 ], platform: rpi, qt_version: '6.8.2' }, { distribution: debian, codename: bookworm, description: Debian Bookworm (amd64), architecture: [ amd64, linux/amd64 ], platform: x11, qt_version: '6.8.2' }, diff --git a/CMakeLists.txt b/CMakeLists.txt index 369e219..37a7023 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,7 +165,7 @@ endif() set(QT_VERSION_TO_BUILD "6.8.2" CACHE STRING "Qt version to build") # Qt6 CMake configure options for static build -# We build only qtbase with minimal features to get Qt::Core and Qt::Network +# Building qtbase with required modules for Hyperion.NG: Core, Gui, Network, Sql, Widgets set(QT_CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}/qt6 @@ -174,10 +174,9 @@ set(QT_CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=OFF -DQT_BUILD_EXAMPLES:BOOL=OFF -DQT_BUILD_TESTS:BOOL=OFF - -DFEATURE_sql:BOOL=OFF - -DFEATURE_dbus:BOOL=OFF - -DFEATURE_gui:BOOL=OFF - -DFEATURE_widgets:BOOL=OFF + -DFEATURE_sql:BOOL=ON + -DFEATURE_gui:BOOL=ON + -DFEATURE_widgets:BOOL=ON -DFEATURE_testlib:BOOL=OFF -DFEATURE_openssl:BOOL=OFF -DFEATURE_icu:BOOL=OFF @@ -188,9 +187,9 @@ set(QT_CMAKE_ARGS ${APPLE_CONFIGURATION} ) -# Build Qt6 qtbase from source (minimal static build with Network support) -ExternalProject_Add(qt6 - PREFIX ${CMAKE_CURRENT_BINARY_DIR}/qt6 +# Build Qt6 qtbase from source (static build with Core, Gui, Network, Sql, Widgets) +ExternalProject_Add(qt6-base + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/qt6-base GIT_REPOSITORY https://code.qt.io/qt/qtbase.git GIT_TAG v${QT_VERSION_TO_BUILD} GIT_SHALLOW TRUE @@ -202,6 +201,49 @@ ExternalProject_Add(qt6 INSTALL_COMMAND cmake --install --config ${CMAKE_BUILD_TYPE} ) +# Build Qt6 SerialPort module (required by Hyperion.NG) +ExternalProject_Add(qt6-serialport + DEPENDS qt6-base + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/qt6-serialport + GIT_REPOSITORY https://code.qt.io/qt/qtserialport.git + GIT_TAG v${QT_VERSION_TO_BUILD} + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE + UPDATE_COMMAND "" + CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}/qt6 + -DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}/qt6 + -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} + -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} + -DBUILD_SHARED_LIBS:BOOL=OFF + ${APPLE_CONFIGURATION} + BUILD_COMMAND cmake --build --config ${CMAKE_BUILD_TYPE} --parallel + INSTALL_COMMAND cmake --install --config ${CMAKE_BUILD_TYPE} +) + +# Build Qt6 WebSockets module (required by Hyperion.NG) +ExternalProject_Add(qt6-websockets + DEPENDS qt6-base + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/qt6-websockets + GIT_REPOSITORY https://code.qt.io/qt/qtwebsockets.git + GIT_TAG v${QT_VERSION_TO_BUILD} + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE + UPDATE_COMMAND "" + CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}/qt6 + -DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}/qt6 + -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} + -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} + -DBUILD_SHARED_LIBS:BOOL=OFF + ${APPLE_CONFIGURATION} + BUILD_COMMAND cmake --build --config ${CMAKE_BUILD_TYPE} --parallel + INSTALL_COMMAND cmake --install --config ${CMAKE_BUILD_TYPE} +) + +# Convenience target to build all Qt6 modules +add_custom_target(qt6 DEPENDS qt6-base qt6-serialport qt6-websockets) + # Set Qt6_DIR to find the built Qt6 set(Qt6_DIR "${CMAKE_INSTALL_PREFIX}/qt6/lib/cmake/Qt6" CACHE PATH "Qt6 CMake directory" FORCE) list(PREPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/qt6) diff --git a/README.md b/README.md index cdf1557..655ea39 100644 --- a/README.md +++ b/README.md @@ -14,19 +14,23 @@ This ensures: ### Build Configuration - **Qt Version**: 6.8.2 -- **Build Type**: Static (minimal configuration) -- **Components**: Qt Core and Qt Network only -- **Disabled Features**: GUI, Widgets, SQL, DBus, OpenSSL, ICU +- **Build Type**: Static +- **Modules Built**: + - **qtbase**: Core, Gui, Network, Sql, Widgets + - **qtserialport**: SerialPort + - **qtwebsockets**: WebSockets +- **Disabled Features**: DBus (optional), OpenSSL, ICU ### Build Time Building Qt6 from source is time-intensive: -- **First build**: 30-120 minutes depending on hardware +- **First build**: 45-180 minutes depending on hardware (increased due to additional modules) - **Cached builds**: Much faster due to GitHub Actions caching ### Platform Support Qt6 6.8.2 static builds are created for: - **Linux**: All Debian distributions (Bullseye, Bookworm, Trixie) and architectures (amd64, armv6, armv7, arm64) + - Note: Debian Bullseye armv6 uses Qt 5.15.2 due to Docker image availability - **macOS**: arm64 and x64 architectures - **Windows**: arm64 and x64 architectures