Maes
I like big butts!

Posts: 8664
Registered: 07-06 |
Randy87 said:
I've installed JDK and Eclipse. How do I go about compiling?
Heh I gotta include a HOWTO in the CVS sooner or later, but really, Mocha Doom is quite simple to build. If you want to build it with just a JDK and no eclipse, unzip the tarball, make sure there's a src folder in there. Create an output folder of your liking (e.g. a .\bin folder at the same level as the .\src one), cd into the src folder and compile everything into bin with:
code:
mkdir bin
cd src
java -d ..\bin i/Main.java
cd ..
and to run it:
code:
java -cp bin i/Main [parameters]
Of course in the distributed versions I make a jar out of all those output files and include some convenience scripts for starting.
This will start compiling from package i, class Main, and will "pull" everything needed with it automatically. Since Mocha Doom is entirely self-contained, for now, there's nothing else to worry about.
In Eclipse, just checking out the CVS (select "Import new project from CVS") or making a new Java project for an existing project (there should be a .project file in the CVS root) or existing source files (using src as a source folder) and letting Eclipse handle the build automatically should be enough, since there are no external dependencies. To run it, create a new Run configuration for i.Main, which also accepts the usual Doom command-line arguments. That's it. No Maven, no makefiles, no JNI, no libraries.
The only part that might be tough to compile without Eclipse, unless you know what you're doing, is the stuff in the testers package, which is not compiled along with the rest by just starting from i/Main.java, since it's not referenced by anything else in the package. These are mostly unit testers for various components (e.g. renderer, sound, wad manager, etc.) but most are largely obsolete and out of sync with the codebase, since they were mostly used in very early development. Most of the stuff in testers will appear redlined in Eclipse for this reason.
Also, there might be some .c and .h files and a few broken/unused .java files here and there, which are not meant to be compiled: they are either residuates I will eventually remove or stuff currently in development. Eclipse will redline them but ignore them, as they are not used in the build itself.
NOTE: as you might have noticed, the current CVS version has sound, along with other goodies. Make sure you have the latest-latest-latest version though, as e.g. just a few days ago, some sound classes used a restricted library which might not compile on every system. I've since removed this dependency.
Last edited by Maes on 06-14-11 at 10:14
|