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 may need to 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.
For babl, gegl and gimp symbols, we recommend to use GIMP SDK.
Configuring your build files
If you need to use dependencies not provided by GIMP SDK, the plug-in executable that you will create isn’t a dynamically linked one but an statically linked executable, which should be built on the said distro above.
babl, 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 properly 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 (if applicable), you will need to instruct users that your plug-in only works on the “Supported OS” indicated on GIMP download page mentioned before.