(Old) Build Scripts - LSFN/Design GitHub Wiki
Building uses Apache Ant. This is the standard for most Java projects. It's full of XML, which we all just love.
Note: I changed the folder structure slightly to accommodate this. It's certainly possible to make it work with the old folder structure, so if people object to the new one then revert it and give me a shout about updating the build script.
If we need something more complicated like automated dependency management for online repos, we could move to Maven (which is build on top of Ant). I think Maven is pretty yucky though. I'd also prefer to bundle our dependencies ourselves if they're not too massive since we live in an era of cheap bandwidth and disk space.
== Build Instructions ==
http://ant.apache.org/bindownload.cgi.
Download and installTest that you've set up Ant correctly by typing 'ant -version'.
http://code.google.com/p/protobuf/downloads/list or it should be on aptitude if you're using Linux.
Download and install protoc, the Protocol Buffers compiler. You can get it fromhttps://github.com/LukeusMaximus/LSFN.git (if you're not familiar with Git, you can grab a zip file containing the code from the 'Downloads' tab on the right of the linked page).
Checkout the LSFN repo atNavigate to the root of your checked out directory. If you're in the right place there should be a file called 'build.xml' (this is our Ant project file).
Type 'ant'.
The 'build' and 'bin' directories should now contain Java .class files and executable .jar files respectively.
'java -jar NameOfJarFile.jar' to run.
You can also type 'ant clean' to remove the build and bin directories and their contents.
== Building with Eclipse == Eclipse now works (following https://github.com/LukeusMaximus/LSFN/commit/0468843e55faa4f0ba932322ba479d02d92c0a31).
- Change your build directory for the LSFN project to 'build' instead of 'bin'.
- Eclipse for Java comes with the EGit plugin installed by default. Right click on the LSFN project -> hover over 'team'. There should be an option to make it a Git project under 'team'. Do this even if you're using Git on the command line, since it means that Git will pick up file deletes and moves from Eclipse properly.
ToDo: see if there's anything similar we need to get it to pick up our unit tests.
Eclipse only does basic Java -> class file compilation to start with. If you want it to also do the proto -> java or class -> jar compilation steps, the builders section of project properties lets you add compilation steps.
== ToDo ==
- Publish the binaries somewhere for people to download.
- Maybe write some bridging code and make releases that combine the parts of the server for a quick newbie-friendly start (possibilities are: single-player environment, single-player ships, single-ship environment).