-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
73 lines (60 loc) · 1.92 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
<?xml version="1.0"?>
<project name="ShooterGame" basedir="." default="all">
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="server" location="./ShooterServer" />
<property name="client" location="./ShooterClient" />
<path id="ShooterGame.classpath">
<pathelement location="${src}"/>
<pathelement location="${build}$"/>
<pathelement location="lib/core.jar"/>
<pathelement location="lib/udp.jar"/>
</path>
<target name="all" depends="init, compile, dist">
</target>
<target name="init">
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${build}" includeantruntime="false">
<src path="src"/>
<classpath refid="ShooterGame.classpath"/>
</javac>
</target>
<target name="dist" depends="compile">
<jar jarfile="${server}" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="game.ShooterServer" />
</manifest>
</jar>
<jar jarfile="${client}" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="game.ShooterClient" />
</manifest>
</jar>
</target>
<target name="server" depends="dist">
<java classname="game.ShooterServer" failonerror="true" fork="true">
<classpath>
<path refid="ShooterGame.classpath" />
<path location="${server}" />
</classpath>
<arg value="Server"/>
</java>
</target>
<target name="client" depends="dist">
<java classname="game.ShooterClient" failonerror="true" fork="true">
<classpath>
<path refid="ShooterGame.classpath" />
<path location="${client}" />
</classpath>
<arg value="${arg0}" />
</java>
</target>
<target name="clean">
<delete dir="${build}"/>
<delete file="${server}"/>
<delete file="${client}"/>
</target>
</project>