Plugin Manager

Sebastian Rodriguez

email: sebastian.rodriguez@utbm.fr


Contents

What is it?

The plugin Manager keeps track of the installed plugins to make it easier to upgrade your system. It also lets you install only those plugins that you want. It will download the plugin, remove the old version and, finally, install the new one.

Installing Plugins

You can also install madkit with the plugin manager. There are two way to install madkit with the plugin manger, from the network, via http, and from your local system. The advantage of installing madkit with the plugin manager is that it keeps track of plugins you installed and their versions. With this information upgrading your madkit installation is just a few clicks away. You can also install only the plugins that you need.

Here is a small step by step description to install madkit

Upgrading your plugins

Note: This section is only valid if you installed madkit from the network

When you want to check if a new release is available, click on Settings -> Update Plugin List. And then look plugins where the status in shown as "Needs Update".You can also directly click on "Upgrade" and let the plugin manager select the plugins that need an update. Finally click on "install"

Developers


Categories?

The plugin manager divides the plugins into categories. These categories are only used to show the plugins in a more order manner to the user and have no direct effect over the plugin it self. It can even change in the future.
For the moment the following categories exist:
Sources
contains only the plugins sources packages
Docs
Contains the plugin's documentations and, in the future, tutorials, technical papers, etc.
Bundle
Contains some bundle packages. Bundle packages are not plugins, but empty packages that depend on a set of plugins to make it easier to install. For instance, Madkit-full provides a full install of madkit.
demos
Contains Madkit demo plugins.
utils
utility plugins (e.g. plugin manager)
main
Contains the most important plugins in madkit, for example the Madkit Kernel plugin.
Turtlekit
TurtleKit is a development environment for building simple reactive agents. Loosely based on StarLogo.
Warbot
Warbot is a test bench for analyzing multi-agent coordination in a robot-like simulated war.

Ant Build file

Ant will generate for you all needed information to include your plugin in the "web distribution". Your plugin will be separated into three different packages: a binary package, a source package and a documentation package.

Binary
It includes all necessary files to ensure the proper execution of your plugin. (jar file, scripts etc.)
Source
Contains your plugin sources. (includes only the src directory)
Documentation
Contains the plugin's documentation as generated by the "doc" target

Properties used to generate the plugins packages:

project.name name of your plugin.

project.category It places your plugin to the specified category. If it is not defined your plugin will fall into the "unknown" category. This category is used only as a reference to make the plugin easier to find and its only used for the binary package. The source and documentation are in the "sources" and "docs" categories respectively.

depend: probably the most important property, here you define on which plugins your plugin depends on. It is a list of comma separated plugin names.

<property name="depend" value="madkitkernel, pythonlib"/>

zip.extra.inc.bin and zip.extra.inc.prefix if you need to and more than one jar file to your binary package, you can define these to properties. The first one is the jar file to include and zip.extra.inc.prefix is the prefix to use in the zip file. For example:

	<target name="web-dist" depends="jar">
		<property name="zip.extra.inc.bin" value="boot.jar"/>
		<property name="zip.extra.inc.bin.prefix" value="lib"/>
		<ant antfile="${generic.file}" dir="." target="web-dist" inheritrefs="true"/>
	</target>

Adding actions to your plugin

The plugin manager lets you also specify certain action to configure your plugin after the installation process.

To define the actions to use on a particular type of package (bin, src or doc) you must define a property on the web-dist target of the plugin's ant build file. The properties are:

For the moment only one action is available, docref.

DocRef Action

The DocRef action lets you add references to html documents. These references will be mainly used by the DocBrowers plugin.

The DocBrowser divides the references into sections, the main ones are:

The attributes of this action are:

Important: You don't need to add a docref action for the plugin API, this is automatically done by the ant generic file.

Here is an example taken from the communicator's build file.
<property name="madkit.plugin.actions.doc" 

value='<action id="docref" url="plugins/communicator/docs/communicator.html" name="Communicator Manual" section="manual"/>'/>

Troubleshooting

The Plugin manager crashes with a ZipException while updating the plugins list

While the plugins are checked with a md5sum, the plugins.zip file is not. So the plugin manager will try to open the downloaded file as a zip. However, the server might not allways send the zip. To verify if the plugins.zip is really being downloaded, try wget http://download.url/download.php?file=plugins.zip and check if the downloaded file is really a zip file. Normally you will find instead a html page, just look for the real url and use it as you Server Download url.