Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade windows and mac builds to QT 6.7 #199

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
46 changes: 24 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ jobs:
- name: homebrew dependencies
run: |
brew update || true
brew install pkg-config qt@5 || true
brew unlink qt@5 || true
brew link --force qt@5 || true
brew install pkg-config qt || true
brew unlink qt || true
brew link --force qt || true
pip3 install meson
pip3 install ninja
- name: install r2
Expand All @@ -95,11 +95,11 @@ jobs:
sudo installer -pkg *.pkg -target /
- name: build iaito
run: |
export PATH="/usr/local/opt/qt@5/bin:$PATH"
export PATH="/opt/homebrew/opt/qt@5/bin:$PATH" # doesnt seems to be necessary
export LDFLAGS="-L/usr/local/opt/qt@5/lib"
export CPPFLAGS="-I/usr/local/opt/qt@5/include"
export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig"
export PATH="/usr/local/opt/qt/bin:$PATH"
export PATH="/opt/homebrew/opt/qt/bin:$PATH" # doesnt seems to be necessary
export LDFLAGS="-L/usr/local/opt/qt/lib"
export CPPFLAGS="-I/usr/local/opt/qt/include"
export PKG_CONFIG_PATH="/usr/local/opt/qt/lib/pkgconfig"
./configure
make -j4
- name: packaging
Expand All @@ -124,9 +124,9 @@ jobs:
- name: homebrew dependencies
run: |
brew update || true
brew install pkg-config qt@5 || true
brew unlink qt@5 || true
brew link --force qt@5 || true
brew install pkg-config qt || true
brew unlink qt || true
brew link --force qt || true
pip3 install meson
pip3 install ninja
- name: install r2
Expand All @@ -135,11 +135,11 @@ jobs:
sudo installer -pkg *.pkg -target /
- name: build iaito
run: |
export PATH="/usr/local/opt/qt@5/bin:$PATH"
export PATH="/opt/homebrew/opt/qt@5/bin:$PATH" # doesnt seems to be necessary
export LDFLAGS="-L/usr/local/opt/qt@5/lib"
export CPPFLAGS="-I/usr/local/opt/qt@5/include"
export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig"
export PATH="/usr/local/opt/qt/bin:$PATH"
export PATH="/opt/homebrew/opt/qt/bin:$PATH" # doesnt seems to be necessary
export LDFLAGS="-L/usr/local/opt/qt/lib"
export CPPFLAGS="-I/usr/local/opt/qt/include"
export PKG_CONFIG_PATH="/usr/local/opt/qt/lib/pkgconfig"
./configure
make -j4
- name: packaging
Expand Down Expand Up @@ -183,15 +183,15 @@ jobs:
run: |
brew update --preinstall # temporary workaround for https://github.com/Homebrew/homebrew-bundle/issues/751
brew install coreutils pkg-config || true
brew install pkg-config qt@5 || true
brew unlink qt@5 || true
brew link --force qt@5 || true
brew install pkg-config qt || true
brew unlink qt || true
brew link --force qt || true
pip3 install meson
pip3 install ninja
- name: macos build
if: contains(matrix.os, 'macos')
run: |
cd src && meson ../build
cd src && meson -Dwith_qt6=true ../build
cd ../build && ninja -j4
- name: meson+ninja ubuntu
if: contains(matrix.os, 'ubuntu')
Expand Down Expand Up @@ -220,7 +220,9 @@ jobs:
# curl -vLo qt-unified-windows-x86-online.exe http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe
# qt-unified-windows-x86-online.exe --verbose --script ..\ci\qt.qs
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4.0.0
with:
version: "6.7.*"
- name: dependencies
shell: cmd
run: |
Expand All @@ -240,7 +242,7 @@ jobs:
set PATH=%CD%\r2_dist\bin;%PATH%
call preconfigure.bat
call configure.bat
make.bat
make.bat -Dwith_qt6=true
- name: dist
shell: cmd
run: |
Expand Down
2 changes: 1 addition & 1 deletion make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SET "BUILDDIR=build_%PLATFORM%"

ECHO Preparing directory
CD src
meson --buildtype=release ..\%BUILDDIR%
meson --buildtype=release %* ..\%BUILDDIR%
CD ..\%BUILDDIR%
ninja -j4
if %ERRORLEVEL% NEQ 0 (
Expand Down
Empty file modified scripts/meson_parse_qmake.py
100644 → 100755
Empty file.
17 changes: 13 additions & 4 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ project('iaito', 'cpp',
# 'optimization=3',
# 'buildtype=debugoptimized'])

qt5_mod = import('qt5')
if get_option('with_qt6')
qt_mod = import('qt6')
else
qt_mod = import('qt5')
endif

py3_exe = import('python').find_installation('python3')

qt_modules = []
Expand Down Expand Up @@ -106,9 +111,13 @@ else
default_options : ['enable_tests=false'])
endif

qt5dep = dependency('qt5', modules: qt_modules, main: true)
if get_option('with_qt6')
qtdep = dependency('qt6', modules: qt_modules, main: true)
else
qtdep = dependency('qt5', modules: qt_modules, main: true)
endif

deps = [r_core, qt5dep]
deps = [r_core, qtdep]
# if get_option('enable_python')
# py3_dep = dependency('python3')
# deps += [py3_dep]
Expand Down Expand Up @@ -139,7 +148,7 @@ deps = [r_core, qt5dep]
# endif
# endif

moc_files = qt5_mod.preprocess(
moc_files = qt_mod.preprocess(
moc_headers: headers,
ui_files: ui_files,
qresources: qresources,
Expand Down
1 change: 1 addition & 0 deletions src/meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# both options are deprecated
# option('enable_python', type: 'boolean', value: false)
# option('enable_python_bindings', type: 'boolean', value: false)
option('with_qt6', type: 'boolean', value: false)
Loading