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.
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)"
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.
MACOSX_DEPLOYMENT_TARGET env var to the
macOS version on Info.plist (present inside the .app you are targeting).