How to package a plugin that will work on AppImage
Special actions need to be taken in order for binary plug-ins work on the Linux AppImage version of GIMP. Specifically, they should be statically linked. This is due to AppImage sandboxing of dependencies, for example. From start, they needs:
- compatible distro for building
- modern build files
- clear install instructions
Ensuring the right build distribution
Since the .AppImage is generated from a choosen distribution and version, binary plug-ins should be built accordingly to ensure the right symbols.
The devel-docs/os-support.txt file on GIMP source is the reference but
you may need to double-check the https://gimp.org/downloads page to safe.
Configuring your build files
The plug-in executable that you will create isn’t a dynamically linked one but an statically linked executable. So, at configure, if you use meson, you can set:
meson setup my_builddir -Ddefault_library=staticbabl, GEGL and GIMP should still be linked dynamically, since the AppImage take care of these for you at runtime by preloading their symbols (and because your plugin license may not be compatible with babl/GEGL/GIMP GPLv3). For example:
babl = dependency('babl-0.1', static: false)
gegl = dependency('gegl-0.4', static: false)
gimp = dependency('gimp-3.0', static: false)
executable('my_pluginexecutable',
'main.c',
dependencies: [ babl, gegl, gimp ])libgimp
(provided by gimp dependency).Instructing plug-in users
The only thing a user needs to do is to copy the statically linked plug-in to the GIMP config dir.
--appimage-extract debug option to install your plug-in.If you can’t make a statically linked executable, you will need to instruct users that your plug-in only works on the “Supported OS” indicated on GIMP download page mentioned before.