diff options
| author | TSRBerry <20988865+TSRBerry@users.noreply.github.com> | 2023-05-11 17:36:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-11 17:36:53 +0200 |
| commit | 9095941fd143a6b81478371d5ab3daa29d2ab119 (patch) | |
| tree | ba14e4b9a414f99757dd5b79e4ce396476a4513d /distribution/macos | |
| parent | ba71141bdcb4742ee8707b9c354365d9ea142ca9 (diff) | |
Update release workflow & Add jobs for macOS (#4837)
* Add build config and extra args to create_macos_build.sh
* Use matrix strategy for releases
* Add macOS jobs
Co-authored-by: Mary <thog@protonmail.com>
* Fix wrong version argument
* Fix check for the correct amount of args
* Install latest rcodesign release
Co-authored-by: Mary <thog@protonmail.com>
* Set executable bits for PR builds on linux
---------
Co-authored-by: Mary <thog@protonmail.com>
Diffstat (limited to 'distribution/macos')
| -rwxr-xr-x | distribution/macos/create_macos_build.sh (renamed from distribution/macos/create_macos_release.sh) | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/distribution/macos/create_macos_release.sh b/distribution/macos/create_macos_build.sh index 59eb1efd..1a5a3873 100755 --- a/distribution/macos/create_macos_release.sh +++ b/distribution/macos/create_macos_build.sh @@ -2,8 +2,8 @@ set -e -if [ "$#" -ne 6 ]; then - echo "usage <BASE_DIR> <TEMP_DIRECTORY> <OUTPUT_DIRECTORY> <ENTITLEMENTS_FILE_PATH> <VERSION> <SOURCE_REVISION_ID>" +if [ "$#" -lt 7 ]; then + echo "usage <BASE_DIR> <TEMP_DIRECTORY> <OUTPUT_DIRECTORY> <ENTITLEMENTS_FILE_PATH> <VERSION> <SOURCE_REVISION_ID> <CONFIGURATION> <EXTRA_ARGS>" exit 1 fi @@ -17,8 +17,16 @@ OUTPUT_DIRECTORY=$(readlink -f "$3") ENTITLEMENTS_FILE_PATH=$(readlink -f "$4") VERSION=$5 SOURCE_REVISION_ID=$6 +CONFIGURATION=$7 +EXTRA_ARGS=$8 + +if [ "$VERSION" == "1.1.0" ]; +then + RELEASE_TAR_FILE_NAME=Ryujinx-$CONFIGURATION-$VERSION+$SOURCE_REVISION_ID-macos_universal.app.tar +else + RELEASE_TAR_FILE_NAME=Ryujinx-$VERSION-macos_universal.app.tar +fi -RELEASE_TAR_FILE_NAME=Ryujinx-$VERSION-macos_universal.app.tar ARM64_APP_BUNDLE="$TEMP_DIRECTORY/output_arm64/Ryujinx.app" X64_APP_BUNDLE="$TEMP_DIRECTORY/output_x64/Ryujinx.app" UNIVERSAL_APP_BUNDLE="$OUTPUT_DIRECTORY/Ryujinx.app" @@ -27,12 +35,12 @@ EXECUTABLE_SUB_PATH=Contents/MacOS/Ryujinx rm -rf "$TEMP_DIRECTORY" mkdir -p "$TEMP_DIRECTORY" -DOTNET_COMMON_ARGS="-p:DebugType=embedded -p:Version=$VERSION -p:SourceRevisionId=$SOURCE_REVISION_ID --self-contained true" +DOTNET_COMMON_ARGS="-p:DebugType=embedded -p:Version=$VERSION -p:SourceRevisionId=$SOURCE_REVISION_ID --self-contained true $EXTRA_ARGS" dotnet restore -dotnet build -c Release src/Ryujinx.Ava -dotnet publish -c Release -r osx-arm64 -o "$TEMP_DIRECTORY/publish_arm64" $DOTNET_COMMON_ARGS src/Ryujinx.Ava -dotnet publish -c Release -r osx-x64 -o "$TEMP_DIRECTORY/publish_x64" $DOTNET_COMMON_ARGS src/Ryujinx.Ava +dotnet build -c $CONFIGURATION src/Ryujinx.Ava +dotnet publish -c $CONFIGURATION -r osx-arm64 -o "$TEMP_DIRECTORY/publish_arm64" $DOTNET_COMMON_ARGS src/Ryujinx.Ava +dotnet publish -c $CONFIGURATION -r osx-x64 -o "$TEMP_DIRECTORY/publish_x64" $DOTNET_COMMON_ARGS src/Ryujinx.Ava # Get rid of the support library for ARMeilleure for x64 (that's only for arm64) rm -rf "$TEMP_DIRECTORY/publish_x64/libarmeilleure-jitsupport.dylib" @@ -68,7 +76,7 @@ else LIPO=lipo fi -# Make it the executable universal +# Make the executable universal $LIPO "$ARM64_APP_BUNDLE/$EXECUTABLE_SUB_PATH" "$X64_APP_BUNDLE/$EXECUTABLE_SUB_PATH" -output "$UNIVERSAL_APP_BUNDLE/$EXECUTABLE_SUB_PATH" -create # Patch up the Info.plist to have appropriate version @@ -87,10 +95,10 @@ then # NOTE: Currently require https://github.com/indygreg/apple-platform-rs/pull/44 to work on other OSes. # cargo install --git "https://github.com/marysaka/apple-platform-rs" --branch "fix/adhoc-app-bundle" apple-codesign --bin "rcodesign" - echo "Usign rcodesign for ad-hoc signing" + echo "Using rcodesign for ad-hoc signing" rcodesign sign --entitlements-xml-path "$ENTITLEMENTS_FILE_PATH" "$UNIVERSAL_APP_BUNDLE" else - echo "Usign codesign for ad-hoc signing" + echo "Using codesign for ad-hoc signing" codesign --entitlements "$ENTITLEMENTS_FILE_PATH" -f --deep -s - "$UNIVERSAL_APP_BUNDLE" fi |
