/
build.xml
117 lines (105 loc) · 3.74 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
<project name="Tiled" default="dist" basedir=".">
<description>
A Java-based Tile Map Editor
</description>
<!-- set global properties for this build -->
<property name="src" location="tiled"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="nightly" location="nightly"/>
<property name="javadoc" location="docs/api"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="release_bin" depends="dist" description="Build binary release">
<mkdir dir="releases"/>
<zip destfile="releases/tiled-${version}-bin.zip">
<zipfileset prefix="tiled-${version}" dir="."
includes="README COPYING INSTALL CHANGES"/>
<zipfileset fullpath="tiled-${version}/tiled.conf" dir="prototypes"
includes="tiled.conf"/>
<zipfileset fullpath="tiled-${version}/tiled.jar" dir="dist"
includes="tiled.jar"/>
<zipfileset prefix="tiled-${version}/examples" dir="examples"/>
</zip>
</target>
<target name="release_src" description="Build source release">
<mkdir dir="releases"/>
<zip destfile="releases/tiled-${version}-src.zip">
<zipfileset prefix="tiled-${version}/tiled" dir="tiled"/>
<zipfileset prefix="tiled-${version}" dir="."
includes="README COPYING CHANGES build.xml MANIFEST.MF"/>
<zipfileset fullpath="tiled-${version}/tiled.conf" dir="prototypes"
includes="tiled.conf"/>
<zipfileset prefix="tiled-${version}/examples" dir="examples"/>
</zip>
</target>
<target name="compile" depends="init" description="Compile the source">
<javac srcdir="${src}" destdir="${build}"/>
<copy todir="${build}/tiled/mapeditor/resources">
<fileset dir="./tiled/mapeditor/resources">
<include name="*.png" />
<include name="map.dtd" />
</fileset>
</copy>
</target>
<target name="compile_dep" depends="init" description="Compile the source">
<javac srcdir="${src}" destdir="${build}" deprecation="on"/>
<copy todir="${build}/tiled/mapeditor/resources">
<fileset dir="./tiled/mapeditor/resources">
<include name="*.png" />
<include name="map.dtd" />
</fileset>
</copy>
</target>
<target name="dist" depends="clean,compile"
description="Generate the distribution">
<mkdir dir="${dist}"/>
<jar
jarfile="${dist}/tiled.jar"
manifest="MANIFEST.MF"
basedir="${build}"
/>
</target>
<target name="core" depends="clean,compile"
description="Generate a core I/O distribution for use in games, etc.">
<jar jarfile="${dist}/tiled-core.jar"
basedir="${build}" includes="tiled/core/**.class,tiled/io/**"/>
</target>
<target name="dist_dep" depends="clean,compile_dep"
description="Generate the distribution and warn about deprecation">
<mkdir dir="${dist}"/>
<jar
jarfile="${dist}/tiled.jar"
manifest="MANIFEST.MF"
basedir="${build}"
/>
</target>
<target name="nightly" depends="clean,compile"
description="Generate a nightly build" >
<mkdir dir="${nightly}"/>
<jar
jarfile="${nightly}/tiled-${DSTAMP}.jar"
manifest="MANIFEST.MF"
basedir="${build}"
/>
</target>
<target name="clean" description="Clean up the build directory" >
<!-- Delete the ${build} directory tree -->
<delete dir="${build}"/>
</target>
<target name="javadoc" description="Generate Javadoc">
<!-- Clean up previous Javadoc files -->
<delete dir="${javadoc}"/>
<!-- Generate Javadoc -->
<javadoc
packagenames="tiled.*"
sourcepath="."
destdir="${javadoc}"
windowtitle="Tiled"
/>
</target>
</project>