From 31df567a5942fb6376a888cb715a3fc8ac66653f Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Tue, 15 Dec 2020 18:13:02 +0100 Subject: [PATCH] Build with Qt6 --- .appveyor.yml | 16 +++++++--------- .builds/alpine.yml | 4 ++-- .builds/freebsd.yml | 14 ++++---------- .github/workflows/macos.yml | 4 ++-- meson.build | 8 ++++---- subprojects/libopenrazer.wrap | 2 +- 6 files changed, 20 insertions(+), 28 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6479915..9e78f35 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,8 +2,6 @@ os: Visual Studio 2022 environment: matrix: - - arch: x86 - compiler: msvc2019 - arch: x64 compiler: msvc2019 @@ -12,8 +10,8 @@ platform: install: # Set paths to dependencies (based on architecture) - - cmd: if %arch%==x86 (set PYTHON_ROOT=C:\python312) else (set PYTHON_ROOT=C:\python312-x64) - - cmd: if %arch%==x86 (set QT_ROOT=C:\Qt\5.15\%compiler%) else (set QT_ROOT=C:\Qt\5.15\%compiler%_64) + - cmd: set PYTHON_ROOT=C:\python312-x64 + - cmd: set QT_ROOT=C:\Qt\6.5\%compiler%_64 # Print out dependency paths - cmd: echo Using Python at %PYTHON_ROOT% - cmd: echo Using Qt at %QT_ROOT% @@ -33,11 +31,11 @@ after_build: # Zip build binaries and dependencies - cmd: mkdir .\RazerGenie - cmd: copy %APPVEYOR_BUILD_FOLDER%\builddir\src\RazerGenie.exe .\RazerGenie\ - - cmd: copy %QT_ROOT%\bin\Qt5Core.dll .\RazerGenie\ - - cmd: copy %QT_ROOT%\bin\Qt5DBus.dll .\RazerGenie\ - - cmd: copy %QT_ROOT%\bin\Qt5Gui.dll .\RazerGenie\ - - cmd: copy %QT_ROOT%\bin\Qt5Network.dll .\RazerGenie\ - - cmd: copy %QT_ROOT%\bin\Qt5Widgets.dll .\RazerGenie\ + - cmd: copy %QT_ROOT%\bin\Qt6Core.dll .\RazerGenie\ + - cmd: copy %QT_ROOT%\bin\Qt6DBus.dll .\RazerGenie\ + - cmd: copy %QT_ROOT%\bin\Qt6Gui.dll .\RazerGenie\ + - cmd: copy %QT_ROOT%\bin\Qt6Network.dll .\RazerGenie\ + - cmd: copy %QT_ROOT%\bin\Qt6Widgets.dll .\RazerGenie\ - cmd: mkdir .\RazerGenie\platforms - cmd: copy %QT_ROOT%\plugins\platforms\qwindows.dll .\RazerGenie\platforms - cmd: 7z a RazerGenie_%compiler%_%arch%.zip .\RazerGenie\* diff --git a/.builds/alpine.yml b/.builds/alpine.yml index 5504413..815c77e 100644 --- a/.builds/alpine.yml +++ b/.builds/alpine.yml @@ -1,8 +1,8 @@ image: alpine/edge packages: - meson - - qt5-qtbase-dev - - qt5-qttools-dev + - qt6-qtbase-dev + - qt6-qttools-dev sources: - https://github.com/z3ntu/RazerGenie tasks: diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml index c14c541..1a19fd0 100644 --- a/.builds/freebsd.yml +++ b/.builds/freebsd.yml @@ -2,20 +2,14 @@ image: freebsd/latest packages: - meson - pkgconf - - qt5-buildtools - - qt5-dbus - - qt5-gui - - qt5-linguisttools - - qt5-network - - qt5-testlib - - qt5-widgets - - qt5-xml + - qt6-base + - qt6-tools sources: - https://github.com/z3ntu/RazerGenie tasks: - # Qt5Gui depends on GL/gl.h but it isn't present in the pkgconfig file + # Qt6Gui depends on GL/gl.h but it isn't present in the pkgconfig file - prepare: | - sudo sed -i '' 's|Cflags:|Cflags: -I${prefix}/include|' /usr/local/libdata/pkgconfig/Qt5Gui.pc + sudo sed -i '' 's|Cflags:|Cflags: -I${prefix}/include|' /usr/local/libdata/pkgconfig/Qt6Gui.pc - setup: | cd RazerGenie meson setup builddir diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d6b682c..847f655 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -8,7 +8,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.x' - - run: brew install qt@5 meson svg2png - - run: echo "/opt/homebrew/opt/qt@5/bin" >> $GITHUB_PATH + - run: brew install qt@6 meson svg2png + - run: echo "/opt/homebrew/opt/qt@6/bin" >> $GITHUB_PATH - run: meson setup builddir - run: meson compile -C builddir diff --git a/meson.build b/meson.build index e18fdb9..0f2dfe8 100644 --- a/meson.build +++ b/meson.build @@ -1,13 +1,13 @@ project('razergenie', 'cpp', version : '1.1.0', - meson_version : '>=0.49.0', - default_options : ['cpp_std=c++11']) + meson_version : '>=0.57.0', + default_options : ['cpp_std=c++17']) # Disable any API deprecated in 5.15 or older Qt versions add_project_arguments('-DQT_DISABLE_DEPRECATED_BEFORE=0x050F00', language : 'cpp') -qt = import('qt5') -qt_dep = dependency('qt5', modules: ['Core', 'DBus', 'Gui', 'Network', 'Widgets']) +qt = import('qt6') +qt_dep = dependency('qt6', modules: ['Core', 'DBus', 'Gui', 'Network', 'Widgets']) libopenrazer_dep = dependency('libopenrazer', version : '>=0.2.0', fallback : ['libopenrazer', 'libopenrazer_dep']) diff --git a/subprojects/libopenrazer.wrap b/subprojects/libopenrazer.wrap index 27a3fad..2839304 100644 --- a/subprojects/libopenrazer.wrap +++ b/subprojects/libopenrazer.wrap @@ -1,4 +1,4 @@ [wrap-git] directory = libopenrazer url = https://github.com/z3ntu/libopenrazer.git -revision = head +revision = qt6