HowToBuildStendhal: Difference between revisions
imported>Hendrik Brummermann |
imported>Hendrik Brummermann |
||
| Line 52: | Line 52: | ||
:build/lib/stendhal-maps-''version''.jar |
:build/lib/stendhal-maps-''version''.jar |
||
Note: If you are unsure, use the first section (ant dist) to get a working system with all the files in the correct |
Note: If you are unsure, use the first section (ant dist) to get a working system with all the files in the correct directory structure. |
||
=== Build using IDE === |
=== Build using IDE === |
||
Revision as of 22:23, 3 May 2011
Building Stendhal is very simple if you use ant and you satisfy the dependencies.
Requirements
To compile Stendhal you will need:
- stendhal source as a stendhal-version-src.tar.gz
http://arianne.sourceforge.net/?arianne_url=games/game_stendhal#downloads - Java SDK 1.5
http://java.sun.com or higher or e.g.
sudo aptitude install sun-java6-jdk
- Ant 1.6
http://ant.apache.org or e.g.
sudo aptitude install ant
Build
Build a distribution using ant
First you need ant properly installed on your system to build Stendhal.
Then unpack the stendhal source gzip. From command line:
tar xzf stendhal-version-src.tar.gz cd stendhal-version
Now just write:
ant dist
This will create binaries such as
- Client files
- build/stendhal-version.zip
- build/stendhal-FULL-version.zip
- Server files
- build/stendhal-server-version.zip
- Source files
- build/stendhal-src-version.tar.gz
Building just the jar files
To only build the jar file, you just write
ant
This will build a full set of JAR files at stendhal-version/build/lib folder.
- Client files
- build/lib/stendhal-version.jar
- build/lib/stendhal-data-version.jar
- build/lib/stendhal-sound-data-version.jar
- Server files
- build/lib/stendhal-server-version.jar
- build/lib/stendhal-xmlconf-version.jar
- build/lib/stendhal-maps-version.jar
Note: If you are unsure, use the first section (ant dist) to get a working system with all the files in the correct directory structure.
Build using IDE
You can also Configure a development environment (IDE).
Trouble shooting
If you have the message error:
stendhal_source/build.xml:42: Could not create task or type of type: replaceregexp.
For linux users this is corrected by installing the "ant-apache-regexp" package. If you use debian or another debian dist (like Ubuntu) this is included in the "ant-optional" package.
Finally
When you have successfully built Stendhal please read the install documentation. It is available on the Wiki at InstallingStendhal.
In future if you wish to just create the client and server jars (not zips and all release packages) then
ant clean compile
will suffice. Remember to "ant clean" before you "ant build" everytime - this is done automatically if you "ant dist", however.
CVS
Assuming you have CVS installed, you can instead download our source from our CVS HEAD:
cvs -d:pserver:anonymous@arianne.cvs.sourceforge.net:/cvsroot/arianne login cvs -z3 -d:pserver:anonymous@arianne.cvs.sourceforge.net:/cvsroot/arianne co -P stendhal
Which will check out a copy of the stendhal source into a folder called stendhal. Then follow the steps to build using ant as before. If you are asked for a password during checkout, just leave it empty and hit enter.