-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.xml
59 lines (52 loc) · 2.09 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Oregon Trail" default="jar" basedir=".">
<property name="src.dir" value="src" />
<property name="lib.dir" value="lib" />
<property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="jar.dir" value="${build.dir}/jar" />
<property name="classname" value="core.GameDirector" />
<property name="lwjgl.dir" value="lwjgl-2.8.2" />
<path id="classpath">
<fileset dir="${lib.dir}" includes="jogg-0.0.7.jar,slick.jar,jorbis-0.0.17.jar" />
<fileset dir="${lib.dir}/${lwjgl.dir}/jar/" includes="lwjgl.jar,lwjgl_util.jar" />
</path>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="compile" depends="clean">
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" verbose="true" />
</target>
<target name="jar" depends="compile">
<mkdir dir="${jar.dir}" />
<jar basedir="${classes.dir}" destfile="${jar.dir}/${ant.project.name}.jar" />
</target>
<target name="run-macosx" depends="jar">
<java fork="true" classname="${classname}">
<classpath>
<path refid="classpath"/>
<path location="${jar.dir}/${ant.project.name}.jar"/>
</classpath>
<sysproperty key="java.library.path" value="${lib.dir}/${lwjgl.dir}/native/macosx" />
</java>
</target>
<target name="run-windows" depends="jar">
<java fork="true" classname="${classname}">
<classpath>
<path refid="classpath"/>
<path location="${jar.dir}/${ant.project.name}.jar"/>
</classpath>
<sysproperty key="java.library.path" value="${lib.dir}/${lwjgl.dir}/native/windows" />
</java>
</target>
<target name="run-linux" depends="jar">
<java fork="true" classname="${classname}">
<classpath>
<path refid="classpath"/>
<path location="${jar.dir}/${ant.project.name}.jar"/>
</classpath>
<sysproperty key="java.library.path" value="${lib.dir}/${lwjgl.dir}/native/linux" />
</java>
</target>
</project>