Building the Plugin that interfaces between
LateralGM and ENIGMA is
usually done by a developer with a full arsenal of developer tools.
Fortunately, the process has been simplified and documented for
interested parties. These instructions walk you through the process of
installing the necessary tools (or even the full arsenol) and then
performing a build in ways officially recognized by the devs. Other
methods are welcome, of course, and do feel free to document them here.
This process is for the newer Git repository. For those interested, our
older SVN-based process has been archived to Plugin:Building
svn.
The dependencies (LGM and JNA) are usually included in an install from
the ENIGMA repository, as is The Plugin's source code, so chances are
you already have a copy. If not, please follow the appropriate
instructions on the Install page.
The required files will usually be located in the following locations:
You can optionally import the LateralGM and JoshEdit projects into
Eclipse, if you are interested in developing either of those (LateralGM
requires JoshEdit). In this case, you will not need the lgm16b4.jar
dependency. Instructions for installing them may be found at
LateralGM:Building.
Or, you may download them from their respective websites.
Start up Eclipse, if you haven't already. In the briefest of terms, we
need to load up The Plugin source as a project, and then modify the
build path to add the dependencies as external jars. At first hand,
these may seem like fairly simple tasks, but Eclipse is a very powerful
program with many menu and wizard options that you won't be using, so
it's very easy to get lost in the menus and wizards. As such, this
section explains how to do this, step by step.
We begin by creating a New Java Project which will contain our plugin's
source.
If you don't see Java Project as an option, you probably don't have the
Eclipse JDT installed, so close Eclipse, install the JDT, restart
Eclipse, and try again.
Once you have done this, you will be taken to the New Java Project
wizard.
At this point, you need to know whether your Plugin Source code is
contained in a directory (such as enigma-dev/pluginsource, or from
extracting enigma.jar) or inside enigma.jar.
And now we import.
/ is checked in the left tree pane.The Plugin needs some external jars linked in. In order to make this
process more modular among other projects, The Plugin defines a library
for each of the external jars. You still need to link in the jars, but
rather than linking them straight into the project, you can link them to
their respective library. This is useful for a developer because then
other projects which use the same jars can simply link in the library
without needing to locate the jar again. Since the libraries are already
defined, this section will only cover how to link the jars up with the
libraries.
The libraries are named as follows (this can be seen by configuring the
build path directly), along with their usual jar locations:
To configure these libraries, take the following steps:
Now we need to link these libraries in to our project.
If you already have LateralGM and JoshEdit imported into Eclipse and
want to use them, do *not* select them from the Libraries list.
Instead:
After that, we're done with our build path dependencies. You can OK out
of the dialog.
Find the file named description.jardesc in the root of the project,
right click it, and click "Create Jar". Your jar will be created inside
the Project, named "enigma.jar", so you can simply drag it out or copy
and paste it to the desired location, like enigma-dev's installation on
your filesystem.
If you named your project something other than Enigma or want to alter
the way that the jar is exported, you will need to edit the
Jardesc.
If you run into any problems, feel free to ask around for help. Check on
the IRC because some other people may have experience
with the process. The most helpful person would probably be
User:IsmAvatar, since she is the dev who
maintains The Plugin and usually is responsible for building it.
Wiki: DLL
Wiki: ENIGMA
Wiki: IRC
Wiki: Install
Wiki: Integrated_development_environment
Wiki: JNI
Wiki: Jardesc
Wiki: LateralGM
Wiki: Plugin