HowToBuildStendhal: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Danter
mNo edit summary
imported>AntumDeluge
mNo edit summary
 
(211 intermediate revisions by 11 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:
* module stendhal<br>http://arianne.sourceforge.net
* module marauroa <br>http://arianne.sourceforge.net
* Java SDK 1.5<br>http://java.sun.com
* Ant 1.6<br>http://ant.apache.org
* Apache Log4J<br>http://logging.apache.org/log4j/docs/
* Jython 2.1 (Python Interpreter)<br>http://www.jython.org/docs/whatis.html


= Build Tools =
Optionally:
* Tiled<br>http://tiled.rpgdx.net/


See [[HowToBuildStendhal/BuildTools|build tools page]].
= Build=
==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.


There are several ant tasks.
You have to run it as:
<pre>
ant task_name -D...
</pre>


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


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:
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


* ''<span style="color:darkblue;">build/stendhal-&lt;version&gt;-src.tar.gz</span>''
compile:
* ''<span style="color:darkblue;">build/stendhal-server-&lt;version&gt;.zip</span> (includes web client)''
[copy] Copying 3 files to D:\Desarrollo\arianne\stendhal\build\sprites
* ''<span style="color:darkblue;">build/stendhal-&lt;version&gt;.zip</span> (Java client)''
[copy] Copying 3 files to D:\Desarrollo\arianne\stendhal\build\games\stendhal\server\maps
* ''<span style="color:darkblue;">build/stendhal-webclient-&lt;version&gt;.zip</span> (requires server)''
[javac] Compiling 23 source files to D:\Desarrollo\arianne\stendhal\build
* ''<span style="color:darkblue;">build/stendhal-starter-&lt;version&gt;.zip</span> (obsolete)''


''<span style="color:darkblue;">'''TODO:''' Instructions for individual components.</span>''
BUILD SUCCESSFUL
Total time: 3 seconds
</pre>


== Server and Web Client ==
===clean===
Removes any trace of compiled stuff from stendhal.
<pre>
Buildfile: build.xml


== Desktop 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


== Java 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.


== Android 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>


* [[BuildStendhalForAndroid#WebView_Client|Build Stendhal WebView Client for Android]]
<pre>
Buildfile: build.xml


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


= Systems =
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


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


* [[VisualGuideToBuildingStendhal|Visual Guide to Building Stendhal on 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


== GNU/Linux ==
server_jar:
[jar] Building jar: D:\Desarrollo\arianne\stendhal\lib\stendhal-server-0.00.jar


* [[BuildStendhalOnUbuntu|Building Stendhal on Ubuntu® - Installation Guide Step-by-step]]
jar:


== Mac OS X ==
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.


* [[BuildStendhalOnMacOsX|Build Stendhal On 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>


== Android WebView 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


= General Information =
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


* [[HowToGetLatestStendhal|How to get the latest version?]]
server_jar:
[jar] Building jar: D:\Desarrollo\arianne\stendhal\lib\stendhal-server-0.00.jar


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


[[Category:Development]]
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

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]].

----

[[Stendhal | Back to stendhal main wiki page]]