LateralGM:Building - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Herein I will only cover the official way to build LateralGM from source. Other ways are welcome, and if you wish to document your own way, feel free to update this page with it.

This process is for the newer Git repository. For those interested, our older SVN-based process has been archived to LateralGM:Building svn.

Prerequisite Tools

You will need several tools. Visit their pages for installation instructions. The next sections explain how to link them together appropriately.

  • Java 6 JDK (must be JDK, because the JRE cannot compile) - This is the compiler for the language that we use. You may use Oracle JDK or OpenJDK.
  • Eclipse (this document assumes 3.5: Galileo, 3.6: Helios, or 3.7: Indigo, but other versions may be similar, and prior versions should work fine) - Eclipse is the IDE we use to work with our files. You can think of it as a really fancy text editor. Aside from Eclipse, the only other documented method of building is from the command line (which still requires the eclipse compiler), so you're on your own if you want to use another IDE.
  • EGit (eclipse plugin) - Allows Eclipse to interact with Git repositories.
  • JoshEdit (code editor) - Used as the default code editor for LateralGM. Maintained as a separate project. Only needed if you're going to checkout the joshedit branch of LateralGM (master branch uses an internal editor: JEdit).

Checking out JoshEdit

You will only need to checkout JoshEdit if you are planning on using the joshedit branch of LateralGM. You will simply want to repeat the LateralGM instructions below with the JoshEdit repository URI instead.

Ensure that the project is named JoshEdit, because that's the name that LateralGM expects to find it under. Otherwise, after you checkout LateralGM you'll have to update the build path.

Checking out LateralGM

If you are going the command line route, follow the command line instructions. Otherwise, follow the Eclipse instructions. Note that the eclipse instructions will create a valid git directory which you may interact with via command line if you do so desire. Meaning that there is no reason to do both unless you want to have two copies of the LateralGM project lying around...

Command Line

git clone  cd LateralGM git checkout desired-branch-name-here

Eclipse

Follow the steps at EGit#Checkout. For the HTTP URI for LateralGM, normally you would provide the following: https://github.com/IsmAvatar/LateralGM.git (see note below). You will probably want the joshedit branch, so when it asks which branches you wish to clone, keep both selected, but in the next screen it will ask you for your initial branch in a dropdown, and that is when you select joshedit.

At this point, you have everything you need to modify/run it. Simply right click the Project in the Project Explorer (the one named LateralGM), and select Run As > Java Application. Of course, running it is completely optional. If you run it this way, most likely no plugins will be loaded, because it won't know where to locate the "plugins" folder.

Note: If you wish to use another repository (like one you forked) you will need to find out your URI and use that instead.

Build

Command Line

make is usually sufficient. Note that the makefile currently needs to be updated in the joshedit branch because it does not account for the external JoshEdit dependency.

Eclipse

  1. Locate the jardesc, found by expanding your project and locating a file usually named "description.jardesc".
  2. Right Click on the jardesc > Create Jar (about 3/4ths down the menu). You may see a warning, but your project probably exported fine.

Your jar will be created inside the LateralGM folder. You might need to refresh the folder to see it. Either right-click LateralGM and click Refresh, or Left click and hit F5 (the shortcut key).

To stick it somewhere else, either copy, cut, or drag the file to the desired location (such as your desktop).

You may need to ensure that the jar is marked as Executable before attempting to run it.

If you named your project something other than LateralGM or want to alter the way that the jar is exported, you will need to edit the Jardesc.