Files
ryujinx/distribution/linux/appimage/build-appimage.sh
ranidspace 7be1708146 AppImage fixes and improvements (#110)
Currently the appimages work fine, however I realized there's some room to improve on following the standards and a bit of cleaning.

AppImages now follow the linux FHS and a `.DirIcon` to follow the Spec closer, along with changing the icon and desktop file names (the resulting AppImage will have the same name, it's only used internally)

Metadata has been added, it helps with applications meant to manage appimages, as well as a future possible auto-updater.

The icon has been replaced temporarily as we wait for the updated one, just taken from the windows .ico. The `.DirIcon` needs to be a PNG, however `app.ryujinx.Ryujinx.png` can be an svg as well for some reason.

The launcher script may not need to exist (gamemode and envvars), but as to not break anything the important things have been kept.

The commits messages of this PR contain information as to why each change was made.

Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/110
2026-05-30 20:31:49 +00:00

40 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env sh
set -eu
ROOTDIR="$(readlink -f "$(dirname "$0")")"/../../../
cd "$ROOTDIR"
BUILDDIR=${BUILDDIR:-publish}
OUTDIR=${OUTDIR:-publish_appimage}
# AppStream
rm -rf AppDir
mkdir -p AppDir/usr/lib AppDir/usr/bin
mkdir -p AppDir/usr/share/metainfo AppDir/usr/share/applications
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps/
cp -r "$BUILDDIR"/* AppDir/usr/lib/
cp distribution/linux/appimage/app.ryujinx.Ryujinx.appdata.xml AppDir/usr/share/metainfo/app.ryujinx.Ryujinx.appdata.xml
cp distribution/linux/app.ryujinx.Ryujinx.desktop AppDir/usr/share/applications/app.ryujinx.Ryujinx.desktop
cp distribution/misc/Logo.png AppDir/usr/share/icons/hicolor/256x256/apps/app.ryujinx.Ryujinx.png
ln -s ../lib/Ryujinx AppDir/usr/bin/Ryujinx
# AppImage Root
ln -s ./usr/share/applications/app.ryujinx.Ryujinx.desktop AppDir/app.ryujinx.Ryujinx.desktop
ln -s ./usr/share/icons/hicolor/256x256/apps/app.ryujinx.Ryujinx.png AppDir/.DirIcon
ln -s ./usr/share/icons/hicolor/256x256/apps/app.ryujinx.Ryujinx.png AppDir/app.ryujinx.Ryujinx.png
ln -s ./usr/lib/Ryujinx.sh AppDir/AppRun
# Ensure necessary bins are set as executable
chmod +x AppDir/AppRun AppDir/usr/bin/Ryujinx*
mkdir -p "$OUTDIR"
# The "-n" flag removes the appstream checks during build, in case the main website is down.
# Run "appstreamcli validate --explain AppDir/usr/share/metainfo/app.ryujinx.Ryujinx.appdata.xml" to check manually
appimagetool --appimage-extract-and-run -n --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 21 \
AppDir "$OUTDIR"/Ryujinx.AppImage