forked from conicalflask/fs2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
119 lines (96 loc) · 3.99 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0" encoding="UTF-8"?>
<project name="fs2" default="all" basedir=".">
<description>
Builds FS2's reference client and indexnode.
</description>
<property name="src" location="src"/>
<property name="doc" location="doc"/>
<property name="build" location="build"/>
<property name="dist" location="jars"/>
<property name="au" location="autoupdate"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}/common"/>
<mkdir dir="${build}/client"/>
<mkdir dir="${build}/indexnode"/>
<mkdir dir="${dist}"/>
</target>
<target name="compilecommon" depends="init"
description="compile the common library" >
<javac includeantruntime="false" debug="true" sourcepath="" srcdir="${src}" destdir="${build}">
<include name="common/**/*.java"/>
</javac>
</target>
<target name="compileclient" depends="compilecommon,compileindexnode"
description="compile the client" >
<javac includeantruntime="false" debug="true" classpath="${build}/common;${build}/indexnode" sourcepath="" srcdir="${src}" destdir="${build}">
<include name="client/**/*.java"/>
</javac>
</target>
<target name="compileindexnode" depends="compilecommon"
description="compile the indexnode" >
<javac includeantruntime="false" debug="true" classpath="${build}/common" sourcepath="" srcdir="${src}" destdir="${build}">
<include name="indexnode/**/*.java"/>
</javac>
</target>
<target name="client.jar" depends="compileclient"
description="generate the distributable client.jar">
<java classname="client.Version" classpath="${build}/common;${build}" outputproperty="clientver"/>
<java classname="client.Version" classpath="${build}/common;${build}" outputproperty="clientdesc">
<arg value="--describe"/>
</java>
<echo file="${dist}/clientver.txt">${clientver}</echo>
<echo file="${dist}/${clientver}.description">${clientdesc}</echo>
<copy todir="${build}/icons">
<fileset dir="icons"/>
</copy>
<copy todir="${build}/src/src">
<fileset dir="src"/>
</copy>
<copy todir="${build}/src">
<fileset file="build.xml"/>
</copy>
<copy todir="${build}/src">
<fileset file="readme"/>
</copy>
<jar jarfile="${dist}/fs2client-${clientver}.jar" basedir="${build}">
<include name="icons/*"/>
<include name="client/**/*.class"/>
<include name="common/**/*.class"/>
<include name="indexnode/**/*.class"/>
<include name="src/**"/>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="SplashScreen-Image" value="icons/splash.png"/>
<attribute name="Main-Class" value="client/ClientExecutor"/>
</manifest>
</jar>
</target>
<target name="autoupdate" depends="client.jar" description="create a directory that can be used by the client's autoupdate feature">
<loadfile property="clientver" srcFile="${dist}/clientver.txt"/>
<copy file="${dist}/${clientver}.description" todir="${au}"/>
<mkdir dir="${au}"/>
<copy file="${dist}/fs2client-${clientver}.jar" todir="${au}"/>
<copy file="${dist}/clientver.txt" tofile="${au}/index.htm"/>
</target>
<target name="indexnode.jar" depends="compileindexnode"
description="generate indexnode.jar" >
<jar jarfile="${dist}/indexnode-${DSTAMP}.jar" basedir="${build}">
<include name="indexnode/**/*.class"/>
<include name="common/**/*.class"/>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="indexnode/IndexNodeExecutor"/>
</manifest>
</jar>
</target>
<target name="all" depends="client.jar, indexnode.jar, autoupdate"
description="generate the distributable client.jar and indexnode.jar" >
</target>
<target name="clean"
description="clean up temporaries and distributables" >
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${au}"/>
</target>
</project>