Skip to content
Setting up GIMP SDK

Setting up GIMP SDK

Depending on the language you plan to create a resource for GIMP, using GIMP SDK may be useful. This allows to quickly build resources like C plug-ins and C GEGL filters, for example, without bothering too much about technical things like linking etc.

Getting the SDK

We ship GIMP SDK inside all the official/upstream packages we distribute.

It is composed by pkg-config files, unversioned libraries and headers pertinent to our main API libraries, so it is very lightweight and portable.

GIMP SDK dependencies

The only thing you need to install is the toolchain (compiler and pkg-config), all the rest needed to link to the API libraries is already on the official packages.

Installing GIMP dependencies will automatically install both the compiler and pkg-config but also other dependencies not needed by the API libraries, which can be useful if your resource needs the later.

Only the libraries from GIMP SDK (the ones with .pc files and .a or symlinks) are guaranteed to be present on future GIMP minor versions. The other libraries (used by GIMP core) can change even between micro versions without notice.

Configuring the environment

The build environment variables needed to build with GIMP SDK are the same as for building GIMP. Just take care of pointing GIMP_PREFIX to the package directory if targeting a relocatable package:

  • Linux .APPIMAGE: GIMP_PREFIX="$(echo /tmp/.mount_GIMP*/usr)"
  • Windows .EXE: normally either $GIMP_PREFIX="$(Resolve-Path "$env:LocalAppData\Programs\GIMP*")" or $GIMP_PREFIX="$(Resolve-Path "$env:ProgramFiles\GIMP*")"
  • Windows .MSIX: $GIMP_PREFIX="$(Resolve-Path "$env:ProgramFiles\WindowsApps\GIMP*\VFS\ProgramFilesX64\GIMP")"
  • macOS .DMG: normally GIMP_PREFIX="$(echo /Applications/GIMP*.app/Contents)"
If the package you are targeting is non-relocatable, which is the case of the AppImage at a certain extent, Flatpak and Snap, this section is of no use. Go to How to package a plugin that will work on AppImage, How to package a plugin that will work on Flatpak and How to package a plugin that will work on Snap instead.

Building the resource with GIMP SDK

Once the SDK is properly set as per instructions above, you are ready to build. Please keep an eye at How to write a plug-in and How to write a filter tutorials when gimptool is requested. It will just work.

Before building, on macOS, set MACOSX_DEPLOYMENT_TARGET env var to the macOS version on Info.plist (present inside the .app you are targeting).
Last updated on