From 8734ea9dd4e67c971a078f4f10c16e40476ece52 Mon Sep 17 00:00:00 2001 From: TSRBerry <20988865+TSRBerry@users.noreply.github.com> Date: Mon, 9 Jan 2023 22:58:51 +0100 Subject: [PATCH] Linux: Add Avalonia detection to Ryujinx.sh (#4224) * Revert "ava: Fix regression caused by #4013 (#4222)" This reverts commit b9f2a96595b2721836d2b73e005640f9c3bfaf23. * linux: Detect Ryujinx.Ava and don't rename the Ryujinx.Ava assembly --- .github/workflows/build.yml | 6 ------ .github/workflows/release.yml | 4 +--- distribution/linux/Ryujinx.sh | 7 ++++++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4586902ce..ac19f717a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,12 +69,6 @@ jobs: - name: Publish Ryujinx.Ava run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish_ava -p:Version="${{ env.RYUJINX_BASE_VERSION }}" -p:DebugType=embedded -p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" -p:ExtraDefineConstants=DISABLE_UPDATER Ryujinx.Ava --self-contained true if: github.event_name == 'pull_request' - - name: Rename Avalonia (Windows) - run: mv ./publish_ava/Ryujinx.Ava.exe ./publish_ava/Ryujinx.exe - if: runner.os == 'Windows' && github.event_name == 'pull_request' - - name: Rename Avalonia (Unix) - run: mv ./publish_ava/Ryujinx.Ava ./publish_ava/Ryujinx - if: runner.os != 'Windows' && github.event_name == 'pull_request' - name: Upload Ryujinx artifact uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29f0c5cf9..3a4b4e205 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,13 +46,11 @@ jobs: shell: bash - name: Create output dir run: "mkdir release_output" - - name: Publish Windows run: | dotnet publish -c Release -r win10-x64 -o ./publish_windows/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx --self-contained true dotnet publish -c Release -r win10-x64 -o ./publish_windows_sdl2_headless/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Headless.SDL2 --self-contained true dotnet publish -c Release -r win10-x64 -o ./publish_windows_ava/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Ava --self-contained true - mv ./publish_windows_ava/publish/Ryujinx.Ava.exe ./publish_windows_ava/publish/Ryujinx.exe - name: Packing Windows builds run: | pushd publish_windows @@ -73,7 +71,7 @@ jobs: dotnet publish -c Release -r linux-x64 -o ./publish_linux/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx --self-contained true dotnet publish -c Release -r linux-x64 -o ./publish_linux_sdl2_headless/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Headless.SDL2 --self-contained true dotnet publish -c Release -r linux-x64 -o ./publish_linux_ava/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Ava --self-contained true - mv ./publish_linux_ava/publish/Ryujinx.Ava ./publish_linux_ava/publish/Ryujinx + - name: Packing Linux builds run: | pushd publish_linux diff --git a/distribution/linux/Ryujinx.sh b/distribution/linux/Ryujinx.sh index 57a75b1d1..09a4188cd 100644 --- a/distribution/linux/Ryujinx.sh +++ b/distribution/linux/Ryujinx.sh @@ -1,5 +1,10 @@ #!/bin/sh SCRIPT_DIR=$(dirname $(realpath $0)) +RYUJINX_BIN="Ryujinx" -env DOTNET_EnableAlternateStackCheck=1 "$SCRIPT_DIR/Ryujinx" "$@" +if [ -f "$SCRIPT_DIR/Ryujinx.Ava" ]; then + RYUJINX_BIN="Ryujinx.Ava" +fi + +env DOTNET_EnableAlternateStackCheck=1 "$SCRIPT_DIR/$RYUJINX_BIN" "$@"