HowToBuildStendhal: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>StephenIerodiaconou
mNo edit summary
imported>AntumDeluge
mNo edit summary
 
(235 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{Navigation for Stendhal Top|Building & Hosting}}
Building Stendhal is very simple if you use ant and you satisfy the dependencies.
{{Navigation for Stendhal Builders and Hosters}}


=Requirements=
To compile Stendhal you will need:
* Java SDK 1.5<br>http://java.sun.com
* Ant 1.6<br>http://ant.apache.org
* Marauroa<br>http://arianne.sourceforge.net


= Build=
= Build Tools =
==Build using ant==
First you need ant properly installed on your system to build Stendhal.
Second you need to compile successfully Marauroa using the compile task.


See [[HowToBuildStendhal/BuildTools|build tools page]].
There are several ant tasks.
You have to run it as:
<pre>
ant task_name -D...
</pre>


===compile===
Compiles Stendhal into build folder and copies all needed files to their correct place.
<pre>
Buildfile: build.xml


= Components =
init:
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\build
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\lib
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\javadocs


All component packages, other than Android client, can be built with a single Ant command: <span style="color:darkred;">''ant dist''</span>. This will output the following:
compile:
[copy] Copying 3 files to D:\Desarrollo\arianne\stendhal\build\sprites
[copy] Copying 3 files to D:\Desarrollo\arianne\stendhal\build\games\stendhal\server\maps
[javac] Compiling 23 source files to D:\Desarrollo\arianne\stendhal\build


* ''<span style="color:darkblue;">build/stendhal-&lt;version&gt;-src.tar.gz</span>''
BUILD SUCCESSFUL
* ''<span style="color:darkblue;">build/stendhal-server-&lt;version&gt;.zip</span> (includes web client)''
Total time: 3 seconds
* ''<span style="color:darkblue;">build/stendhal-&lt;version&gt;.zip</span> (Java client)''
</pre>
* ''<span style="color:darkblue;">build/stendhal-webclient-&lt;version&gt;.zip</span> (requires server)''
* ''<span style="color:darkblue;">build/stendhal-starter-&lt;version&gt;.zip</span> (obsolete)''


''<span style="color:darkblue;">'''TODO:''' Instructions for individual components.</span>''
===clean===
Removes any trace of compiled stuff from stendhal.
<pre>
Buildfile: build.xml


== Server and Web Client ==
clean:
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\build
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\lib
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\javadocs


== Desktop Client ==
BUILD SUCCESSFUL
Total time: 0 seconds
</pre>
===jar===
Builds a stendhal-''version''.jar and stendhal-server-''version''.jar file inside the lib folder.


== Java Desktop Client ==
This task requieres that you write an extra propierty for the path of marauroa compiles code.
<pre>
ant jar -Dlibdir=jars -Dmarauroa_build=../marauroa/build
</pre>


== Android Client ==
<pre>
Buildfile: build.xml


* [[BuildStendhalForAndroid#WebView_Client|Build Stendhal WebView Client for Android]]
init:
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\build
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\lib
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\javadocs


client_compile:
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\build
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\build
[copy] Copying 3 files to D:\Desarrollo\arianne\stendhal\build\sprites
[javac] Compiling 18 source files to D:\Desarrollo\arianne\stendhal\build


= Systems =
client_jar:
[jar] Building jar: D:\Desarrollo\arianne\stendhal\lib\stendhal-0.00.jar


== Windows ==
server_compile:
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\build
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\build
[copy] Copying 3 files to D:\Desarrollo\arianne\stendhal\build\games\stendhal\server\maps
[javac] Compiling 6 source files to D:\Desarrollo\arianne\stendhal\build


* [[VisualGuideToBuildingStendhal|Visual Guide to Building Stendhal on Windows®]]
server_jar:
[jar] Building jar: D:\Desarrollo\arianne\stendhal\lib\stendhal-server-0.00.jar


== GNU/Linux ==
jar:


* [[BuildStendhalOnUbuntu|Building Stendhal on Ubuntu® - Installation Guide Step-by-step]]
BUILD SUCCESSFUL
Total time: 4 seconds
</pre>
===release===
This is a convenience task used to build the released files of stendhal:
* stendhal-''version''-src.tar.gz that contains all source code
* stendhal-''version''.zip that contains the compiled version of stendhal client plus the needed dependencies to make it work.
* stendhal-server-''version''.zip that contains the compiled version of stendhal server.


== Mac OS X ==
This task requieres that you write an extra propierty for the path of marauroa compiles code.
<pre>
ant release -Dlibdir=jars -Dmarauroa_build=../marauroa/build
</pre>


* [[BuildStendhalOnMacOsX|Build Stendhal On Mac Os X]]
<pre>
Buildfile: build.xml


== Android WebView Client ==
init:
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\build
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\lib
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\javadocs


* [[BuildStendhalForAndroid#WebView_Client|Build Stendhal WebView Client for Android]]
server_compile:
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\build
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\build
[copy] Copying 3 files to D:\Desarrollo\arianne\stendhal\build\games\stendhal\server\maps
[javac] Compiling 6 source files to D:\Desarrollo\arianne\stendhal\build


= General Information =
server_jar:
[jar] Building jar: D:\Desarrollo\arianne\stendhal\lib\stendhal-server-0.00.jar


* [[HowToGetLatestStendhal|How to get the latest version?]]
release_server_binary:
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\stendhal-server-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-server-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-server-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-server-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-server-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-server-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-server-0.00
[zip] Building zip: D:\Desarrollo\arianne\stendhal\stendhal-server-0.00.zip
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\stendhal-server-0.00


client_compile:
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\build
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\build
[copy] Copying 3 files to D:\Desarrollo\arianne\stendhal\build\sprites
[javac] Compiling 18 source files to D:\Desarrollo\arianne\stendhal\build


[[Category:Development]]
client_jar:
[jar] Building jar: D:\Desarrollo\arianne\stendhal\lib\stendhal-0.00.jar

release_client_binary:
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[zip] Building zip: D:\Desarrollo\arianne\stendhal\stendhal-0.00.zip
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\stendhal-0.00

release_binary:

clean:
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\build
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\lib
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\javadocs

release_source:
[mkdir] Created dir: D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 24 files to D:\Desarrollo\arianne\stendhal\stendhal-0.00\src
[copy] Copying 3 files to D:\Desarrollo\arianne\stendhal\stendhal-0.00\sprites
[copy] Copying 3 files to D:\Desarrollo\arianne\stendhal\stendhal-0.00\maps
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[copy] Copying 1 file to D:\Desarrollo\arianne\stendhal\stendhal-0.00
[tar] Building tar: D:\Desarrollo\arianne\stendhal\stendhal-0.00-src.tar.gz
[delete] Deleting directory D:\Desarrollo\arianne\stendhal\stendhal-0.00

release:

BUILD SUCCESSFUL
Total time: 5 seconds
</pre>

===docs===
This task generates the java docs documentation.<br>
You better take a look at this wiki if you are looking for documentation.


= Finally =
When you have successfully built Stendhal please read the install documentation. It is available on the Wiki at [[InstallingStendhal]].