GIMP for Mac

Installing scripts and plug-ins

Installation and Mac OS specific issues.

Installing scripts and plug-ins

Postby Auria » Sun Apr 06, 2008 6:19 pm

python and scheme scripts are interpreted thus very easy to install.
  • Scheme (.scm) scripts can go in [your home]/Library/Applications Support/Gimp/scripts (create directory if necessary)
  • Python (.py) scripts can go in [your home]/Library/Applications Support/Gimp/plug-ins (create directory if necessary)

C plugins, on the other hand, are more difficult since they usually need to be built from source first.

To build plug-ins, you will first of all need GIMP installed from source via macports (see compilation guide for more info on this). Note that in order to compile plugins you need at least some experience using the terminal to build stuff from source otherwise you will probably get lost very quickly

The first problem we meet is that every plugin provides its own build system and there is standard build system. Some are autotools-based (http://gimp-texturize.sourceforge.net), others simply provide makefiles (http://registry.gimp.org/node/471, http://registry.gimp.org/node/137) sometimes there is a makefile specifically for mac, sometimes there isn't. In those cases the linux makefile will usually work fine unless they use uncommon compilation flags.

First, re-create the symlink just like during compilation
(remove /tmp/skl if created by Gimp.app)
Code: Select all
mkdir -p /tmp/skl
cd /tmp/skl
ln -s ~/src/macports/Gimp.app Gimp.app
cd -


set-up your environment
Code: Select all
export PATH=$PATH:/tmp/skl/Gimp.app/Contents/Resources/bin
export PKG_CONFIG_PATH=/tmp/skl/Gimp.app/Contents/Resources/lib/pkgconfig
export GIMPTOOL=/tmp/skl/Gimp.app/Contents/Resources/bin/gimptool-2.0


depending on what you are building and your environment you may need to set more envrionment variables

Now time to build the plug-in. Below are just generic guidelines, you'll need to read the plug-in's own instructions and adapt them for your computer

If your plug-in is autotools-based, you'll probably have the easiest time this way
Code: Select all
./configure --prefix=/opt/gimp-plugin
make
sudo make install #may or may not be necessary; if you do check output to see where it's sending the plug-in executable

In this snippet i'm sending the files to /opt/gimp-plugin so they're easier to find. you may want to wipe this directory once you're done.

if it is makefile based, it may look like that
Code: Select all
# a single makefile for all
make

# a makefile for each platform
make -f makefile.macosx # adapt name as needed

# a makefile with a target for each platform
make macosx # adapt target name as needed

# a makefile with a target for each platform, and none for mac
make linux # adapt target name as needed


Once the plug-in is built, no matter how no matter where, locate the generated plug-in executable file and copy it to ~/Library/Application Support/Gimp/plug-ins (create directory if necessary)

Then open GIMP and cross your fingers ;)
Members don't see the above ad. Register now - it's free!
User avatar
Auria
Retired Staff
 
Posts: 479
Joined: Sun Mar 16, 2008 9:07 pm

Re: Installing scripts and plug-ins

Postby Dominus » Tue Aug 24, 2010 9:18 pm

Thanks, I'm gonna try this out for our shp file plugin. Really great guides now online, especially right now when I came here specifically to ask for such guides :)

Edit sometimes I'm such a noob, I thought this was a much newer post, maybe I should get some sleep after all
Dominus
Newbie
 
Posts: 5
Joined: Mon Dec 07, 2009 11:03 pm


Return to GIMP for Mac

cron

Who is online

Users browsing this forum: No registered users and 3 guests