This is an (as of yet experimental) plugin for linuxdeploy. Its job is to bundle additional resources for applications that use GTK, and for common dependencies. Those involve GLib schemas for instance.
This plugin requires the following dependencies in order to work properly:
file
commandfind
commandpkg-config
orpkgconf
command- librsvg2 development files
- GTK development files
- GObject Introspection development files
# get linuxdeploy and linuxdeploy-plugin-gtk
> wget -c "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh"
> wget -c "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
# make them executable so that we can call them (and also, plugins called from linuxdeploy are called like binaries)
> chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-gtk.sh
# get list of variables
> ./linuxdeploy-plugin-gtk.sh --help
# first option: install your app into your AppDir via `make install` etc.
# second option: bundle your app's main executables manually
# see https://docs.appimage.org/packaging-guide/from-source/native-binaries.html for more information
> [...]
# call through linuxdeploy
> ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin gtk --output appimage --icon-file mypackage.png --desktop-file mypackage.desktop
This plugin is written in bash and goes through a series of steps to make sure that all the libraries and other files are pulled in for GTK apps to work properly once in the AppImage. The steps include:
- Detects the GTK version to use
- Installs itself as a hook in
$APPDIR/apprun-hooks
- Uses
gsettings
to set a light or dark adwaita theme - Installs the GLib schemas and then runs
glib-compile-schemas
on them - Installs the GIRepository typelibs for gobject-introspection
- Copies the GTK libs and sets GTK path related environmental variables to 1 locations in the APPDIR
- Updates the input method module registration (immodules) cache
- Installs the GDK Pixbuf libraries and cache, and then updates the cache 1 using gdk-pixbuf-query-loaders
- Installs additional libraries including Gdk, GObject, Gio, librsvg, Pango, 1 PangoCairo, and PangoFT2
- Manually sets the RPATH for the GTK modules