PluginDevGuide Building

From VuzeWiki
Jump to: navigation, search
You can download the code for this tutorial here. The JAR file can be opened in any program which can open up ZIP files, and contains both the compiled code and the source code.
Version: 0.1
Link: Download
Description: Bare plugin template.

Plugin Development Guide: Building the plugin[edit]

OK, if you want to share the plugin to other people, you'll have to build it. And here's how to do it in Eclipse.

(Note: If you've followed the previous step of running the plugin, and you're using your normal Azureus configuration settings (you didn't override it), then you will need to remove the plugin subdirectory that you created - then when you run Azureus, you can install the plugin normally).

  • Go to File -> Export.

PluginDevGuide Building 1.png

  • Choose to export to a JAR file. You'll need to select all of the packages (in this case, azplugin.aizen and azplugin.aizen.messages), and the plugin.properties file.
  • You'll need to tick the "Export generated class files..." option. Optionally, you can tick the "Export java source files..." if you want to include the source code in the JAR file. You can use this same building mechanism to distribute a JAR file containing just the source code if you want.
  • Choose the file name - preferably it should be of the form <plugin_id>_<version_id>.jar (aizen_0.1.jar in this example).
  • The default settings should be fine for the next few stages.

PluginDevGuide Building 2.png

  • Now run Azureus (not from within Eclipse, just normally), and from the menu, select Plugins -> Installation Wizard.

PluginDevGuide Building 3.png

  • Choose to install from file, and select the JAR file you just built. If for any reason Azureus doesn't recognise it as a plugin, it will display some error text and not allow you to proceed.

PluginDevGuide Building 4.png

  • For your own plugins, Azureus will warn you that it is not an official plugin - you need someone from the Azureus team to sign your plugin to stop this warning from appearing. The fact that the plugin hasn't been signed won't actually stop you from being able to install it.

PluginDevGuide Building 5.png

  • The installation has gone fine, so let's check the Options -> Plugins page.

PluginDevGuide Building 6.png

  • And there it is! The plugin has installed successfully.

PluginDevGuide Building 7.png

So, we've covered all the basic steps needed to prepare, run and build a plugin. Now that you know how to put a plugin together, we'll now concentrate on what you can actually make the plugin do.