isle-portable/packaging/linux/appimage/AppRun
Damglador 54694a4611
AppImage packaging (#439)
* AppImage packaging

* Add flags to specify location of required local files

`--build=path` specifies where on the system is the directory with pre-build game binaries (must have binaries `isle` and `isle-config` in `path/bin` and game-specific libraries in `path/lib`)
`--apprun=path` specifies where the apprun is
`--desktop-file=path` same for the desktop file

* Move to packaging/linux

* Move building to appimage/build and ignore it in git

* Use local icon. Option to specify location for it

* Cleaning

* Attempt at Github automation

* Update CMakeLists.txt

* Fix build

* I guess it doesn't need quotes

* Update CMakeLists.txt

* Update release.yml

* Work around for liblego1.so loading, fix arguments

* Create testing.yml

* Update testing.yml

* I should pay more attention to what docs say

* Fix copy-pasting mistake

* Add AppImage packaging to the Release workflow

* Try fixing filepicker

* Delete testing.yml

* Fix releases

Can't specify where linuxdeploy leaves the file without specifying the name of the file, which I don't want to do, so just move the file in `dist` after packaging.

* Remove unnecessary changes

* Add qt6-xdgdesktopportal-platformtheme as deps

Needed to call the xdg filepicker, basically desktop-specific filepicker. Hopefully this will allow to use it in AppImage

* Get back flatpak in release

* Update release.yml

* Remove libglew-dev from apt install

* Fix duplicate upload artifact

* Update release.yml

Co-authored-by: Christian Semmler <mail@csemmler.com>

* Remove *.AppImage pattern in Download All Artifacts

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-06-29 22:53:54 +02:00

26 lines
797 B
Bash
Executable File

#!/bin/sh
HERE="$(dirname "$(readlink -f "${0}")")"
MAIN=$(grep -r "^Exec=.*" "$HERE"/*.desktop | head -n 1 | cut -d "=" -f 2 | cut -d " " -f 1)
# MAIN_BIN=$(find "$HERE/usr/bin" -name "$MAIN" | head -n 1)
MAIN_BIN="$HERE/usr/bin/isle-config"
export PATH="${HERE}/usr/bin/":$PATH # Prefer bundled binaries
export QT_QPA_PLATFORMTHEME=xdgdesktopportal # Use XDG filepicker for forward compatability
[ -z "$QT_PLUGIN_PATH" ] && export QT_PLUGIN_PATH=/usr/lib/qt6/plugins:/usr/lib64/qt6/plugins # Use system Qt theme, will fallback to the default one if unavailable
if [ ! -z $APPIMAGE ]; then
BINARY_NAME=$(basename "$ARGV0")
if [ -e "$HERE/usr/bin/$BINARY_NAME" ]; then
exec "$HERE/usr/bin/$BINARY_NAME" "$@"
else
exec "${MAIN_BIN}" "$@"
fi
else
exec "${MAIN_BIN}" "$@"
fi