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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
|
<?xml version="1.0"?>
<!--
/*
* $RCSfile$
*
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
*
* Use is subject to license terms.
*
* $Revision$
* $Date$
* $State$
*/
-->
<project name="java3d-1.4.0" default="jar-opt" basedir=".">
<!--
*********************************************************************
*
* The following properties may be set on the command line to
* specify the compiler used or the renderer to be built. They are
* specified using "ant -Dprop.name=value", where the actual
* property and and value are substituted for "prop.name" and
* "value"
*
* build.comp=gcc Use GCC compilers (default, all platforms)
* build.comp=forte Use Forte compilers (Solaris only)
* build.comp=vc Use Visual C++ compilers (Windows only)
*
* build.rend=ogl build OpenGL native library (default)
* build.rend=d3d build DirectX (D3D) native library
*
* For example:
*
* ant -Dbuild.comp=vc -Dbuild.rend=d3d ...
*
*********************************************************************
-->
<!-- *************************************** -->
<!-- *** Begin build-specific properties *** -->
<!-- *************************************** -->
<!--
* The following property specifies the build number of the current
* Java 3D version being built. This build number is a monotonically
* increasing number that is incremented for each new stable, beta,
* fcs, or patch build. Each non-daily build will have a unique
* build number that is greater than the previous build's build
* number.
-->
<property name="version_buildnum" value="11"/>
<!--
* The following property specifies the beta revision of the current
* Java 3D version being built. It is ignored for non-beta builds.
-->
<property name="version_betastr" value="beta5"/>
<!--
* The following property specifies the patch revision of the current
* Java 3D version being built. It is ignored for non-beta builds.
-->
<property name="version_patchstr" value="01"/>
<!--
* The following properties specify the current version of Java 3D.
* The "version_base" property specifies the dot-dot base version
* number of Java 3D; it must contain exactly three integer numbers
* separated by "periods ("."). The version_base_file property must
* be the same version number as version_base with "_" replacing ".".
-->
<property name="version_base" value="1.4.0"/>
<property name="version_base_file" value="1_4_0"/>
<!-- ************************************* -->
<!-- *** End build-specific properties *** -->
<!-- ************************************* -->
<!--
*********************************************************************
*
* A build of Java 3D is one of the following five types: daily
* build, stable build, beta build (or release candidate), fcs build,
* patch build. Daily builds are identified with a "-preN-YYMMDDHHMM"
* suffix; stable builds are identified with a "-buildN" suffix; beta
* builds are identified with a "-betaN" or "-rcN" suffix; fcs builds
* have no suffix; and patch builds are identified with an "_N"
* suffix.
*
* The default is to do a daily build. This may be overriden by setting
* the build.type property on the command line to do a different kind
* of build:
*
* build.type=daily Do a daily build (default)
* build.type=stable Do a stable build : -buildN
* build.type=beta Do a beta or RC production build : -betaN or -rcN
* build.type=fcs Do an FCS production build : [no suffix]
* build.type=patch Do an FCS+patch production build : _PP
*
* For example:
*
* ant -Dbuild.type=stable ...
*
*********************************************************************
-->
<!-- Set global properties for this build -->
<property name="vecmath_home" location="../vecmath"/>
<property name="core_utils_home" location="../j3d-core-utils"/>
<property name="src" location="src"/>
<property name="vecmath_src" location="${vecmath_home}/src"/>
<property name="core_utils_src" location="${core_utils_home}/src"/>
<property name="build-tools" location="build-tools"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="build.comp" value="gcc"/>
<property name="build.rend" value="ogl"/>
<target name="echo" depends="setupPlatform">
<echo message="platform = ${platform}"/>
<echo message="ostype = ${ostype}"/>
<echo message="os.arch = ${os.arch}"/>
<echo message="os.name = ${os.name}"/>
<echo message="ant.home = ${ant.home}"/>
<echo message="java.home = ${java.home}"/>
<echo message="core_utils_home = ${core_utils_home}"/>
<echo message="vecmath_home = ${vecmath_home}"/>
<echo message="user.name = ${user.name}"/>
<echo message="user.home = ${user.home}"/>
<echo message=""/>
<echo message="build.type = ${build.type}"/>
<echo message="build.rend = ${build.rend}"/>
<echo message="build.comp = ${build.comp}"/>
<echo message="is_dev_phase = ${is_dev_phase}"/>
<echo message="is_production = ${is_production}"/>
<echo message="use_verbose_buildtime = ${use_verbose_buildtime}"/>
<echo message="version_build = ${version_build}"/>
<echo message="version_suffix = ${version_suffix}"/>
<echo message="version = ${version}"/>
<echo message="version_file = ${version_file}"/>
<echo message="version_rpm = ${version_rpm}"/>
</target>
<target name="setupSolaris" if="isSolarisOnSparc">
<property name="ostype" value="solaris"/>
<property name="platform" value="solaris-sparc-${build.comp}"/>
<property name="install.bin" value="lib/sparc"/>
</target>
<target name="setupSolarisX86" if="isSolarisOnX86">
<property name="ostype" value="solaris"/>
<property name="platform" value="solaris-x86-${build.comp}"/>
<property name="install.bin" value="lib/i386"/>
</target>
<target name="setupLinux" if="isLinuxOnX86">
<property name="ostype" value="linux"/>
<property name="platform" value="linux-i586"/>
<property name="install.bin" value="lib/i386"/>
</target>
<target name="setupLinuxAmd64" if="isLinuxOnAmd64">
<property name="ostype" value="linux"/>
<property name="platform" value="linux-amd64"/>
<property name="install.bin" value="lib/amd64"/>
</target>
<target name="setupLinuxIA64" if="isLinuxOnIA64">
<property name="ostype" value="linux"/>
<property name="platform" value="linux-ia64"/>
<property name="install.bin" value="lib/ia64"/>
</target>
<target name="setupLinuxPPC" if="isLinuxOnPPC">
<property name="ostype" value="linux"/>
<property name="platform" value="linux-ppc"/>
<property name="install.bin" value="lib/ppc"/>
</target>
<!-- win32 should be rename as windows -->
<target name="setupWindows" if="isWindowsOnX86">
<property name="ostype" value="win32"/>
<property name="platform" value="windows-i586-${build.comp}"/>
<property name="install.bin" value="bin"/>
</target>
<target name="setupPlatform"
depends="init, setupBuildType, setupSolaris, setupSolarisX86, setupLinux, setupLinuxAmd64, setupLinuxIA64, setupLinuxPPC, setupWindows">
<property name="build-debug-gen" location="${build}/${platform}/debug/gen"/>
<property name="build-opt-gen" location="${build}/${platform}/opt/gen"/>
<property name="docname" value="java3d-${version_file}-doc"/>
</target>
<target name="setupBuildType" depends="initBuildType, setupBuildPatch, setupBuildFcs, setupBuildBeta, setupBuildStable, setupBuildDaily, checkBuildType">
<echo message="build.type = ${build.type}"/>
</target>
<target name="initBuildType">
<!-- Default value is "daily", overridden on command line -->
<property name="build.type" value="daily"/>
<property name="buildType_${build.type}" value="true"/>
</target>
<!-- Set properties for PATCH build -->
<target name="setupBuildPatch" if="buildType_patch">
<property name="buildTypeSet" value="true"/>
<property name="is_dev_phase" value="false"/>
<property name="is_production" value="true"/>
<property name="use_verbose_buildtime" value="false"/>
<property name="version_build" value="build${version_buildnum}"/>
<property name="version_suffix" value="${version_patchstr}"/>
<property name="version" value="${version_base}_${version_suffix}"/>
<property name="version_file" value="${version_base_file}_${version_suffix}"/>
<property name="version_rpm" value="${version_base}_${version_suffix}"/>
</target>
<!-- Set properties for FCS build -->
<target name="setupBuildFcs" if="buildType_fcs">
<property name="buildTypeSet" value="true"/>
<property name="is_dev_phase" value="false"/>
<property name="is_production" value="true"/>
<property name="use_verbose_buildtime" value="false"/>
<property name="version_build" value="build${version_buildnum}"/>
<property name="version_suffix" value=""/>
<property name="version" value="${version_base}"/>
<property name="version_file" value="${version_base_file}"/>
<property name="version_rpm" value="${version_base}"/>
</target>
<!-- Set properties for BETA build -->
<target name="setupBuildBeta" if="buildType_beta">
<property name="buildTypeSet" value="true"/>
<property name="is_dev_phase" value="false"/>
<property name="is_production" value="true"/>
<property name="use_verbose_buildtime" value="true"/>
<property name="version_build" value="build${version_buildnum}"/>
<property name="version_suffix" value="${version_betastr}"/>
<property name="version" value="${version_base}-${version_suffix}"/>
<property name="version_file" value="${version_base_file}-${version_suffix}"/>
<property name="version_rpm" value="${version_base}_${version_suffix}"/>
</target>
<!-- Set properties for STABLE build -->
<target name="setupBuildStable" if="buildType_stable">
<property name="buildTypeSet" value="true"/>
<property name="is_dev_phase" value="true"/>
<property name="is_production" value="false"/>
<property name="use_verbose_buildtime" value="true"/>
<property name="version_build" value="build${version_buildnum}"/>
<property name="version_suffix" value="${version_build}"/>
<property name="version" value="${version_base}-${version_suffix}"/>
<property name="version_file" value="${version_base_file}-${version_suffix}"/>
<property name="version_rpm" value="${version_base}_${version_suffix}"/>
</target>
<!-- Set properties for DAILY build -->
<target name="setupBuildDaily" if="buildType_daily">
<property name="buildTypeSet" value="true"/>
<property name="is_dev_phase" value="true"/>
<property name="is_production" value="false"/>
<property name="use_verbose_buildtime" value="true"/>
<property name="version_build" value="pre${version_buildnum}"/>
<property name="version_suffix" value="${version_build}"/>
<property name="version" value="${version_base}-${version_suffix}-${buildtime}"/>
<property name="version_file" value="${version_base_file}-${version_suffix}-${buildtime}"/>
<property name="version_rpm" value="${version_base}_${version_suffix}_${buildtime}"/>
</target>
<!-- Check buildType -->
<target name="checkBuildType" unless="buildTypeSet">
<fail message="Unknown build.type = ${build.type}"/>
</target>
<target name="init">
<!-- Create the time stamp -->
<tstamp>
<format property="buildtime_verbose" pattern="dd MMM yyyy HH:mm:ss z"/>
<format property="buildtime" pattern="yyMMddHHmm"/>
</tstamp>
<echo message="buildtime = ${buildtime_verbose}"/>
<!-- Create the base build directory -->
<mkdir dir="${build}"/>
<!-- ========== determine platform ========== -->
<condition property="isWindowsOnX86">
<os family="windows" arch="x86"/>
</condition>
<condition property="isLinuxOnX86">
<os name="linux" arch="i386"/>
</condition>
<condition property="isLinuxOnAmd64">
<os name="linux" arch="amd64"/>
</condition>
<condition property="isLinuxOnIA64">
<os name="linux" arch="ia64"/>
</condition>
<condition property="isLinuxOnPPC">
<os name="linux" arch="ppc"/>
</condition>
<condition property="isSolarisOnSparc">
<os name="SunOS" arch="sparc"/>
</condition>
<condition property="isSolarisOnX86">
<os name="SunOS" arch="x86"/>
</condition>
<condition property="isa_amd64">
<contains string="${sun.cpu.isalist}" substring="amd64"/>
</condition>
<available file="${java.home}/lib/amd64/libjawt.so" property="jre_amd64_present"/>
<!-- flag indicating that a 64-bit JVM is available for Solaris/x86 -->
<condition property="isSolarisOnX86_64">
<and>
<isset property="isSolarisOnX86"/>
<isset property="isa_amd64"/>
<isset property="jre_amd64_present"/>
</and>
</condition>
</target>
<target name="compile-debug" depends="setupPlatform">
<!-- <ant dir="${vecmath_home}" target="jar-debug"/>-->
<ant dir="src/classes" target="compile-debug"/>
<antcall target="compile-debug-native"/>
</target>
<target name="compile-debug-native" unless="build.javaonly">
<ant dir="src/native" target="compile-debug"/>
</target>
<target name="compile-opt" depends="setupPlatform">
<!-- <ant dir="${vecmath_home}" target="jar-opt"/>-->
<ant dir="src/classes" target="compile-opt"/>
<antcall target="compile-opt-native"/>
</target>
<target name="compile-opt-native" unless="build.javaonly">
<ant dir="src/native" target="compile-opt"/>
</target>
<target name="compile" depends="compile-debug,compile-opt" />
<target name="jar-debug" depends="compile-debug">
<ant dir="src/classes" target="jar-debug"/>
</target>
<target name="jar-debug-javaonly">
<property name="build.javaonly" value="true"/>
<antcall target="jar-debug"/>
</target>
<target name="jar-opt" depends="compile-opt">
<ant dir="src/classes" target="jar-opt"/>
</target>
<target name="jar-opt-javaonly">
<property name="build.javaonly" value="true"/>
<antcall target="jar-opt"/>
</target>
<target name="jar" depends="jar-debug,jar-opt" />
<target name="docs-jcp" depends="setupPlatform">
<ant dir="src/classes" target="docs-jcp"/>
</target>
<target name="docs-public" depends="setupPlatform" unless="nojavadoc">
<ant dir="src/classes" target="docs-public"/>
</target>
<target name="docs-private" depends="setupPlatform">
<ant dir="src/classes" target="docs-private"/>
</target>
<target name="docs" depends="setupPlatform">
<ant dir="src/classes" target="docs"/>
</target>
<target name="dist" depends="jar-opt,docs-public">
<ant dir="src/classes" target="dist"/>
<ant dir="src/native" target="dist"/>
</target>
<target name="all" depends="jar-debug,dist,docs-jcp,docs-private"/>
<target name="rpm" description="Build rpm package" depends="dist">
<mkdir dir="${build}/${platform}/rpm"/>
<mkdir dir="${build}/${platform}/rpm/SPECS"/>
<mkdir dir="${build}/${platform}/rpm/SOURCES"/>
<mkdir dir="${build}/${platform}/rpm/BUILD"/>
<mkdir dir="${build}/${platform}/rpm/RPMS"/>
<copy file="build-tools/java3d-rpm.spec"
todir="${build}/${platform}/rpm/SPECS"
overwrite="true">
<filterset>
<filter token="VERSION" value="${version}"/>
<filter token="VERSION_FILE" value="${version_file}"/>
<filter token="VERSION_RPM" value="${version_rpm}"/>
</filterset>
</copy>
<tar destfile="${build}/${platform}/rpm/SOURCES/java3d-${version_file}.tar.gz"
compression="gzip">
<tarfileset dir="${dist}/${platform}"
includes="lib/**"
/>
<tarfileset dir="release-info"
includes="BINARY-CODE-LICENSE.txt"
/>
<tarfileset dir="."
includes="COPYRIGHT.txt README-FIRST.txt"
/>
</tar>
<rpm specFile="java3d-rpm.spec"
topDir="${build}/${platform}/rpm"/>
<copy
file="${build}/${platform}/rpm/RPMS/i586/java3d-${version_rpm}-1.i586.rpm"
tofile="dist/${platform}/java3d-${version_file}-1-i586.rpm"/>
</target>
<target name="release" description="Package distribution for release" depends="dist">
<property name="staging" location="${dist}/${platform}/staging"/>
<property name="release_name" value="java3d-${version_file}-${platform}"/>
<mkdir dir="${dist}/release"/>
<mkdir dir="${staging}/${release_name}"/>
<zip destfile="${staging}/${release_name}/j3d-jre-${version_file}-${platform}.zip">
<fileset dir="${dist}/${platform}"
includes="lib/**"
/>
<fileset dir="${dist}/${platform}"
includes="bin/**"
/>
</zip>
<copy todir="${staging}/${release_name}">
<fileset dir="." includes="COPYRIGHT.txt"/>
<fileset dir="." includes="LICENSE*.txt"/>
<fileset dir="release-info/pre-release"
includes="HOW-TO-INSTALL.txt README.txt"
/>
</copy>
<zip destfile="${dist}/release/java3d-${version_file}-${platform}.zip">
<fileset dir="${dist}/${platform}/staging"
includes="${release_name}/**"
/>
</zip>
</target>
<target name="clean-dist">
<!-- Delete the ${dist} directory tree -->
<delete dir="${dist}"/>
</target>
<target name="clean" depends="setupPlatform">
<!-- Delete the ${build}, and ${dist} directory trees for current platform -->
<delete dir="${build}/${platform}"/>
<delete dir="${dist}/${platform}"/>
</target>
<target name="clean-all">
<!-- Delete the ${build}, and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="clean-javaonly" depends="setupPlatform">
<!-- Delete only the java portions of $[build} for the current platform -->
<delete dir="${build}/${platform}/debug/classes"/>
<delete dir="${build}/${platform}/debug/lib/ext"/>
<delete dir="${build}/${platform}/opt/classes"/>
<delete dir="${build}/${platform}/opt/lib/ext"/>
</target>
<target name="install-debug" depends="jar-debug">
<ant dir="src/classes" target="install-debug"/>
</target>
<target name="uninstall" depends="setupPlatform">
<ant dir="src/classes" target="uninstall"/>
</target>
<description>
The following ant targets are available ("jar-opt" is the default):
all - execute targets jar-debug and dist.
clean - removes WS/build/ and WS/dist/ for current platform
clean-all - removes WS/build/ and WS/dist/ for all platforms
clean-dist - removes WS/dist.
clean-javaonly - removes java portion of WS/build for current platform
compile - execute targets compile-debug and compile-opt.
compile-debug - builds all classes and native layer in WS/src into
class files under WS/build/${platform}/debug/classes/ and
native files under WS/build/${platform}/debug/native/
compile-opt - builds all classes and native layer in WS/src into
class files under WS/build/${platform}/opt/classes/ and
native files under WS/build/${platform}/opt/native/
dist - creates the distribution jar, native library and javadoc
under WS/dist/${platform}.
docs - builds all classes in WS/src into javadoc under
WS/build/javadocs.
docs-jcp - builds JCP docs of all classes in WS/src into javadoc
under WS/build/javadocs/docs-jcp.
docs-private - builds private docs of all classes in WS/src into javadoc
under WS/build/javadocs/docs-private.
docs-public - builds public docs of all classes in WS/src into javadoc
under WS/build/javadocs/docs-public.
echo - echo some useful information, such as user.home,
ant.home, java.home and platform.
jar - execute targets jar-debug and jar-opt.
jar-debug - creates WS/build/${platform}/debug/lib for all jar
files and libraries from class and native code files under
WS/build/${platform}/debug/classes and
WS/build/${platform}/debug/native.
jar-debug-javaonly
- compiles only the java portion of Java3D and builds
jars in same locations as jar-debug
jar-opt - creates WS/build/${platform}/opt/lib for all jar
files and libraries from class and native code files under
WS/build/${platform}/opt/classes and
WS/build/${platform}/opt/native.
jar-opt-javaonly
- compiles only the java portion of Java3D and builds
jars in same location as jar-opt
rpm - creates a i586 rpm for installation in /usr/java/jdk1.5.0
the rpm is placed in dist/rpm
install-debug - installs the debug build into the JDK pointed to by JAVA_HOME
uninstall - uninstalls Java 3D from the JDK pointed to by JAVA_HOME
</description>
</project>
|