-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
119 lines (102 loc) · 4.91 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"?>
<!-- Build file for Juggling Lab. -->
<!-- For use with the Apache Ant Java build tool (http://ant.apache.org) -->
<project name="JugglingLab" default="jars" basedir=".">
<property name="src" value="source" />
<property name="build" value="build" />
<property name="bin" value="bin" />
<property name="debug" value="off" />
<property name="deprecation" value="on" />
<target name="init">
<mkdir dir="${build}" />
</target>
<target name="compile" depends="init">
<javac debug="${debug}" srcdir="${src}/." destdir="${build}/." target="1.5" source="1.5" deprecation="${deprecation}" includeAntRuntime="false" includes="**" excludes="jugglinglab/MacOS/PlatformSpecificMacOS.java,resources/*,resources_osx/*,dox.conf,jugglinglab/notation/*.jj">
</javac>
</target>
<!-- This target is the main Juggling Lab jar file -->
<target name="jar" depends="compile">
<jar index="yes" destfile="${bin}/JugglingLab.jar">
<manifest>
<attribute name="Main-Class" value="JugglingLab" />
</manifest>
<fileset dir="${build}" excludes="Organizer*,jugglinglab/MacOS/*,jugglinglab/MacOS" />
<fileset dir="${src}/resources" includes="GUIStrings*" />
<fileset dir="${src}/resources" includes="ErrorStrings*" />
<fileset dir="${src}" includes="resources/*.au" />
<fileset dir="${src}" includes="resources/*.gif" />
<fileset dir="${src}" includes="resources/*.png" />
</jar>
</target>
<!-- This target builds an archive containing all source code, plus the build file -->
<target name="source">
<jar destfile="${bin}/JugglingLab_source.jar">
<fileset file="build.xml" />
<fileset defaultexcludes="yes" dir="." includes="${src}/**" />
</jar>
</target>
<target name="jars" depends="jar,source" />
<!-- This target executes only if invoked with something like 'ant signjars -Dkeystore=keystorepath -Dstorepass=password' -->
<target name="signjars" if="storepass,keystore" depends="jars">
<signjar jar="${bin}/JugglingLab.jar" signedjar="${bin}/SignedJugglingLab.jar" alias="jlkey" keystore="${keystore}" storepass="${storepass}"/>
<signjar jar="${bin}/JugglingLabAWTApplet.jar" signedjar="${bin}/SignedJugglingLabAWTApplet.jar" alias="jlkey" keystore="${storename}" storepass="${storepass}"/>
</target>
<!-- Run the application -->
<target name="run" depends="jar" description="Run the application">
<java jar="${bin}/JugglingLab.jar" fork="true"/>
</target>
<!-- Clean up -->
<target name="clean" description="Remove build directory">
<delete dir="${build}"/>
<delete file="${bin}/JugglingLab.jar"/>
<delete file="${bin}/JugglingLab_source.jar"/>
</target>
<!-- This target builds the Mac OS X application -->
<!-- It won't work on non-Mac machines, because the Apple stub executable below is missing -->
<property name="resources_macosx" location="${src}/resources_osx" />
<property name="apple.appstub" location="/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub" />
<property name="application" location="./Juggling Lab.app" />
<property name="application.macos" location="${application}/Contents/MacOS" />
<property name="application.macos.stub" location="${application}/Contents/MacOS/Juggling Lab" />
<property name="application.resources" location="${application}/Contents/Resources" />
<property name="application.resources.java" location="${application}/Contents/Resources/Java" />
<target name="osx" depends="compile,source" description="Make a double-clickable Mac OS X application">
<javac debug="${debug}" srcdir="${src}/." destdir="${build}/." target="1.5" source="1.5"
deprecation="yes" includeAntRuntime="false" includes="jugglinglab/MacOS/*.java" />
<mkdir dir="${application.resources.java}"/>
<mkdir dir="${application.macos}"/>
<!-- put jars into application -->
<jar index="yes" destfile="${application.resources.java}/JugglingLab.jar">
<manifest>
<attribute name="Main-Class" value="JugglingLab" />
</manifest>
<fileset dir="${build}" excludes="Organizer*" />
<fileset dir="${src}/resources" includes="GUIStrings*" />
<fileset dir="${src}/resources" includes="ErrorStrings*" />
<fileset dir="${src}" includes="resources/*.au" />
<fileset dir="${src}" includes="resources/*.gif" />
<fileset dir="${src}" includes="resources/*.png" />
</jar>
<copy toDir="${application.resources.java}">
<fileset dir="${bin}">
<include name="JugglingLab_source.jar"/>
</fileset>
</copy>
<!-- copy application stub -->
<copy file="${apple.appstub}" toFile="${application.macos}/Juggling Lab"/>
<!-- fix stub permissions -->
<exec executable="/bin/chmod">
<arg line="755 '${application.macos.stub}'"/>
</exec>
<!-- copy Info.plist -->
<copy file="${resources_macosx}/Info.plist" toFile="${application}/Contents/Info.plist"/>
<!-- copy PkgInfo -->
<copy file="${resources_macosx}/PkgInfo" toFile="${application}/Contents/PkgInfo"/>
<!-- copy icons -->
<copy toDir="${application.resources}">
<fileset dir="${resources_macosx}">
<include name="*.icns"/>
</fileset>
</copy>
</target>
</project>