Steve Lipa <[EMAIL PROTECTED]> writes:

> I have found by trial and error that if I don't have this xmlns:etc
> line pointing to the directory that the documentation is in, the help
> system simply does not work for me.  The approach I am using is the
> only one that I have been able to get to work. 
> I think most plug-ins will be like mine, in that they will have
> built-in documentation, so it might make sense for the
> gimp-plugin-template to have an example of how to do it right.
> Failing that, I was hoping to do my plug-in right so people could
> use it as an example.   The other plug-ins I've looked at so far
> simply have not been any help.  

The example in the gimp-plugin-template is correct, works and it shows
how to install html files distributed with the plug-in. I don't
understand why you messed the template up so badly when all you had to
do was replacing "template" with the name of your plug-in and
providing a unique URL to identify the help domain registered by your

I will paste the gimp-help.xml from the gimp-plugin-template below and
explain once more what's going on:

The raw version:

<?xml version="1.0"?>
<gimp-help xmlns:template="http://developer.gimp.org/plug-in-template/help";>
  <help-item template:id="plug-in-template" ref="index.html" />

A commented version:

<?xml version="1.0"?>

  The classic XML header, just keep it.


  The toplevel element of each gimp-help.xml file is <gimp-help>.
  Here we define a namespace for the identifiers that we are going to
  register with the GIMP's help system. The namespace has the prefix
  "template", you should change this to the name of your plug-in,
  let's call it "foobar". The URI is _not_ pointing to any files on
  the world wide web. It's sole purpose is to provide a unique
  identifier. An identifier that is guaranteed not to be used by any
  other GIMP plug-in that registers help pages. The idea is that you
  use an address on your web-server, on your area of the web. You
  don't need to put any pages there, just make sure that it's a unique

<help-item template:id="plug-in-template" ref="index.html" />

  Here we install a mapping from an ID to a HTML file. You will notice
  that id is defined in the "template" namespace defined above. So you
  will need to use "foobar:id" here instead. The identifier
  "plug-in-template" is mapped to the file "index.html". This filename
  is relative to the position of gimp-help.xml that we are reading
  right now.

  There could be more lines like the above if you want to install more
  help IDs.


  This closes the top-level element again.

An example

So, assuming your plug-in is named "foobar", your gimp-help.xml would
look like this:

<?xml version="1.0"?>
<gimp-help xmlns:foobar="http://eos.ncsu.edu/plug-in-foobar/help";>
  <help-item foobar:id="plug-in-foobar" ref="index.html" />

I do hope this explanation clears things up. If you have further
questions, please ask them.

> In the good old days, users could install plug-ins in
> ~/.gimp-x.x/plug-ins.  Up until very recently, gimp-plugin-template
> (effectively) put plug-ins in ${prefix}/lib/gimp/2.0/plug-ins.  The
> latest CVS version doesn't. But if you say $(GIMP_LIBDIR) will put
> them in the right place then that's good enough for me!

The gimp-plugin-template Makefile installs the plug-in system-wide.
That's better then doing it for each user individually. But I will
look into adding a "user-install" make target that puts the plug-in
into the user's gimp directory. We need to make a 2.0.0 release of
gimp-plugin-template anyway. There are a few minor changes in CVS that
need to be released.

Gimp-developer mailing list

Reply via email to