From 5d0e60a6aada7b3ff42700b1ed08da518f7d604b Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Thu, 5 Jan 2023 15:16:40 -0800 Subject: [PATCH] ci: Generate universal macOS build. --- .ci/macos/build.sh | 5 ++++- .ci/macos/deps.sh | 19 ++++++++----------- .ci/macos/upload.sh | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.ci/macos/build.sh b/.ci/macos/build.sh index b6c5873e12..1f1868b610 100755 --- a/.ci/macos/build.sh +++ b/.ci/macos/build.sh @@ -2,7 +2,6 @@ set -o pipefail -export Qt5_DIR=$(brew --prefix)/opt/qt5 export PATH="/usr/local/opt/ccache/libexec:$PATH" # ccache configurations export CCACHE_CPP2=yes @@ -16,13 +15,17 @@ export ASM="clang" ccache -s mkdir build && cd build +# TODO: CryptoPP and LibreSSL ASM disabled due to platform detection issues in build. cmake .. -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \ -DENABLE_QT_TRANSLATION=ON \ -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \ -DUSE_DISCORD_PRESENCE=ON \ -DENABLE_FFMPEG_AUDIO_DECODER=ON \ -DENABLE_FFMPEG_VIDEO_DUMPER=ON \ + -DCRYPTOPP_OPT_DISABLE_ASM=ON \ + -DENABLE_ASM=OFF \ -GNinja ninja diff --git a/.ci/macos/deps.sh b/.ci/macos/deps.sh index e000f84ba4..cba18ffa7d 100755 --- a/.ci/macos/deps.sh +++ b/.ci/macos/deps.sh @@ -1,23 +1,20 @@ #!/bin/sh -ex -brew update -brew unlink python@2 || true -rm '/usr/local/bin/2to3' || true -brew install qt5 p7zip ccache ninja || true +brew install ccache ninja || true pip3 install macpack -export SDL_VER=2.0.16 -export FFMPEG_VER=4.4 +export FFMPEG_VER=5.1 +export QT_VER=5.15.8 mkdir tmp cd tmp/ -# install SDL -wget https://github.com/SachinVin/ext-macos-bin/raw/main/sdl2/sdl-${SDL_VER}.7z -7z x sdl-${SDL_VER}.7z -cp -rv $(pwd)/sdl-${SDL_VER}/* / - # 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 +7z x qt-${QT_VER}.7z +sudo cp -rv $(pwd)/qt-${QT_VER}/* /usr/local/ diff --git a/.ci/macos/upload.sh b/.ci/macos/upload.sh index 392cc9c0a8..3170673e96 100755 --- a/.ci/macos/upload.sh +++ b/.ci/macos/upload.sh @@ -15,7 +15,7 @@ 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 -$(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app" -executable="${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt" +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"