From cfa287facbd050bed2e88eab47f29b2492319407 Mon Sep 17 00:00:00 2001 From: reggie Date: Sun, 6 Oct 2024 03:16:37 -0500 Subject: [PATCH] =?UTF-8?q?infra:=20Add=20AppImage=20build=20to=20release?= =?UTF-8?q?=20workflow=20(Enjoy=20Steam=20Deck=20users=20=F0=9F=99=82)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 31 +++++++++++++++++++ distribution/linux/appimage/build-appimage.sh | 6 ++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80219ba4..69a8c927 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,6 +117,32 @@ jobs: popd shell: bash + - name: Build AppImage (Linux) + if: matrix.platform.os == 'ubuntu-latest' + run: | + PLATFORM_NAME="${{ matrix.platform.name }}" + + sudo apt install -y zsync desktop-file-utils appstream + + mkdir -p tools + export PATH="$PATH:$(readlink -f tools)" + + # Setup appimagetool + wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" + chmod +x tools/appimagetool + + if [ "$PLATFORM_NAME" = "linux-x64" ]; then + export ARCH=x86_64 + elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then + export ARCH=aarch64 + else + echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME"" + exit 1 + fi + + BUILDDIR=publish_ava OUTDIR=publish_ava_appimage distribution/linux/appimage/build-appimage.sh + shell: bash + - name: Packing Linux builds if: matrix.platform.os == 'ubuntu-latest' run: | @@ -131,6 +157,11 @@ jobs: chmod +x Ryujinx.sh Ryujinx.Headless.SDL2 tar -czvf ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz * popd + + # AppImage archive + pushd publish_ava_appimage + tar -czvf ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}-AppImage.tar.gz * + popd shell: bash - name: Pushing new release diff --git a/distribution/linux/appimage/build-appimage.sh b/distribution/linux/appimage/build-appimage.sh index 203253b2..bec8263f 100755 --- a/distribution/linux/appimage/build-appimage.sh +++ b/distribution/linux/appimage/build-appimage.sh @@ -10,9 +10,6 @@ OUTDIR=${OUTDIR:-publish_appimage} rm -rf AppDir mkdir -p AppDir/usr/bin/bin -# Ensure necessary bins are set as executable -chmod +x "$BUILDDIR"/Ryujinx* - # Add symlinks for the AppImage cp distribution/linux/Ryujinx.desktop AppDir/Ryujinx.desktop cp distribution/linux/appimage/AppRun AppDir/AppRun @@ -20,6 +17,9 @@ cp distribution/misc/Logo.svg AppDir/Ryujinx.svg cp -r "$BUILDDIR"/* AppDir/usr/bin/ +# Ensure necessary bins are set as executable +chmod +x AppDir/AppRun AppDir/usr/bin/Ryujinx* + mkdir -p "$OUTDIR" appimagetool --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 21 \