From f6d45801556d3e6a70ace9de2929e9d32772f95a Mon Sep 17 00:00:00 2001 From: GabCoolGuy Date: Wed, 20 Nov 2024 22:11:05 +0100 Subject: [PATCH] Attempt to check if canary in `create_macos_build_ava.sh` and in `create_macos_build_ava_headless.sh` instead of in seperate files This helps keeping things concise and should maybe work well idk --- .github/workflows/build.yml | 1 + .github/workflows/canary.yml | 5 +++-- .github/workflows/release.yml | 1 + distribution/macos/create_macos_build_ava.sh | 10 +++++++--- distribution/macos/create_macos_build_headless.sh | 10 +++++++--- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21dc3eb0b..6cf5bc65c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,7 @@ env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 RYUJINX_BASE_VERSION: "1.2.0" RELEASE: 0 + CANARY: 0 jobs: build: diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 3435c828b..c5640269f 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -25,6 +25,7 @@ env: RYUJINX_TARGET_RELEASE_CHANNEL_SOURCE_REPO: "Ryujinx" RYUJINX_TARGET_RELEASE_CHANNEL_REPO: "Ryujinx-Canary" RELEASE: 1 + CANARY: 1 jobs: tag: @@ -236,11 +237,11 @@ jobs: - name: Publish macOS Ryujinx run: | - ./distribution/macos/create_macos_build_ava_canary.sh . publish_tmp_ava publish_ava ./distribution/macos/entitlements.xml "${{ steps.version_info.outputs.build_version }}" "${{ steps.version_info.outputs.git_short_hash }}" Release + ./distribution/macos/create_macos_build_ava.sh . publish_tmp_ava publish_ava ./distribution/macos/entitlements.xml "${{ steps.version_info.outputs.build_version }}" "${{ steps.version_info.outputs.git_short_hash }}" Release - name: Publish macOS Ryujinx.Headless.SDL2 run: | - ./distribution/macos/create_macos_build_headless_canary.sh . publish_tmp_headless publish_headless ./distribution/macos/entitlements.xml "${{ steps.version_info.outputs.build_version }}" "${{ steps.version_info.outputs.git_short_hash }}" Release + ./distribution/macos/create_macos_build_headless.sh . publish_tmp_headless publish_headless ./distribution/macos/entitlements.xml "${{ steps.version_info.outputs.build_version }}" "${{ steps.version_info.outputs.git_short_hash }}" Release - name: Pushing new release uses: ncipollo/release-action@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 44b1de09b..4a987d86c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,7 @@ env: RYUJINX_TARGET_RELEASE_CHANNEL_OWNER: "GreemDev" RYUJINX_TARGET_RELEASE_CHANNEL_REPO: "Ryujinx" RELEASE: 1 + CANARY: 0 jobs: tag: diff --git a/distribution/macos/create_macos_build_ava.sh b/distribution/macos/create_macos_build_ava.sh index 80bd6662c..992b11784 100755 --- a/distribution/macos/create_macos_build_ava.sh +++ b/distribution/macos/create_macos_build_ava.sh @@ -3,7 +3,7 @@ set -e if [ "$#" -lt 7 ]; then - echo "usage " + echo "usage " exit 1 fi @@ -19,9 +19,13 @@ VERSION=$5 SOURCE_REVISION_ID=$6 CONFIGURATION=$7 EXTRA_ARGS=$8 +CANARY=$9 -if [ "$VERSION" == "1.1.0" ]; +# shellcheck disable=SC2107 +if [ "$VERSION" == "1.1.0" && "$CANARY" == 1 ]; then + RELEASE_TAR_FILE_NAME=ryujinx-canary-$CONFIGURATION-$VERSION+$SOURCE_REVISION_ID-macos_universal.app.tar +elif [ "$VERSION" == "1.1.0" && "$CANARY" == 0 ]; 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 @@ -61,7 +65,7 @@ mkdir -p "$OUTPUT_DIRECTORY" cp -R "$ARM64_APP_BUNDLE" "$UNIVERSAL_APP_BUNDLE" rm "$UNIVERSAL_APP_BUNDLE/$EXECUTABLE_SUB_PATH" -# Make it libraries universal +# Make its libraries universal python3 "$BASE_DIR/distribution/macos/construct_universal_dylib.py" "$ARM64_APP_BUNDLE" "$X64_APP_BUNDLE" "$UNIVERSAL_APP_BUNDLE" "**/*.dylib" if ! [ -x "$(command -v lipo)" ]; diff --git a/distribution/macos/create_macos_build_headless.sh b/distribution/macos/create_macos_build_headless.sh index 24836418d..07624ff89 100755 --- a/distribution/macos/create_macos_build_headless.sh +++ b/distribution/macos/create_macos_build_headless.sh @@ -19,12 +19,16 @@ VERSION=$5 SOURCE_REVISION_ID=$6 CONFIGURATION=$7 EXTRA_ARGS=$8 +CANARY=$9 -if [ "$VERSION" == "1.1.0" ]; +# shellcheck disable=SC2107 +if [ "$VERSION" == "1.1.0" && "$CANARY" == 1 ]; then - RELEASE_TAR_FILE_NAME=nogui-ryujinx-$CONFIGURATION-$VERSION+$SOURCE_REVISION_ID-macos_universal.tar + RELEASE_TAR_FILE_NAME=ryujinx-canary-$CONFIGURATION-$VERSION+$SOURCE_REVISION_ID-macos_universal.app.tar +elif [ "$VERSION" == "1.1.0" && "$CANARY" == 0 ]; + RELEASE_TAR_FILE_NAME=ryujinx-$CONFIGURATION-$VERSION+$SOURCE_REVISION_ID-macos_universal.app.tar else - RELEASE_TAR_FILE_NAME=nogui-ryujinx-$VERSION-macos_universal.tar + RELEASE_TAR_FILE_NAME=ryujinx-$VERSION-macos_universal.app.tar fi ARM64_OUTPUT="$TEMP_DIRECTORY/publish_arm64"