User Guide

GNU Image Manipulation Program
139 / 653
Xtns/Plugins Details) search the plug-in by its name and look ot the Tree view tab. If you still don’t find, finally explore the
menus or look at the source code in the Register section -- whichever is easiest.
For more complex plugins, organized as a directory with multiple files, there ought to be a file inside called either INSTALL or
README, with instructions. If not, the best advice is to toss the plugin in the trash and spend your time on something else: any
code written with so little concern for the user is likely to be frustrating in myriad ways.
Some plugins (specifically those based on the GIMP Plugin Template) are designed to be installed in the main system GIMP
directory, rather than your home directory. For these, you will need to be root to perform the final stage of installation (when
issuing the make install command).
If you install in your personal plugin directory a plugin that has the same name as one in the system plugin directory, only one
can be loaded, and it will be the one in your home directory. You will receive messages telling you this each time you start GIMP.
This is probably a situation best avoided.
11.1.3.2 Windows
Windows is a much more problematic environment for building software than Linux. Every decent Linux distribution comes
fully supplied with tools for compiling software, and they are all very similar in the way they work, but Windows does not come
with such tools. It is possible to set up a good software-building environment in Windows, but it requires either a substantial
amount of money or a substantial amount of effort and knowledge.
What this means in relation to GIMP plugins is the following: either you have an environment in which you can build software,
or you don’t. If you don’t, then your best hope is to find a precompiled version of the plugin somewhere (or persuade somebody
to compile it for you), in which case you simply need to put it into your personal plugin directory. If you do have an environment
in which you can build software (which for present purposes means an environment in which you can build GIMP), then you no
doubt already know quite a bit about these things, and just need to follow the Linux instructions.
If you would like to set up a build environment, and are ready for the heroism involved, you can find a reasonably recent
description of how to go about it in the GIMP Wiki, at HowToCompileGimp/MicrosoftWindows [
GIMP-WIKI01]. Since it is a
Wiki, anybody is free to edit it, so please keep it up to date by adding advice based on your own experiences.
11.1.3.3 Apple Mac OS X
How you install plugins on OS X mostly depends on how you installed the GIMP itself. If you were one of the brave and
installed GIMP through one of the package managers like fink [
DARWINORTS] or darwinports, [FINK] the plugin installation
works exactly the way it is described for the Linux platform already. The only difference is, that a couple of plugins might be
even available in the repository of you package manager, so give it a try.
If you on the other hand are one of the Users that preferred to grab a prebuild GIMP package like GIMP.app, you most probably
want to stick to that prebuild stuff. So you can try to get a prebuild version of the plugin of you dreams from the author of the
plugin, but I’d not want to bet on this. Building your own binaries unfortunately involves installing GIMP through one of the
package managers mentioned above.
11.1.4 Writing Plugins
If you want to learn how to write a plugin, you can find plenty of help at the GIMP Developers web site [GIMP-DEV-PLUGIN].
GIMP is a complex program, but the development team has made strenuous efforts to flatten the learning curve for plugin writing:
there are good instructions and examples, and the main library that plugins use to interface with GIMP (called ‘libgimp’) has
a well-documented API. Good programmers, learning by modifying existing plugins, are often able to accomplish interesting
things after just a couple of days of work.
11.2 Using Script-Fu Scripts
11.2.1 Script-Fu?
Script-Fu is what the Windows world would call "macros" But Script-Fu is more powerful than that. Script-Fu is based on an
interpreting language called Scheme, and works by using querying functions to the GIMP database. You can do all kinds of