-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.xml
225 lines (175 loc) · 7.41 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="DMGExtractor">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="java.target.level" value="1.5"/>
<property name="java.source.level" value="1.5"/>
<property name="java.source.dir" value="src/java"/>
<property name="builddir" value=".antbuild~"/>
<property name="java.build.library.dir" value="lib"/>
<property name="java.runtime.library.dir" value="targets/application/lib"/>
<property name="target.application.manifest.dir" value="src/META-INF/application"/>
<property name="target.standalone.manifest.dir" value="src/META-INF/standalone"/>
<property name="target.standalone.jnlp.dir" value="src/JNLP-INF/standalone"/>
<property name="target.application.outjar" value="targets/application/lib/dmgextractor.jar"/>
<property name="target.standalone.outjar" value="targets/standalone/dmgextractor-standalone.jar"/>
<property name="target.hfsxlib.outjar" value="targets/hfsxlib/hfsx_dmglib.jar"/>
<!-- TARGET: all -->
<target name="all">
<echo message="Currently defined targets:"/>
<echo message=" build-application - Builds the application target, compiling all project sources."/>
<echo message=" build-standalone - Builds the standalone target, creating a standalone executable jar file with only the essentials to run DMGExtractor."/>
<echo message=" build-hfsxlib - Builds the library subset of DMGExtractor required by HFSExplorer."/>
<echo message=" javadoc - Creates the javadoc documentation for the project."/>
</target>
<!-- TARGET: build-all -->
<target name="build-all" depends="build-application,build-standalone,build-hfsxlib"/>
<!-- TARGET: init-application -->
<target name="init-application">
<mkdir dir="${builddir}"/>
</target>
<!-- TARGET: clean-application -->
<target name="clean-application">
<mkdir dir="${builddir}"/>
<delete dir="${builddir}"/>
</target>
<!-- TARGET: build-application -->
<path id="target.application.classpath">
<fileset dir="${java.runtime.library.dir}">
<include name="*.jar"/>
<exclude name="dmgextractor.jar"/>
</fileset>
</path>
<target name="build-application" depends="clean-application,jar-application"/>
<target name="compile-application" depends="init-application">
<javac srcdir="${java.source.dir}"
destdir="${builddir}"
includes="**"
debug="true"
debuglevel="${debuglevel}"
encoding="utf-8"
source="${java.source.level}"
target="${java.target.level}"
deprecation="on">
<compilerarg value="-Xlint:unchecked"/>
<classpath refid="target.application.classpath"/>
</javac>
</target>
<target name="jar-application" depends="compile-application">
<jar destfile="${target.application.outjar}" basedir="${builddir}" manifest="${target.application.manifest.dir}/MANIFEST.MF" level="9"/>
</target>
<!-- TARGET: init-standalone -->
<target name="init-standalone">
<mkdir dir="${builddir}"/>
</target>
<!-- TARGET: clean-standalone -->
<target name="clean-standalone">
<mkdir dir="${builddir}"/>
<delete dir="${builddir}"/>
</target>
<!-- TARGET: build-standalone -->
<target name="build-standalone" depends="clean-standalone,jar-standalone"/>
<target name="copyresources-standalone" depends="init-standalone">
<copy todir="${builddir}">
<zipfileset src="${java.runtime.library.dir}/csframework.jar" includes="**/*.class"/>
<zipfileset src="${java.runtime.library.dir}/apache-ant-1.7.0-bzip2.jar" includes="**/*.class"/>
<zipfileset src="${java.runtime.library.dir}/iharder-base64.jar" includes="**/*.class"/>
<zipfileset src="${java.runtime.library.dir}/swing-layout-1.0.4.jar" includes="**/*.class"/>
</copy>
<mkdir dir="${builddir}/JNLP-INF"/>
<copy file="${target.standalone.jnlp.dir}/dmgextractor.jnlp" tofile="${builddir}/JNLP-INF/APPLICATION.JNLP"/>
</target>
<target name="compile-standalone" depends="init-standalone,copyresources-standalone">
<javac srcdir="${java.source.dir}"
destdir="${builddir}"
includes="org/catacombae/dmgextractor/DMGExtractorGraphical.java"
debug="true"
debuglevel="${debuglevel}"
encoding="utf-8"
source="${java.source.level}"
target="${java.target.level}"
deprecation="on">
<compilerarg value="-Xlint:unchecked"/>
<classpath>
<pathelement path="${builddir}"/>
</classpath>
</javac>
</target>
<target name="jar-standalone" depends="compile-standalone">
<jar destfile="${target.standalone.outjar}" basedir="${builddir}" manifest="${target.standalone.manifest.dir}/MANIFEST.MF" level="9"/>
</target>
<!-- TARGET: init-hfsxlib -->
<target name="init-hfsxlib">
<mkdir dir="${builddir}"/>
</target>
<!-- TARGET: clean-hfsxlib -->
<target name="clean-hfsxlib">
<mkdir dir="${builddir}"/>
<delete dir="${builddir}"/>
</target>
<!-- TARGET: build-hfsxlib -->
<path id="target.hfsxlib.classpath">
<fileset dir="${java.runtime.library.dir}">
<include name="*.jar"/>
<exclude name="dmgextractor.jar"/>
</fileset>
</path>
<target name="build-hfsxlib" depends="clean-hfsxlib,jar-hfsxlib"/>
<target name="compile-hfsxlib" depends="init-hfsxlib">
<javac srcdir="${java.source.dir}"
destdir="${builddir}"
debug="true"
debuglevel="${debuglevel}"
encoding="utf-8"
source="${java.source.level}"
target="${java.target.level}"
deprecation="on">
<!-- All entry points to the DMGExtractor libraries from HFSExplorer should be listed here. -->
<include name="org/catacombae/dmg/udif/*.java"/>
<include name="org/catacombae/dmg/encrypted/*.java"/>
<include name="org/catacombae/dmg/sparsebundle/ReadableSparseBundleStream.java"/>
<include name="org/catacombae/dmg/sparseimage/ReadableSparseImageStream.java"/>
<include name="org/catacombae/dmg/sparseimage/SparseImageRecognizer.java"/>
<include name="org/catacombae/dmgextractor/ui/PasswordDialog.java"/>
<compilerarg value="-Xlint:unchecked"/>
<classpath refid="target.hfsxlib.classpath"/>
</javac>
</target>
<target name="jar-hfsxlib" depends="compile-hfsxlib">
<jar destfile="${target.hfsxlib.outjar}" basedir="${builddir}" level="9"/>
</target>
<!-- TARGET: build-csframework -->
<target name="build-csframework">
<ant antfile="build.xml"
dir="external/catacombaeframework"
inheritAll="false"/>
<copy file="external/catacombaeframework/targets/base/csframework.jar"
todir="${java.runtime.library.dir}"
overwrite="true"/>
</target>
<!-- TARGET: javadoc -->
<path id="javadoc.classpath">
<!--<fileset dir="${java.build.library.dir}">
<include name="**/*.jar"/>
</fileset>-->
<fileset dir="${java.runtime.library.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="javadoc">
<javadoc destdir="javadoc.~"
packagenames="org.catacombae.*"
sourcepath="${java.source.dir}"
access="private"
author="true"
version="true"
use="true"
windowtitle="DMGExtractor API">
<link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
<link href="../../catacombaeframework/javadoc.~/"/>
<classpath>
<path refid="javadoc.classpath"/>
</classpath>
</javadoc>
</target>
</project>