forked from amyjko/whyline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
67 lines (52 loc) · 2.16 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
<?xml version="1.0"?>
<!-- Handle the jar target by default -->
<project name="Whyline" default="make-and-copy-jar" basedir=".">
<description>
Build a whyline.jar file that contains all code necessary for execution and tracing.
</description>
<property name="src.dir" value="edu/cmu/hcii/whyline"/>
<property name="build.dir" location="build" />
<property name="lib.dir" value="lib"/>
<property name="whyline-jar" location="${build.dir}/whyline.jar" />
<property name="osx-app" location="${build.dir}/Whyline.app" />
<property name="osx-app-jar-folder" location="${osx-app}/Contents/Resources/Java" />
<path id="master-classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<pathelement path="${lib.dir}"/>
</path>
<target name="build" description="Compile source tree java files">
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}" source="1.5" target="1.5">
<src path="${src.dir}"/>
<classpath refid="master-classpath"/>
</javac>
</target>
<!-- <delete file="${whyline-jar}" /> -->
<target name="make-and-copy-jar" depends="build">
<jar destfile="${whyline-jar}"
basedir="${build.dir}/"
includes="**/*.class">
<!-- Create a manifest suitable for tracing and analysis. -->
<manifest>
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Main-Class" value="edu.cmu.hcii.whyline.Whyline"/>
<attribute name="Premain-Class" value="edu.cmu.hcii.whyline.tracing.Agent"/>
<attribute name="Can-Redefine-Classes" value="true"/>
</manifest>
<!-- Include all of the compiled Whyline classes -->
<fileset dir="${src.dir}" includes="**/*.class" />
<fileset dir="${src.dir}/ui/images/" includes="**/*.png" />
<fileset dir="${src.dir}/ui/images/" includes="**/*.gif" />
<!-- Include all of the classfiles in the trove library -->
<zipfileset src="lib/trove.jar" />
</jar>
<!-- Copy the newly created jar file to the appropriate OS X bundle folder -->
<copy
file="${whyline-jar}"
overwrite="true"
todir="${osx-app-jar-folder}"
/>
</target>
</project>