Skip to content

Ant How To For building SMEE packages

Herbert Veitengruber edited this page Jan 27, 2014 · 10 revisions

About Ant

Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other. The main known usage of Ant is the build of Java applications.

http://ant.apache.org/

But Ant can easily used to build and deploy any kind of software, even for building a Starbound mod.

Setting up Ant in Eclipse

First if you haven't download a Eclipse distribution: http://www.eclipse.org/downloads/ Good thing besides using it for Ant is, there are also plugins for JSON and LUA.

Setup a new empty Projekt named "Starbound-Mass-Effect-Edition". Copy your contents of your Starbound-Mass-Effect-Edition folder in this new one (also .git).

Hit F5 to refresh your project. You now see all SMEE files in your Package Explorer.

Now click on "External Tools" the green play button with the suitcase in the icon bar. Click on External Tool configuration. Create a new launch configuration.

In the main tab add:

Buildfile: ${workspace_loc:/Starbound-Mass-Effect-Edition/ant/buildSMEE.xml}

Base Directory: ${workspace_loc}

In the JRE tab you may have to adjust the jre path. This happens if you have installed more than one Java runtime parallel. Like me, I installed 64 and 32 bit parralel. If you only have one Java Runtime, you can skip this.

If you now open the "External Tools" with the black arrow again something like, "Starbound-Mass-Effect-Edition buildSMEE.xml" should appear. By clicking on it, the build process is started.

Folders Overview

Inside the ant folder there is a sub-folder "template" where all data is organized:

  • SMEE root
    • ant
      • ant-contrib (external ant libs)
      • templates
        • optional
        • SMEE
    • optional
    • SMEE
    • SMEEtest
    • release (created by build script not tracked with git)

"ant" folder

  • build.properties - configuration file for builSMEE.xml
  • buildSMEE.xml - ant build script.

"templates" folder

  • lastchanges.txt - list with the last changes.

Building SMEE

What happens if I start a build

All files inside the template folder contain wildcards, e.g. @MOD_VERSION or @SB_VERSION. These template files are copied to thier appropriate into the SMEE and optional folder of our SMEE root folder (see above).

After coping the Wildcards are replaced, so inside our SMEE and optional root folder there are always functional .modinfos, etc., and if we decide to abbandon ant, we just need to remove the ant folder from our project and everything is fine.

After the root folders are updated, the SMEE files are packed into SMEECore.zip and the optional files are packed into SMEEoptional.zip These 2 files can now uploaded. DONE.

Updating the Readme

Both in the SMEE folder and the optional folder are Readme.txt files if you want to change anything. You can do it here.

Updating the change log

Inside the templates folder you will find.

Build options

Clone this wiki locally