Skip to content

Commit

Permalink
[fix] ci: fix macos dmg
Browse files Browse the repository at this point in the history
  • Loading branch information
bgallois committed Oct 24, 2024
1 parent 29b7606 commit d2047fb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
path: src/build/FastTrack

build_mac:
runs-on: macos-latest
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down Expand Up @@ -139,9 +139,15 @@ jobs:
make
cd build/
macdeployqt FastTrack.app -always-overwrite
wget https://raw.githubusercontent.com/tamlok/macdeployqtfix/master/macdeployqtfix.py
wget https://raw.githubusercontent.com/arl/macdeployqtfix/refs/heads/master/macdeployqtfix.py
cp *.qm FastTrack.app/Contents/Resources/
python macdeployqtfix.py FastTrack.app/Contents/MacOS/FastTrack ../../Qt/${{ env.QT_VERSION }}/
find / -name "libgcc_s.1.1.dylib" -exec cp {} FastTrack.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
find / -name "libsharpyuv.0.dylib" -exec cp {} FastTrack.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
find / -name "libjxl_cms.0.11.dylib" -exec cp {} FastTrack.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
cp -v /opt/homebrew/Cellar/opencv/*/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
cp -v /opt/homebrew/opt/little-cms2/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
cp -v /opt/homebrew/opt/jpeg-xl/lib/lib*.dylib FastTrack.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
python macdeployqtfix.py fasttrack.app/contents/macos/fasttrack ../../Qt/${{ env.QT_VERSION }}/
hdiutil create -volname FastTrack -srcfolder FastTrack.app -ov -format UDZO FastTrack.dmg
- name: upload_artefact
uses: actions/upload-artifact@v4
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/build_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
path: src/build_cli/

build_mac:
runs-on: macos-latest
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down Expand Up @@ -132,7 +132,14 @@ jobs:
make
cd build_cli/
macdeployqt FastTrack-cli.app -always-overwrite
wget https://raw.githubusercontent.com/tamlok/macdeployqtfix/master/macdeployqtfix.py
wget https://raw.githubusercontent.com/arl/macdeployqtfix/refs/heads/master/macdeployqtfix.py
find / -name "libgcc_s.1.1.dylib" -exec cp {} FastTrack-cli.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
find / -name "libsharpyuv.0.dylib" -exec cp {} FastTrack-cli.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
find / -name "libjxl_cms.0.11.dylib" -exec cp {} FastTrack-cli.app/Contents/Frameworks/ \; 2> >(tee /dev/stderr) || true
cp -v /opt/homebrew/Cellar/opencv/*/lib/lib*.dylib FastTrack-cli.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
cp -v /opt/homebrew/opt/little-cms2/lib/lib*.dylib FastTrack-cli.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
cp -v /opt/homebrew/opt/jpeg-xl/lib/lib*.dylib FastTrack-cli.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
cp /opt/homebrew/Cellar/opencv/*/lib/lib*.dylib FastTrack-cli.app/Contents/Frameworks/ || true # Should (and was) be automatically done by macdeployqt!
python macdeployqtfix.py FastTrack-cli.app/Contents/MacOS/FastTrack-cli ../../Qt/${{ env.QT_VERSION }}/
hdiutil create -volname FastTrack-cli -srcfolder FastTrack-cli.app -ov -format UDZO FastTrack-cli.dmg
- name: upload_artefact
Expand Down
1 change: 1 addition & 0 deletions src/FastTrack-Cli.pro
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ unix:macx {
QT_CONFIG -= no-pkg-config
CONFIG += link_pkgconfig
PKGCONFIG += opencv4
PKGCONFIG += protobuf

ICON=assets/icon.icns
}
Expand Down
1 change: 1 addition & 0 deletions src/FastTrack.pro
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ unix:macx {
QT_CONFIG -= no-pkg-config
CONFIG += link_pkgconfig
PKGCONFIG += opencv4
PKGCONFIG += protobuf

ICON=assets/icon.icns
}
Expand Down

0 comments on commit d2047fb

Please sign in to comment.