forked from ArtOfIllusion/ArtOfIllusion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
133 lines (111 loc) · 4.61 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?xml version="1.0"?>
<project name="ArtOfIllusion Full Suite" default="dist" basedir=".">
<!-- set global properties for this build -->
<property name="lib" value="lib" />
<property name="dist" value="Live_Application" />
<property name="docs" value="docs/Javadoc" />
<property name="JavaVersion" value="1.6" />
<property name="args" value="-nowarn" />
<!-- set of all library jars -->
<fileset id="libraries" dir="${lib}" includes="*.jar" />
<!-- set of all subproject build files -->
<fileset id="subproject.files" dir="." includes="*.xml" excludes="build.xml" />
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by build -->
<mkdir dir="${dist}" />
<mkdir dir="${dist}/Plugins"/>
<mkdir dir="${dist}/Scripts/Startup"/>
<mkdir dir="${dist}/Scripts/Objects"/>
<mkdir dir="${dist}/Scripts/Tools"/>
<mkdir dir="${dist}/Textures and Materials" />
</target>
<!-- Generate working application artifacts -->
<target name="dist" depends="init" description="Generate a working full-project application">
<copy todir="${dist}/lib">
<fileset dir="${lib}" includes="*"/>
</copy>
<!-- execute default target for all found Ant files -->
<subant target="" >
<property name="dist" value="${dist}" />
<property name="lib" value="${lib}"/>
<property name="args" value="${args}"/>
<fileset refid="subproject.files" />
</subant>
</target>
<!-- Build project-wide javadoc -->
<!-- Hacky, cannot call subant tasks, as Javadoc is not incremental -->
<target name="docs" description="Generate project-wide javadoc">
<mkdir dir="${docs}" />
<javadoc packagenames="artofillusion.*"
sourcepath="ArtOfIllusion/src:OSSpecific/src:Renderers/src:Tools/src:Translators/src"
classpath="${lib}/*.jar"
source="${JavaVersion}"
defaultexcludes="yes"
destdir="${docs}"
author="true"
version="true"
use="true"
windowtitle="Art of Illusion Documentation"
public="true">
<doctitle><![CDATA[<h1>Art of Illusion</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 1999-2011 by Peter Eastman.</i>]]></bottom>
</javadoc>
</target>
<target name="test" description="Build and run the JUnit test suite.">
<subant target="compile">
<fileset refid="subproject.files" />
</subant>
<mkdir dir="Tests/build" />
<path id="bin_paths">
<pathelement location="ArtOfIllusion/build" />
<pathelement location="OSSpecific/build" />
<pathelement location="Tools/build" />
<pathelement location="Translators/build" />
<pathelement location="Renderers/build" />
<fileset refid="libraries" />
</path>
<javac srcdir="Tests/src" destdir="Tests/build" classpathref="bin_paths" debug="on" target="${JavaVersion}" source="${JavaVersion}" />
<junit printsummary="on" haltonfailure="yes" fork="false">
<classpath>
<path refid="bin_paths"/>
<pathelement location="Tests/build"/>
</classpath>
<formatter type="plain" usefile="false" />
<batchtest>
<fileset dir="Tests/build" includes="**/*Test.class" />
</batchtest>
</junit>
</target>
<target name="clean" description="Delete all interim build artifacts. Working application left intact.">
<!-- execute the "clean" target for all found subproject ant files -->
<subant target="clean">
<fileset refid="subproject.files" />
</subant>
<delete dir="Tests/build" />
</target>
<target name="help" description="Display advanced build options">
<echo>
If you just want to build the application, simply type 'ant' into your console.
For more build control, The Art Of Illusion build scripts provide the following targets:
</echo>
<java classname="org.apache.tools.ant.Main">
<arg value="-projecthelp" />
<arg value="-buildfile" />
<arg value="${ant.file}" />
</java>
<echo>
The 'dist' target accepts the following properties as options:
dist: directory at which to base the live build. Defaults to ${dist}.
args: compile-time arguments to pass to javac. Useful for running
various lints, etc. Defaults to ${args}.
The 'docs' target accepts the following property as an option:
docs: directory in wish to place the Javadoc. Defaults to ${docs}.
JavaVersion: which version of the java language and runtime to target.
Defaults to ${JavaVersion}.
To override any of these properties for a one time build, pass them to ant in the following form:
ant [target] -D[property]=[value]
</echo>
</target>
</project>