Add ability to build GTK app AppImage (#240)

#238 Add AppImage build support

Implements

- Downgrade to libadwaita 1.3 for wider distro support
- Add build script, workflow, and docs for AppImage
- Add build docs for Debian (apt) and Void Linux
- Building AppImage in CI
This commit is contained in:
David Zhong 2024-02-15 19:27:14 -08:00 committed by GitHub
parent 44ecf042a3
commit ab73183b2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 311 additions and 147 deletions

View file

@ -0,0 +1,28 @@
#!/bin/bash
set -ex
BURROW_GTK_ROOT="$(readlink -f $(dirname -- "$(readlink -f -- "$BASH_SOURCE")")/..)"
BURROW_GTK_BUILD="$BURROW_GTK_ROOT/build-appimage"
LINUXDEPLOY_VERSION="${LINUXDEPLOY_VERSION:-"1-alpha-20240109-1"}"
if [ "$BURROW_GTK_ROOT" != $(pwd) ]; then
echo "Make sure to cd into burrow-gtk"
exit 1
fi
ARCHITECTURE=$(lscpu | grep Architecture | awk '{print $2}')
if [ "$ARCHITECTURE" == "x86_64" ]; then
wget "https://github.com/linuxdeploy/linuxdeploy/releases/download/$LINUXDEPLOY_VERSION/linuxdeploy-x86_64.AppImage" -o /dev/null -O /tmp/linuxdeploy
chmod a+x /tmp/linuxdeploy
elif [ "$ARCHITECTURE" == "aarch64" ]; then
wget "https://github.com/linuxdeploy/linuxdeploy/releases/download/$LINUXDEPLOY_VERSION/linuxdeploy-aarch64.AppImage" -o /dev/null -O /tmp/linuxdeploy
chmod a+x /tmp/linuxdeploy
fi
meson setup $BURROW_GTK_BUILD --bindir bin --prefix /usr
meson compile -C $BURROW_GTK_BUILD
DESTDIR=AppDir meson install -C $BURROW_GTK_BUILD
/tmp/linuxdeploy --appimage-extract-and-run --appdir $BURROW_GTK_BUILD/AppDir --output appimage
mv *.AppImage $BURROW_GTK_BUILD