From e83827d7d861b9d00cd01d8f138e97ffedd91dff Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Fri, 2 May 2025 08:20:02 -0500 Subject: [PATCH] Update default builds to Qt6 * Update Debian packages to use Qt6 * Update Fedora packages to use Qt6 * Update default AppImage builds to use Qt6 * Update default Windows builds to use Qt6 * Update default MacOS builds to use Qt6 --- .gitlab-ci.yml | 111 +++++++++++++++++------------------------ debian/control | 6 +-- debian/rules | 10 +++- fedora/OpenRGB.spec.in | 4 +- 4 files changed, 61 insertions(+), 70 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1232182..2ee65c22 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -100,19 +100,19 @@ before_script: "Linux i386 AppImage": variables: TGT_ARCH: "i386" - TGT_QT: "" + TGT_QT: "qt6" TGT_NAME: "${TGT_ARCH}" TGT_PATH: "${TGT_ARCH}" <<: *appimage_script_steps #-----------------------------------------------------------# -# Linux (AppImage) Qt6 i386 Build Target # +# Linux (AppImage) Qt5 i386 Build Target # #-----------------------------------------------------------# -"Linux i386 AppImage Qt6": +"Linux i386 AppImage Qt5": variables: TGT_ARCH: "i386" - TGT_QT: "qt6" - TGT_NAME: "${TGT_ARCH}_${TGT_QT^}" + TGT_QT: "" + TGT_NAME: "${TGT_ARCH}_qt5" TGT_PATH: "${TGT_ARCH}" <<: *appimage_script_steps @@ -122,7 +122,7 @@ before_script: "Linux amd64 AppImage": variables: TGT_ARCH: "amd64" - TGT_QT: "" + TGT_QT: "qt6" TGT_NAME: "${TGT_ARCH}" TGT_PATH: "x86_64" <<: *appimage_script_steps @@ -137,13 +137,13 @@ before_script: - "saas-linux-small-amd64" #-----------------------------------------------------------# -# Linux (AppImage) Qt6 amd64 Build Target # +# Linux (AppImage) Qt5 amd64 Build Target # #-----------------------------------------------------------# -"Linux amd64 AppImage Qt6": +"Linux amd64 AppImage Qt5": variables: TGT_ARCH: "amd64" - TGT_QT: "qt6" - TGT_NAME: "${TGT_ARCH}_${TGT_QT^}" + TGT_QT: "" + TGT_NAME: "${TGT_ARCH}_qt5" TGT_PATH: "x86_64" <<: *appimage_script_steps @@ -153,19 +153,19 @@ before_script: "Linux armhf AppImage": variables: TGT_ARCH: "armhf" - TGT_QT: "" + TGT_QT: "qt6" TGT_NAME: "${TGT_ARCH}" TGT_PATH: "${TGT_ARCH}" <<: *appimage_script_steps #-----------------------------------------------------------# -# Linux (AppImage) Qt6 armhf Build Target # +# Linux (AppImage) Qt5 armhf Build Target # #-----------------------------------------------------------# -"Linux armhf AppImage Qt6": +"Linux armhf AppImage Qt5": variables: TGT_ARCH: "armhf" - TGT_QT: "qt6" - TGT_NAME: "${TGT_ARCH}_${TGT_QT^}" + TGT_QT: "" + TGT_NAME: "${TGT_ARCH}_qt5" TGT_PATH: "${TGT_ARCH}" <<: *appimage_script_steps @@ -175,19 +175,19 @@ before_script: "Linux arm64 AppImage": variables: TGT_ARCH: "arm64" - TGT_QT: "" + TGT_QT: "qt6" TGT_NAME: "${TGT_ARCH}" TGT_PATH: "${TGT_ARCH}" <<: *appimage_script_steps #-----------------------------------------------------------# -# Linux (AppImage) Qt6 arm64 Build Target # +# Linux (AppImage) Qt5 arm64 Build Target # #-----------------------------------------------------------# -"Linux arm64 AppImage Qt6": +"Linux arm64 AppImage Qt5": variables: TGT_ARCH: "arm64" - TGT_QT: "qt6" - TGT_NAME: "${TGT_ARCH}_${TGT_QT^}" + TGT_QT: "" + TGT_NAME: "${TGT_ARCH}_qt5" TGT_PATH: "${TGT_ARCH}" <<: *appimage_script_steps @@ -353,24 +353,6 @@ before_script: rules: - !reference [.upstream_rules, rules] -#-----------------------------------------------------------# -# Ubuntu amd64 22.04 test # -#-----------------------------------------------------------# -"Ubuntu amd64 22.04LTS": - image: ubuntu:jammy - stage: test - script: - - apt update - - DEBIAN_FRONTEND=noninteractive apt install -yq --no-install-recommends ./openrgb*amd64.deb - - openrgb --version - - apt remove -y openrgb - dependencies: - - "Linux amd64 .deb (Debian Bookworm)" - needs: - - "Linux amd64 .deb (Debian Bookworm)" - rules: - - !reference [.upstream_rules, rules] - #-----------------------------------------------------------# # Ubuntu amd64 24.04 test # #-----------------------------------------------------------# @@ -415,7 +397,7 @@ before_script: stage: build script: - $ErrorActionPreference = "SilentlyContinue" ; Set-MpPreference -DisableRealtimeMonitoring $true ; $ErrorActionPreference = "Stop" - - scripts\build-windows.bat 5.15.0 2019 32 + - scripts\build-windows.bat 6.8.3 2022 32 artifacts: name: "${CI_PROJECT_NAME}_Windows_32_${CI_COMMIT_SHORT_SHA}" paths: @@ -428,17 +410,17 @@ before_script: - !reference [.upstream_rules, rules] #-----------------------------------------------------------# -# Windows (32-bit) Qt6 Build Target # +# Windows (32-bit) Qt5 Build Target # #-----------------------------------------------------------# -"Windows 32 Qt6": +"Windows 32 Qt5": extends: - .shared_windows_runners stage: build script: - $ErrorActionPreference = "SilentlyContinue" ; Set-MpPreference -DisableRealtimeMonitoring $true ; $ErrorActionPreference = "Stop" - - scripts\build-windows.bat 6.8.3 2022 32 + - scripts\build-windows.bat 5.15.0 2019 32 artifacts: - name: "${CI_PROJECT_NAME}_Windows_32_Qt6_${CI_COMMIT_SHORT_SHA}" + name: "${CI_PROJECT_NAME}_Windows_32_Qt5_${CI_COMMIT_SHORT_SHA}" paths: - 'OpenRGB Windows 32-bit' exclude: @@ -457,7 +439,7 @@ before_script: stage: build script: - $ErrorActionPreference = "SilentlyContinue" ; Set-MpPreference -DisableRealtimeMonitoring $true ; $ErrorActionPreference = "Stop" - - scripts\build-windows.bat 5.15.0 2019 64 + - scripts\build-windows.bat 6.8.3 2022 64 artifacts: name: "${CI_PROJECT_NAME}_Windows_64_${CI_COMMIT_SHORT_SHA}" paths: @@ -488,17 +470,17 @@ before_script: - "saas-windows-medium-amd64" #-----------------------------------------------------------# -# Windows (64-bit) Qt6 Build Target # +# Windows (64-bit) Qt5 Build Target # #-----------------------------------------------------------# -"Windows 64 Qt6 Base": +"Windows 64 Qt5 Base": extends: - .shared_windows_runners stage: build script: - $ErrorActionPreference = "SilentlyContinue" ; Set-MpPreference -DisableRealtimeMonitoring $true ; $ErrorActionPreference = "Stop" - - scripts\build-windows.bat 6.8.3 2022 64 + - scripts\build-windows.bat 5.15.0 2019 64 artifacts: - name: "${CI_PROJECT_NAME}_Windows_64_Qt6_${CI_COMMIT_SHORT_SHA}" + name: "${CI_PROJECT_NAME}_Windows_64_Qt5_${CI_COMMIT_SHORT_SHA}" paths: - 'OpenRGB Windows 64-bit' exclude: @@ -509,13 +491,14 @@ before_script: - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push" when: never -"Windows 64 Qt6": - extends: "Windows 64 Qt6 Base" + +"Windows 64 Qt5": + extends: "Windows 64 Qt5 Base" rules: - !reference [.upstream_rules, rules] -"Windows 64 Qt6 (Downstream)": - extends: "Windows 64 Qt6 Base" +"Windows 64 Qt5 (Downstream)": + extends: "Windows 64 Qt5 Base" before_script: - git clone https://gitlab.com/OpenRGBDevelopers/OpenRGB-Qt-Packages - cd OpenRGB-Qt-Packages @@ -535,9 +518,9 @@ before_script: stage: build script: - eval $(/opt/homebrew/bin/brew shellenv) - - /opt/homebrew/opt/qt@5/bin/qmake OpenRGB.pro + - qmake OpenRGB.pro - make -j16 - - /opt/homebrew/opt/qt@5/bin/macdeployqt OpenRGB.app -codesign=OpenRGB + - macdeployqt OpenRGB.app -codesign=OpenRGB artifacts: name: "${CI_PROJECT_NAME}_MacOS_ARM64_${CI_COMMIT_SHORT_SHA}" @@ -548,18 +531,18 @@ before_script: rules: - !reference [.upstream_rules, rules] -"MacOS ARM64 Qt6": +"MacOS ARM64 Qt5": tags: - macos stage: build script: - eval $(/opt/homebrew/bin/brew shellenv) - - qmake OpenRGB.pro + - /opt/homebrew/opt/qt@5/bin/qmake OpenRGB.pro - make -j16 - - macdeployqt OpenRGB.app -codesign=OpenRGB + - /opt/homebrew/opt/qt@5/bin/macdeployqt OpenRGB.app -codesign=OpenRGB artifacts: - name: "${CI_PROJECT_NAME}_MacOS_ARM64_Qt6_${CI_COMMIT_SHORT_SHA}" + name: "${CI_PROJECT_NAME}_MacOS_Qt5_ARM64_${CI_COMMIT_SHORT_SHA}" paths: - OpenRGB.app expire_in: 30 days @@ -573,9 +556,9 @@ before_script: stage: build script: - eval $(/usr/local/bin/brew shellenv) - - arch -x86_64 /usr/local/opt/qt@5/bin/qmake OpenRGB.pro + - arch -x86_64 /usr/local/bin/qmake OpenRGB.pro - arch -x86_64 make -j16 - - arch -x86_64 /usr/local/opt/qt@5/bin/macdeployqt OpenRGB.app -codesign=OpenRGB + - arch -x86_64 /usr/local/bin/macdeployqt OpenRGB.app -codesign=OpenRGB artifacts: name: "${CI_PROJECT_NAME}_MacOS_Intel_${CI_COMMIT_SHORT_SHA}" @@ -586,18 +569,18 @@ before_script: rules: - !reference [.upstream_rules, rules] -"MacOS Intel Qt6": +"MacOS Intel Qt5": tags: - macos stage: build script: - eval $(/usr/local/bin/brew shellenv) - - arch -x86_64 /usr/local/bin/qmake OpenRGB.pro + - arch -x86_64 /usr/local/opt/qt@5/bin/qmake OpenRGB.pro - arch -x86_64 make -j16 - - arch -x86_64 /usr/local/bin/macdeployqt OpenRGB.app -codesign=OpenRGB + - arch -x86_64 /usr/local/opt/qt@5/bin/macdeployqt OpenRGB.app -codesign=OpenRGB artifacts: - name: "${CI_PROJECT_NAME}_MacOS_Intel_Qt6_${CI_COMMIT_SHORT_SHA}" + name: "${CI_PROJECT_NAME}_MacOS_Intel_Qt5_${CI_COMMIT_SHORT_SHA}" paths: - OpenRGB.app expire_in: 30 days diff --git a/debian/control b/debian/control index 68b9038d..7f0335fa 100644 --- a/debian/control +++ b/debian/control @@ -6,9 +6,9 @@ Standards-Version: 3.9.2 Build-Depends: debhelper (>= 9), pkg-config, - qtbase5-dev, - qtbase5-dev-tools, - qttools5-dev-tools, + qt6-base-dev, + qt6-base-dev-tools, + qt6-tools-dev-tools, qt5-qmake, libusb-1.0-0-dev, libhidapi-dev, diff --git a/debian/rules b/debian/rules index 5ff9e1e1..1ef22307 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,13 @@ #!/usr/bin/make -f -export QT_SELECT := qt5 +export QT_SELECT := qt6 %: dh $@ --parallel + +override_dh_auto_configure: + ln -s /usr/bin/qmake6 ./qmake + PATH=`pwd`:$(PATH) dh_auto_configure + +override_dh_auto_clean: + $(RM) qmake + dh_auto_clean diff --git a/fedora/OpenRGB.spec.in b/fedora/OpenRGB.spec.in index 64a98f9a..884eaaea 100644 --- a/fedora/OpenRGB.spec.in +++ b/fedora/OpenRGB.spec.in @@ -8,7 +8,7 @@ Summary: Open source RGB lighting control that doesn't depend on manufact License: GPLv2 URL: https://gitlab.com/CalcProgrammer1/%{_name} -BuildRequires: gcc-c++ libusbx-devel libstdc++-devel qt5-qtbase-devel qt5-linguist desktop-file-utils hidapi-devel mbedtls-devel systemd-rpm-macros +BuildRequires: gcc-c++ libusbx-devel libstdc++-devel qt6-qtbase-devel qt6-linguist desktop-file-utils hidapi-devel mbedtls-devel systemd-rpm-macros Requires: hicolor-icon-theme %description @@ -22,7 +22,7 @@ cp -r %{_sourcedir}/%{_name}/. %{_builddir} %build cd %{_builddir} export CXXFLAGS=${CXXFLAGS/-pipe} -%qmake_qt5 PREFIX=%{_prefix} +%qmake_qt6 PREFIX=%{_prefix} %make_build %install