A plugin is code that can extend the functionality of j-pilot without adding any code to j-pilot, or recompiling it. It is basically just a shared library that contains pre-defined callback functions.
A callback function is a function that is not called from the
application itself, but from an external program.; When
J-Pilot starts up it will scan the plugin directories for any
shared libraries (~/.jpilot/plugins/ and
$BASE_DIR/share/jpilot/plugins)
. When it finds a
shared library it will find callback functions inside of the
library and call them when needed. So, a plugin can be
an integral part of the overall program just by its existence
and when taken away the main program will still run only
missing the functionality that the plugin provided.
To find available plugins check my plugin page at jpilot.linuxbox.com/plugins.html where I keep a list.
If you plan on writing a plugin, check my pages http://jpilot.linuxbox.com/plugin.html for more information. I have gathered infos on how to write and how to implement. Good luck, users will be thankfull.
If you do create a plugin I would appreciate it if you would give me a link to the site so that I can put it on my website. This will encourage more people to use J-Pilot and your plugin. Even if you are working on a plugin you can let me know and I will put it down as in progress so that someone doesn't duplicate your effort. My email is judd@engineer.com.
To be able to use a plugin it has to be in the directory
$BASEDIR/share/jpilot/plugins
with
$BASEDIR
being /usr/local
under
normal circumstances. If located there JPilot will find it
checking the directory on the next startup and provide an
entry in the JPilot menu.
If you are having problems installing a plugin check the FAQ for further information.
To find out how to compile a given plugin check the archiv you downloaded for the INSTALL File. Normally the compilation should work using the standard commands:
./configure make make installHaving done that the new plugin should reside in the directory
$BASEDIR/share/jpilot/plugins
.
With that you have done everything necessary to install the plugin. After the next startup of JPilot you should be the proud owner of a shiny and fresh new plugin.
You can install a plugin system wide using the procedure
explained above into the directory
$BASEDIR/share/jpilot/plugins
. Doing that all
the users of the system can make use of the newly installed
plugin. But - you will need to be root
to do so.
If you want to install the plugin for just one user - because
of a reason what so ever - you can do so by installing the
plugin files (,,.so``) to the directory
$HOME/.jpilot/plugins
. That way only the user
can use the plugin that it was installed in.