build: Improvements to bundled libraries support. (#6435)

This commit is contained in:
Steveice10 2023-04-28 13:02:53 -07:00 committed by GitHub
parent 30bf654d2f
commit ea649263b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 255 additions and 114 deletions

View file

@ -1,20 +1,13 @@
#!/bin/sh -ex
brew install ccache ninja || true
pip3 install macpack
export FFMPEG_VER=5.1
export QT_VER=5.15.8
mkdir tmp
cd tmp/
# install FFMPEG
wget https://github.com/SachinVin/ext-macos-bin/raw/main/ffmpeg/ffmpeg-${FFMPEG_VER}.7z
7z x ffmpeg-${FFMPEG_VER}.7z
cp -rv $(pwd)/ffmpeg-${FFMPEG_VER}/* /
# install Qt
wget https://github.com/SachinVin/ext-macos-bin/raw/main/qt/qt-${QT_VER}.7z
wget https://github.com/citra-emu/ext-macos-bin/raw/main/qt/qt-${QT_VER}.7z
7z x qt-${QT_VER}.7z
sudo cp -rv $(pwd)/qt-${QT_VER}/* /usr/local/

View file

@ -9,25 +9,8 @@ COMPRESSION_FLAGS="-czvf"
mkdir "$REV_NAME"
cp build/bin/Release/citra "$REV_NAME"
cp -r build/bin/Release/libs "$REV_NAME"
cp -r build/bin/Release/citra-qt.app "$REV_NAME"
cp build/bin/Release/citra-room "$REV_NAME"
# move libs into folder for deployment
macpack "${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt" -d "../Frameworks"
# move qt frameworks into app bundle for deployment
macdeployqt "${REV_NAME}/citra-qt.app" -executable="${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt"
# move libs into folder for deployment
macpack "${REV_NAME}/citra" -d "libs"
# workaround for libc++
install_name_tool -change @loader_path/../Frameworks/libc++.1.0.dylib /usr/lib/libc++.1.dylib "${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt"
install_name_tool -change @loader_path/libs/libc++.1.0.dylib /usr/lib/libc++.1.dylib "${REV_NAME}/citra"
# Make the launching script executable
chmod +x ${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt
# Verify loader instructions
find "$REV_NAME" -type f -exec otool -L {} \;
. .ci/common/post-upload.sh