HowToBuildStendhal: Difference between revisions

From Arianne
Jump to navigation Jump to search
Content deleted Content added
imported>Kymara
No edit summary
imported>Kymara
remove webstart instructions from here, it's a bit beyond the scope of this simple guide. src comes with all dependencies now. add cvs instructions.
Line 18: Line 18:
First you need ant properly installed on your system to build Stendhal.
First you need ant properly installed on your system to build Stendhal.


Then unpack the stendhal source gzip.
Then unpack the stendhal source gzip. From command line:
tar xzf stendhal-''version''-src.tar.gz

cd stendhal-''version''
<pre>
cd path/to/stendhal source
cd stendhal
</pre>

Now add any missing dependencies to the ''lib'' folder: ''TODO: check what these are''


Now just write:
Now just write:
ant dist
ant
This will build a full set of JAR files at stendhal-''version''/build/lib folder.


;Client files
This will build a full set of JAR files at stendhal/build/lib folder.
:build/lib/stendhal-''version''.jar
:build/lib/stendhal-data-''version''.jar
:build/lib/stendhal-sound-data-''version''.jar


Client files
;Server files
build/lib/stendhal-''version''.jar
:build/lib/stendhal-server-''version''.jar
build/lib/stendhal-data-''version''.jar
:build/lib/stendhal-xmlconf-''version''.jar
build/lib/stendhal-sound-data-''version''.jar
:build/lib/stendhal-maps-''version''.jar


If you want to create a full set of release packages you can write
Server files
ant dist
build/lib/stendhal-server-''version''.jar
build/lib/stendhal-xmlconf-''version''.jar
build/lib/stendhal-maps-''version''.jar


This will create binaries such as
== Webstart ==
;Client files
In order for webstart to work, the client .jar-files have to be signed. There is some documentation on http://java.sun.com how this works. So I will put here only a small piece of information to get it integrated into the build process:
:build/stendhal-''version''.zip
:build/stendhal-FULL-''version''.zip


;Server files
Put your private key into a file called keystore.ks into the stendhal-root folder
:build/stendhal-server-''version''.zip
Create a file called build.ant-private.properties with theses lines (replacing the values):

keystore.alias=''miguelangelblanchlardin@hotmail.com''
;Source files
keystore.password=''secret''
:build/stendhal-src-''version''.tar.gz


= Trouble shooting =
= Trouble shooting =
Line 63: Line 63:
will suffice. Remember to "ant clean" before you "ant build" everytime - this is done automatically if you "ant dist", however.
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.
<br>
<br>
<br>
<br>

Revision as of 23:20, 15 January 2010

Building Stendhal is very simple if you use ant and you satisfy the dependencies.

You can also Configure a development environment (IDE).

Requirements

To compile Stendhal you will need:

Optionally:

We do not include dependencies in the source download, to keep the size small. They are in CVS, however, and you can download them via the CVS webfrontend at http://arianne.cvs.sourceforge.net/arianne/stendhal/libs/

Build

Build 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

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

If you want to create a full set of release packages you can 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

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.



Back to stendhal main wiki page