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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
|
<?xml version="1.0"?>
<!--
/*
* $RCSfile$
*
* Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
*
* Use is subject to license terms.
*
* $Revision$
* $Date$
* $State$
*/
-->
<!-- Ant file for building java classes and jar files -->
<project name="Java 3D" default="jar-opt">
<path id="vecmath.debug.classpath">
<pathelement location="${vecmath_home}/build/debug/lib/ext/vecmath.jar"/>
</path>
<path id="vecmath.opt.classpath">
<pathelement location="${vecmath_home}/build/opt/lib/ext/vecmath.jar"/>
</path>
<target name="compile-debug">
<!-- Create the debug build directory structure used for compile -->
<mkdir dir="${build}/${platform}/debug/classes"/>
<!-- Create the directories used for compiling generated files -->
<mkdir dir="${build-debug-gen}/tools"/>
<mkdir dir="${build-debug-gen}/classes/javax/media/j3d"/>
<!-- Copy VersionInfo.java file and change tags for this build -->
<copy file="${build-tools}/VersionInfo.java"
todir="${build-debug-gen}/classes/javax/media/j3d"
overwrite="true">
<filterset>
<filter token="BUILD_TYPE" value="${build.type}"/>
<filter token="BUILDTIME" value="${buildtime}"/>
<filter token="BUILDTIME_VERBOSE" value="${buildtime_verbose}"/>
<filter token="IS_DEBUG" value="true"/>
<filter token="IS_DEV_PHASE" value="true"/>
<filter token="IS_PRODUCTION" value="${is_production}"/>
<filter token="USE_VERBOSE_BUILDTIME" value="${use_verbose_buildtime}"/>
<filter token="VERSION_BASE" value="${version_base}"/>
<filter token="VERSION_BUILD" value="${version_build}"/>
<filter token="VERSION_SUFFIX" value="${version_suffix}"/>
</filterset>
</copy>
<!-- Compile the java code from ${src} into ${build}/${platform}/debug/classes -->
<javac srcdir="${src}/classes/share:${src}/classes/${ostype}:${core_utils_src}/classes/share:${build-debug-gen}/classes"
destdir="${build}/${platform}/debug/classes"
source="1.4"
target="1.4"
debug="true"
deprecation="off">
<classpath refid="vecmath.debug.classpath"/>
</javac>
<!-- Copy the I18N property files while retaining package location -->
<copy todir="${build}/${platform}/debug/classes">
<fileset dir="${src}/classes/share" includes="**/*.properties"/>
<fileset dir="${core_utils_src}/classes/share" includes="**/*.properties"/>
</copy>
</target>
<target name="compile-opt">
<!-- Create the opt build directory structure used for compile -->
<mkdir dir="${build}/${platform}/opt/classes"/>
<!-- Create the directories used for compiling generated files -->
<mkdir dir="${build-opt-gen}/tools"/>
<mkdir dir="${build-opt-gen}/classes/javax/media/j3d"/>
<!-- Copy VersionInfo.java file and change tags for this build -->
<copy file="${build-tools}/VersionInfo.java"
todir="${build-opt-gen}/classes/javax/media/j3d"
overwrite="true">
<filterset>
<filter token="BUILD_TYPE" value="${build.type}"/>
<filter token="BUILDTIME" value="${buildtime}"/>
<filter token="BUILDTIME_VERBOSE" value="${buildtime_verbose}"/>
<filter token="IS_DEBUG" value="false"/>
<filter token="IS_DEV_PHASE" value="${is_dev_phase}"/>
<filter token="IS_PRODUCTION" value="${is_production}"/>
<filter token="USE_VERBOSE_BUILDTIME" value="${use_verbose_buildtime}"/>
<filter token="VERSION_BASE" value="${version_base}"/>
<filter token="VERSION_BUILD" value="${version_build}"/>
<filter token="VERSION_SUFFIX" value="${version_suffix}"/>
</filterset>
</copy>
<!-- Compile the java code from ${src} into ${build}/${platform}/opt/classes -->
<javac srcdir="${src}/classes/share:${src}/classes/${ostype}:${core_utils_src}/classes/share:${build-opt-gen}/classes" destdir="${build}/${platform}/opt/classes"
source="1.4"
target="1.4"
debug="true"
debuglevel="lines,source"
deprecation="off">
<classpath refid="vecmath.opt.classpath"/>
</javac>
<!-- Copy the I18N property files while retaining package location -->
<copy todir="${build}/${platform}/opt/classes">
<fileset dir="${src}/classes/share" includes="**/*.properties"/>
<fileset dir="${core_utils_src}/classes/share" includes="**/*.properties"/>
</copy>
</target>
<target name="jar-debug">
<!-- Create the j3dcore and j3dutils jars directory -->
<mkdir dir="${build}/${platform}/debug/lib/ext"/>
<copy todir="${build-debug-gen}"
overwrite="true">
<fileset dir="${src}/classes" includes="J3dVersion"/>
<fileset dir="${core_utils_src}/classes" includes="ToolsVersion"/>
<filterset>
<filter token="VERSION_BASE" value="${version_base}"/>
</filterset>
</copy>
<!-- Copy the copyright file and all license files for j3dcore.jar -->
<copy todir="${build}/${platform}/debug/classes/javax">
<fileset dir="${src}/.." includes="COPYRIGHT.txt"/>
<fileset dir="${src}/.." includes="*LICENSE*.txt"/>
</copy>
<!-- Copy the copyright file and all license files for j3dutils.jar -->
<copy todir="${build}/${platform}/debug/classes/com">
<fileset dir="${core_utils_home}" includes="COPYRIGHT.txt"/>
<fileset dir="${core_utils_home}" includes="*LICENSE*.txt"/>
</copy>
<!-- Put everything in ${build}/${platform}/debug/classes/javax into the j3dcore.jar file -->
<jar jarfile="${build}/${platform}/debug/lib/ext/j3dcore.jar"
manifest="${build-debug-gen}/J3dVersion" update="no"
compress="false">
<fileset dir="${build}/${platform}/debug/classes" includes="javax/**/*"/>
</jar>
<!-- Put everything in ${build}/${platform}/debug/classes/com into the j3dutils.jar file -->
<jar jarfile="${build}/${platform}/debug/lib/ext/j3dutils.jar"
manifest="${build-debug-gen}/ToolsVersion" update="no"
compress="false">
<fileset dir="${build}/${platform}/debug/classes" includes="com/**/*"/>
</jar>
</target>
<target name="jar-opt">
<!-- Create the j3dcore and j3dutils jars directory -->
<mkdir dir="${build}/${platform}/opt/lib/ext"/>
<copy todir="${build-opt-gen}"
overwrite="true">
<fileset dir="${src}/classes" includes="J3dVersion"/>
<fileset dir="${core_utils_src}/classes" includes="ToolsVersion"/>
<filterset>
<filter token="VERSION_BASE" value="${version_base}"/>
</filterset>
</copy>
<!-- Copy the copyright file and all license files for j3dcore.jar -->
<copy todir="${build}/${platform}/opt/classes/javax">
<fileset dir="${src}/.." includes="COPYRIGHT.txt"/>
<fileset dir="${src}/.." includes="*LICENSE*.txt"/>
</copy>
<!-- Copy the copyright file and all license files for j3dutils.jar -->
<copy todir="${build}/${platform}/opt/classes/com">
<fileset dir="${core_utils_home}" includes="COPYRIGHT.txt"/>
<fileset dir="${core_utils_home}" includes="*LICENSE*.txt"/>
</copy>
<!-- Put everything in ${build}/${platform}/opt/classes/javax into the j3dcore.jar file -->
<jar jarfile="${build}/${platform}/opt/lib/ext/j3dcore.jar"
manifest="${build-opt-gen}/J3dVersion" update="no"
compress="false">
<fileset dir="${build}/${platform}/opt/classes" includes="javax/**/*"/>
</jar>
<!-- Put everything in ${build}/${platform}/opt/classes/com into the j3dutils.jar file -->
<jar jarfile="${build}/${platform}/opt/lib/ext/j3dutils.jar"
manifest="${build-opt-gen}/ToolsVersion" update="no"
compress="false">
<fileset dir="${build}/${platform}/opt/classes" includes="com/**/*"/>
</jar>
</target>
<target name="setup-docs">
<!-- use javadoc.bottom.new once we have the spec license from the JCP PMO -->
<property name="javadoc.bottom.new"
value="<font size="-1">Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="{@docRoot}/LICENSE-SPEC.html">license terms</a>."/>
<property name="javadoc.bottom"
value="<font size="-1">Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms."/>
</target>
<target name="docs-jcp" depends="setup-docs">
<!-- Create the build directory structure used by docs -->
<mkdir dir="${build}/${platform}/javadocs/docs-jcp"/>
<!-- Compile the javadoc from ${src} into ${build}/javadocs -->
<javadoc packagenames="javax.media.j3d.*,
javax.vecmath.*"
maxmemory="128m"
destdir="${build}/${platform}/javadocs/docs-jcp"
bottom="${javadoc.bottom}"
windowtitle="Java 3D ${version}">
<sourcepath>
<pathelement location="${src}/classes/share"/>
<pathelement location="${src}/classes/${ostype}"/>
<pathelement location="${core_utils_src}/classes/share"/>
<pathelement location="${vecmath_src}"/>
</sourcepath>
</javadoc>
<!-- Copy the copyright and license files -->
<copy todir="${build}/${platform}/javadocs/docs-jcp">
<fileset dir="${src}/.." includes="COPYRIGHT.txt"/>
<fileset dir="${src}/.." includes="LICENSE-SPEC.html"/>
</copy>
</target>
<target name="docs-private" depends="setup-docs">
<!-- Create the build directory structure used by docs -->
<mkdir dir="${build}/${platform}/javadocs/docs-private"/>
<!--
** TODO: there is an implicit dependency on "compile-opt",
** since the J3dBuildInfo source file is only built as part of
** that target. We don't want to make this an explicit
** dependency because we don't want the time stamp regenerated.
**
** Ideally, we should make a "time-stamp-opt" target that only
** creates J3DBuildInfo.java if it doesn't exist, and a
** "force-time-stamp-opt" target that unconditionally creates
** it. The "docs-*" targets would depend on "time-stamp-opt"
** while the "compile-opt" target would depend on
** "force-time-stamp-opt"
-->
<!-- Compile the javadoc from ${src} into ${build}/javadocs -->
<javadoc packagenames="javax.media.j3d.*,
com.sun.j3d.*,
javax.vecmath.*"
maxmemory="128m"
private="true"
destdir="${build}/${platform}/javadocs/docs-private"
bottom="${javadoc.bottom}"
windowtitle="Java 3D ${version}">
<sourcepath>
<pathelement location="${src}/classes/share"/>
<pathelement location="${src}/classes/${ostype}"/>
<pathelement location="${build}/${platform}/opt/gen/classes"/>
<pathelement location="${core_utils_src}/classes/share"/>
<pathelement location="${vecmath_src}"/>
</sourcepath>
</javadoc>
<!-- Copy the copyright and license files -->
<copy todir="${build}/${platform}/javadocs/docs-private">
<fileset dir="${src}/.." includes="COPYRIGHT.txt"/>
<fileset dir="${src}/.." includes="LICENSE-SPEC.html"/>
</copy>
</target>
<target name="docs-public" depends="setup-docs">
<!-- Create the build directory structure used by docs -->
<mkdir dir="${build}/${platform}/javadocs/docs-public"/>
<!-- Compile the javadoc from ${src} into ${build}/javadocs -->
<javadoc packagenames="javax.media.j3d.*,
com.sun.j3d.audioengines.*,
com.sun.j3d.loaders.*,
com.sun.j3d.utils.*,
javax.vecmath.*"
excludepackagenames="com.sun.j3d.utils.scenegraph.io.retained,
com.sun.j3d.utils.scenegraph.io.state.*"
maxmemory="128m"
destdir="${build}/${platform}/javadocs/docs-public"
bottom="${javadoc.bottom}"
windowtitle="Java 3D ${version}">
<sourcepath>
<pathelement location="${src}/classes/share"/>
<pathelement location="${src}/classes/${ostype}"/>
<pathelement location="${core_utils_src}/classes/share"/>
<pathelement location="${vecmath_src}"/>
</sourcepath>
</javadoc>
<!-- Copy the copyright and license files -->
<copy todir="${build}/${platform}/javadocs/docs-public">
<fileset dir="${src}/.." includes="COPYRIGHT.txt"/>
<fileset dir="${src}/.." includes="LICENSE-SPEC.html"/>
</copy>
</target>
<target name="docs" depends="docs-jcp,docs-public,docs-private"/>
<target name="dist">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/${platform}/lib/ext"/>
<!-- Copy the jar files -->
<copy todir="${dist}/${platform}/lib/ext">
<fileset dir="${build}/${platform}/opt/lib/ext" includes="*.jar"/>
<fileset dir="${vecmath_home}/build/opt/lib/ext" includes="vecmath.jar"/>
</copy>
<!-- Create the docs distribution directory -->
<mkdir dir="${dist}/${platform}/javadocs"/>
<!-- Put everything in ${build}/javadocs into the zip docname file -->
<zip zipfile="${dist}/${platform}/javadocs/${docname}.zip"
basedir="${build}/${platform}/javadocs/docs-public"/>
</target>
<target name="install-debug">
<copy todir="${java.home}/lib/ext">
<fileset dir="${build}/${platform}/debug/lib/ext" includes="*.jar"/>
<fileset dir="${vecmath_home}/build/opt/lib/ext" includes="vecmath.jar"/>
</copy>
<copy todir="${java.home}/${install.bin}">
<fileset dir="${build}/${platform}/debug/${install.bin}" includes="*"/>
</copy>
</target>
<target name="uninstall">
<delete>
<fileset dir="${java.home}/lib/ext" includes="j3dcore.jar, j3dutils.jar, vecmath.jar"/>
</delete>
<delete>
<fileset dir="${java.home}/${install.bin}" includes="libj3dcore*.so, libj3dutils.so"/>
<fileset dir="${java.home}/${install.bin}" includes="j3dcore*.dll, j3dutils.dll"/>
</delete>
</target>
</project>
|