Skip to content

Commit

Permalink
Switch to using Qt 6.7.3 for mac to prevent issue acquiring metal loc…
Browse files Browse the repository at this point in the history
…k in newer Qt version and to be able to use QWebEngine
  • Loading branch information
streetpea committed Mar 1, 2025
1 parent a75d463 commit 77b53e2
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build-macos-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Build chiaki-ng macOSX arm64

on:
workflow_dispatch:
env:
QT_PATH: "/opt/qt"
QT_VERSION: "6.7.3"

jobs:
build-mac_arm64_github:
Expand All @@ -14,12 +17,16 @@ jobs:

- name: Install protobuf
run: |
pip3 install --user protobuf --break-system-packages
pip3 install --user protobuf aqtinstall --break-system-packages
- name: Install brew dependencies
run: |
brew update
brew uninstall pkgconfig || true
brew install --force qt@6 ffmpeg pkgconfig opus openssl cmake ninja nasm sdl2 protobuf speexdsp libplacebo wget python-setuptools json-c miniupnpc
brew install --force ffmpeg pkgconfig opus openssl cmake ninja nasm sdl2 protobuf speexdsp libplacebo wget python-setuptools json-c miniupnpc
- name: Install qt
run: |
sudo aqt install-qt -O "${QT_PATH}" mac desktop "${QT_VERSION}" clang_64 -m qtpositioning qtwebchannel qtwebsockets qtserialport qtwebengine
- name: Configure chiaki-ng
run: |
Expand All @@ -28,17 +35,19 @@ jobs:
- name: Build chiaki-ng
run: |
export CPATH=$(brew --prefix)/opt/ffmpeg/include
export PATH="${QT_PATH}/${QT_VERSION}/clang_64/bin:${PATH}"
cmake --build build --config Release --clean-first --target chiaki
- name: Deploy chiaki-ng
run: |
cp -a build/gui/chiaki.app chiaki-ng.app
cp scripts/qtwebengine_import.qml gui/src/qml/
$(brew --prefix)/opt/qt@6/bin/macdeployqt chiaki-ng.app -qmldir="$PWD/gui/src/qml" -libpath=$(brew --prefix)/lib
export PATH="${QT_PATH}/${QT_VERSION}/clang_64/bin:${PATH}"
macdeployqt chiaki-ng.app -qmldir="$PWD/gui/src/qml" -libpath=$(brew --prefix)/lib -libpath=${QT_PATH}/${QT_VERSION}/clang_64/bin
mkdir -p chiaki-ng.app/Contents/Resources/vulkan/icd.d
wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.9/MoltenVK-macos.tar && tar xf MoltenVK-macos.tar
cp MoltenVK/MoltenVK/dylib/macOS/* chiaki-ng.app/Contents/Resources/vulkan/icd.d
$(brew --prefix)/opt/qt@6/bin/macdeployqt chiaki-ng.app -qmldir="$PWD/gui/src/qml" -libpath=$(brew --prefix)/lib
macdeployqt chiaki-ng.app -qmldir="$PWD/gui/src/qml" -libpath=$(brew --prefix)/lib -libpath=${QT_PATH}/${QT_VERSION}/clang_64/bin
ln -s ../../../../../../../Frameworks chiaki-ng.app/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents
ln -s libvulkan.1.dylib chiaki-ng.app/Contents/Frameworks/vulkan
codesign --force --entitlements gui/entitlements.xml --deep --sign - chiaki-ng.app
Expand Down

0 comments on commit 77b53e2

Please sign in to comment.