generated from pkgforge-dev/TEMPLATE-AppImage
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake-appimage.sh
More file actions
39 lines (32 loc) · 1.7 KB
/
make-appimage.sh
File metadata and controls
39 lines (32 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
set -eu
ARCH=$(uname -m)
VERSION=$(pacman -Q cartridges | awk '{print $2; exit}')
export ARCH VERSION
export OUTPATH=./dist
export ADD_HOOKS="self-updater.bg.hook"
export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync"
export ICON=/usr/share/icons/hicolor/scalable/apps/page.kramo.Cartridges.svg
export DESKTOP=/usr/share/applications/page.kramo.Cartridges.desktop
export DEPLOY_SYS_PYTHON=1
export DEPLOY_GTK=1
export GTK_DIR=gtk-4.0
export ANYLINUX_LIB=1
export DEPLOY_LOCALE=1
export STARTUPWMCLASS=page.kramo.Cartridges # Default to Wayland's wmclass. For X11, GTK_CLASS_FIX will force the wmclass to be the Wayland one.
export GTK_CLASS_FIX=1
# Deploy dependencies
quick-sharun /usr/bin/cartridges \
/usr/lib/cartridges-search-provider \
/usr/lib/libgirepository*
# Patch cartridges python script to use AppImage directories
sed -i 's|"/usr/share/cartridges"|os.getenv("SHARUN_DIR", "/usr") + "/share/cartridges"|' ./AppDir/bin/cartridges
sed -i 's|"/usr/share/locale"|os.getenv("SHARUN_DIR", "/usr") + "/share/locale"|' ./AppDir/bin/cartridges
# Copy needed files for search-integration into gnome-shell
mkdir -p ./AppDir/share/dbus-1/services/ ./AppDir/share/gnome-shell/search-providers/
cp -v /usr/share/dbus-1/services/page.kramo.Cartridges.SearchProvider.service ./AppDir/share/dbus-1/services/page.kramo.Cartridges.SearchProvider.service
cp -v /usr/share/gnome-shell/search-providers/page.kramo.Cartridges.SearchProvider.ini ./AppDir/share/gnome-shell/search-providers/page.kramo.Cartridges.SearchProvider.ini
# Turn AppDir into AppImage
quick-sharun --make-appimage
# Test the final app
quick-sharun --test ./dist/*.AppImage