envision/dist/appimage/build_appimage.sh
Gabriele Musco e781736ffa
Some checks are pending
/ cargo-fmtcheck (push) Waiting to run
/ cargo-clippy (push) Waiting to run
/ cargo-test (push) Waiting to run
/ appimage (push) Waiting to run
feat: single stage ci with tests, clippy and fmt check all in one
2024-12-17 07:17:51 +01:00

31 lines
947 B
Bash
Executable file

#!/bin/bash
set -e
if [[ ! -f Cargo.toml ]]; then
echo "Please run this script from the repo root"
exit 1
fi
meson setup appimage_build -Dprefix=/usr -Dprofile=default
meson test -C appimage_build --print-errorlogs
DESTDIR="$PWD/AppDir" ninja -C appimage_build install
curl -SsLO https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
cp dist/appimage/linuxdeploy-plugin-gtk.sh ./
if [ -f "AppDir/usr/share/icons/hicolor/scalable/apps/org.gabmus.envision.Devel.svg" ]; then
APPID="org.gabmus.envision.Devel"
else
APPID="org.gabmus.envision"
fi
./linuxdeploy-x86_64.AppImage \
--appimage-extract-and-run \
--appdir AppDir \
--plugin gtk \
--output appimage \
--icon-file AppDir/usr/share/icons/hicolor/scalable/apps/$APPID.svg \
--desktop-file AppDir/usr/share/applications/$APPID.desktop
rm ./linuxdeploy-plugin-gtk.sh