-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.xml
80 lines (80 loc) · 2.82 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8"?>
<project name="ultraworm" default="build">
<property name="src" location="src" />
<property name="bin" location="bin" />
<property name="lib" location="libs" />
<property name="doc" location="javadoc" />
<property name="main-class" value="net.puppygames.applet.Launcher" />
<condition property="os-family" value="windows">
<os family="windows" />
</condition>
<condition property="os-family" value="linux">
<os name="Linux" />
</condition>
<condition property="os-family" value="macosx">
<os name="Mac OS X" />
</condition>
<condition property="os-family" value="solaris">
<os name="Solaris" />
</condition>
<fileset id="libraries" dir="${lib}">
<include name="**/*.jar" />
</fileset>
<fileset id="gamedata" dir="data">
<include name="**/*.jar" />
</fileset>
<path id="binary-path">
<pathelement path="${bin}" />
</path>
<path id="library-path">
<fileset refid="libraries" />
</path>
<path id="gamedata-path">
<fileset refid="gamedata" />
</path>
<path id="master-path">
<path refid="binary-path" />
<path refid="library-path" />
</path>
<path id="launchgame-path">
<path refid="master-path" />
<path refid="gamedata-path" />
<pathelement path="${src}" />
</path>
<target name="init">
<mkdir dir="${bin}" />
<mkdir dir="${doc}" />
<mkdir dir="${lib}" />
</target>
<target name="build" depends="init">
<javac destdir="${bin}" includeantruntime="false" excludes="net/puppygames/applet/server/*.java">
<src path="${src}" />
<classpath refid="library-path" />
</javac>
</target>
<target name="buildres" depends="build">
<java classpathref="master-path" fork="true" classname="com.shavenpuppy.jglib.resources.ResourceConverter" dir="${src}">
<arg file="${src}/resources-public.xml"/>
<arg file="${bin}/resources-puppygames.dat"/>
</java>
</target>
<target name="run" depends="build">
<java classpathref="launchgame-path" fork="true" classname="${main-class}">
<sysproperty key="net.puppygames.applet.Launcher.resources" value="/resources-puppygames.dat"/>
<sysproperty key="net.puppygames.applet.Game.gameResource" value="game.puppygames"/>
<sysproperty key="org.lwjgl.librarypath" path="${lib}/native/${os-family}"/>
</java>
</target>
<target name="doc" depends="build">
<javadoc sourcepath="${src}" classpathref="master-path" destdir="${doc}" access="private" windowtitle="Ultraworm Documentation">
<doctitle><![CDATA[<h1>Ultraworm Documentation</h1>]]></doctitle>
<link href="http://download.oracle.com/javase/6/docs/api/" />
<link href="http://www.lwjgl.org/javadoc/" />
</javadoc>
</target>
<target name="clean">
<delete dir="${bin}" />
<delete dir="${doc}" />
<delete file="${jar}" />
</target>
</project>