Appimage builds #28

Merged
piplup55 merged 10 commits from appimage into master 2024-10-26 12:31:37 +00:00
4 changed files with 100 additions and 0 deletions
Showing only changes of commit 7272dbf097 - Show all commits

View File

@ -73,6 +73,36 @@ jobs:
chmod +x ./publish_sdl2_headless/Ryujinx.Headless.SDL2 ./publish_sdl2_headless/Ryujinx.sh
if: github.event_name == 'pull_request' && matrix.platform.os == 'ubuntu-latest'
- name: Build AppImage
if: github.event_name == 'pull_request' && 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
# Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
if [ "$PLATFORM_NAME" = "linux-x64" ]; then
ARCH_NAME=x64
export ARCH=x86_64
elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
ARCH_NAME=arm64
export ARCH=aarch64
else
echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
exit 1
fi
export UFLAG="gh-releases-zsync|${{ github.repository_owner }}|${{ github.event.repository.name }}|latest|*-$ARCH_NAME.AppImage.zsync"
qurious-pixel commented 2024-10-21 21:19:57 +00:00 (Migrated from github.com)
Review

if build-appimage.sh does not have the exec bit set, set it, prior to callng it.

chmod +x distribution/linux/appimage/build-appimage.sh
if `build-appimage.sh` does not have the exec bit set, set it, prior to callng it. ``` chmod +x distribution/linux/appimage/build-appimage.sh ```
piplup55 commented 2024-10-21 21:40:29 +00:00 (Migrated from github.com)
Review

it should have the exec bit set but it wouldn't hurt to double check it

it should have the exec bit set but it wouldn't hurt to double check it
BUILDDIR=publish OUTDIR=publish_appimage distribution/linux/appimage/build-appimage.sh
shell: bash
- name: Upload Ryujinx artifact
uses: actions/upload-artifact@v4
with:

View File

@ -128,6 +128,43 @@ jobs:
tar -czvf ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz publish
popd
shell: bash
- name: Build AppImage (Linux)
if: matrix.platform.os == 'ubuntu-latest'
run: |
BUILD_VERSION="${{ steps.version_info.outputs.build_version }}"
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
# Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
if [ "$PLATFORM_NAME" = "linux-x64" ]; then
ARCH_NAME=x64
export ARCH=x86_64
elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
ARCH_NAME=arm64
export ARCH=aarch64
else
echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
exit 1
fi
export UFLAG="gh-releases-zsync|${{ github.repository_owner }}|${{ github.event.repository.name }}|latest|*-$ARCH_NAME.AppImage.zsync"
BUILDDIR=publish_ava OUTDIR=publish_ava_appimage distribution/linux/appimage/build-appimage.sh
# Add to release output
pushd publish_ava_appimage
mv Ryujinx.AppImage ../release_output/ryujinx-$BUILD_VERSION-$ARCH_NAME.AppImage
mv Ryujinx.AppImage.zsync ../release_output/ryujinx-$BUILD_VERSION-$ARCH_NAME.AppImage.zsync
popd
shell: bash
qurious-pixel commented 2024-10-21 21:20:16 +00:00 (Migrated from github.com)
Review

same:

chmod +x distribution/linux/appimage/build-appimage.sh
same: ``` chmod +x distribution/linux/appimage/build-appimage.sh ```
piplup55 commented 2024-10-21 21:40:54 +00:00 (Migrated from github.com)
Review

it should have the exec bit set but it wouldn't hurt to double check it

it should have the exec bit set but it wouldn't hurt to double check it
- name: Pushing new release
uses: ncipollo/release-action@v1

View File

@ -0,0 +1,3 @@
#!/bin/sh
CURRENTDIR="$(readlink -f "$(dirname "$0")")"
exec "$CURRENTDIR"/usr/bin/Ryujinx.sh "$@"
qurious-pixel commented 2024-10-21 21:23:47 +00:00 (Migrated from github.com)
Review

not absolutely necessary to create an AppRun, if this is all you are doing. But it can stay in case you want to add more functionality in the future.

otherwise ln -s AppDir/usr/bin/Ryujinx.sh AppDir/AppRun

not absolutely necessary to create an AppRun, if this is all you are doing. But it can stay in case you want to add more functionality in the future. otherwise `ln -s AppDir/usr/bin/Ryujinx.sh AppDir/AppRun`
piplup55 commented 2024-10-21 21:42:08 +00:00 (Migrated from github.com)
Review

i think it should stay just in case more functionality wants to be added down the road

i think it should stay just in case more functionality wants to be added down the road

View File

@ -0,0 +1,30 @@
#!/bin/sh
set -eu
ROOTDIR="$(readlink -f "$(dirname "$0")")"/../../../
cd "$ROOTDIR"
BUILDDIR=${BUILDDIR:-publish}
OUTDIR=${OUTDIR:-publish_appimage}
UFLAG=${UFLAG:-"gh-releases-zsync|ryujinx-mirror|ryujinx|latest|*-x64.AppImage.zsync"}
rm -rf AppDir
mkdir -p AppDir/usr/bin
cp distribution/linux/Ryujinx.desktop AppDir/Ryujinx.desktop
cp distribution/linux/appimage/AppRun AppDir/AppRun
cp distribution/misc/Logo.svg AppDir/Ryujinx.svg
Samueru-sama commented 2024-10-24 17:52:35 +00:00 (Migrated from github.com)
Review

You might want to change this to AppDir/Ryujinx.png as well.

And also add ln -s Ryujinx.png AppDir/.DirIcon

You might want to change this to `AppDir/Ryujinx.png` as well. And also add `ln -s Ryujinx.png AppDir/.DirIcon`
piplup55 commented 2024-10-26 12:22:48 +00:00 (Migrated from github.com)
Review

after discussion i have decided to keep it as svg for scaling reasons

after discussion i have decided to keep it as svg for scaling reasons
cp -r "$BUILDDIR"/* AppDir/usr/bin/
qurious-pixel commented 2024-10-21 21:25:03 +00:00 (Migrated from github.com)
Review

publish_ava creates a publish folder inside.

cp -r "$BUILDDIR"/publish/* AppDir/usr/bin/

to capture the contents inside the folder.

publish_ava creates a publish folder inside. ``` cp -r "$BUILDDIR"/publish/* AppDir/usr/bin/ ``` to capture the contents inside the folder.
piplup55 commented 2024-10-21 21:42:46 +00:00 (Migrated from github.com)
Review

idk how i missed this

idk how i missed this
# 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 \
-u "$UFLAG" \
AppDir "$OUTDIR"/Ryujinx.AppImage
# Move zsync file needed for delta updates
mv ./*.AppImage.zsync "$OUTDIR"