diff options
-rw-r--r-- | build-tools/VersionInfo.java (renamed from src/classes/share/javax/media/j3d/VersionInfo.java) | 67 | ||||
-rw-r--r-- | build.properties | 2 | ||||
-rw-r--r-- | build.xml | 40 | ||||
-rw-r--r-- | src/classes/J3dVersion | 2 | ||||
-rw-r--r-- | src/classes/build.xml | 94 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/J3dDebug.java | 2 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/RenderBin.java | 2 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/VirtualUniverse.java | 6 |
8 files changed, 134 insertions, 81 deletions
diff --git a/src/classes/share/javax/media/j3d/VersionInfo.java b/build-tools/VersionInfo.java index 9f6aa56..09c0159 100644 --- a/src/classes/share/javax/media/j3d/VersionInfo.java +++ b/build-tools/VersionInfo.java @@ -37,6 +37,9 @@ package javax.media.j3d; * </ol> * * <p> + * The tags of the form @STRING@ are populated by ant when the project is built + * + * <p> * Additionally, developers are required to comply with the terms * of the Java 3D API specification, which prohibits releasing an * implementation of the Java 3D API without first licensing and @@ -52,26 +55,6 @@ class VersionInfo extends Object { */ private static final String VENDOR_DEVELOPER = null; - /** - * String identifying the particular build of Java 3D, for - * example, beta1, build47, rc1, etc. This string may only - * contain letters, numbers, periods, dashes, or underscores. It - * must not contain any other characters or spaces. - * - * This will typically by null for final, released builds, but - * should be non-null for all other builds. - */ - private static final String VERSION_BUILD = "build6"; - - /** - * Time and date stamp appended to the end of the version string. - * This is appended to the version string - * after the build identifier (and after the first space, which - * will automatically be added) and before the optional dev - * string. This string should be null if no time stamp is desired - * (it will be null for production builds). - */ - private static final String VERSION_TIME_STAMP = J3dBuildInfo.getBuildTimeStamp(); /** * An optional string appended to the end of the version string, @@ -95,6 +78,17 @@ class VersionInfo extends Object { // TCK tests, who are releasing their own implementation of Java 3D // are permitted to change these constants. // ------------------------------------------------------------------- + /** + * String identifying the particular build of Java 3D, for + * example, beta1, build47, rc1, etc. This string may only + * contain letters, numbers, periods, dashes, or underscores. It + * must not contain any other characters or spaces. + * + * This will typically by null for final, released builds, but + * should be non-null for all other builds. + */ + private static final String VERSION_BUILD = "@VERSION_BUILD@"; + /** * Specification version (major and minor version only). This @@ -121,7 +115,7 @@ class VersionInfo extends Object { * major and minor version <i>must</i> be the same as the specification * version. */ - private static final String VERSION_BASE = "1.3.2"; + private static final String VERSION_BASE = "@VERSION_BASE@"; /** * Qualifier indicating that the version of Java 3D is @@ -144,6 +138,36 @@ class VersionInfo extends Object { */ private static final String VENDOR; + /** + * Constant that indicates whether or not this is + * a debug build. + */ + static final boolean isDebug = @IS_DEBUG@; + + /** + * This static final variable is used to turn on/off debugging, + * checking, and initializing codes that may be preferred in + * development phase but not necessarily required in the + * production release. + * + * Beside for debugging, use this variable to do initialization, + * checking objects existence, and other checks that may help in + * uncovering potential bugs during code development. This + * variable should be turned off during production release as it + * may cause performance hit. + */ + static final boolean devPhase = @DEV_PHASE@; + + /** + * Time and date stamp appended to the end of the version string. + * This is appended to the version string + * after the build identifier (and after the first space, which + * will automatically be added) and before the optional dev + * string. This string should be null if no time stamp is desired + * (it will be null for production builds). + */ + private static final String VERSION_TIME_STAMP = devPhase ? "@TIME_STAMP@" : null; + // The static initializer composes the version and vendor strings static { // Assign the vendor by concatenating primary and developer @@ -206,4 +230,5 @@ class VersionInfo extends Object { static String getVendor() { return VENDOR; } + } diff --git a/build.properties b/build.properties deleted file mode 100644 index 0cc0896..0000000 --- a/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -build.rend=ogl -build.comp=gcc @@ -16,6 +16,21 @@ <project name="Java 3D" default="jar-opt" basedir="."> + <!-- ************************* --> + <!-- Build Specific properties --> + + <!-- Version number of build --> + <property name="version_base" value="1.3.2"/> + + <!-- Build number, eg pre6, build6 --> + <property name="version_build" value="pre7"/> + + <!-- End of Build Specific properties --> + <!-- ******************************** --> + + <!-- True for all non FCS builds --> + <property name="dev_phase" value="true"/> + <!-- Set global properties for this build --> <property name="vecmath_home" location="../vecmath"/> <property name="core_utils_home" location="../j3d-core-utils"/> @@ -26,11 +41,11 @@ <property name="build-tools" location="build-tools"/> <property name="build" location="build"/> <property name="dist" location="dist"/> - <property name="version" value="1_3_2_b5"/> + <property name="version" value="${version_base}_${version_build}"/> <property name="docname" value="java3d-${version}-doc"/> - <property environment="env"/> - <property file="build.properties"/> - + <property name="build.comp" value="gcc"/> + <property name="build.rend" value="ogl"/> + <target name="echo" depends="setupPlatform"> <echo message="user.name = ${user.name}"/> <echo message="user.home = ${user.home}"/> @@ -62,18 +77,22 @@ <property name="platform" value="windows-i586-${build.comp}"/> </target> - <target name="setupPlatform" depends="setupSolaris, setupLinux, setupWindows"> - + <target name="setupPlatform" depends="setupSolaris, setupLinux, setupWindows"> + <property name="build-debug-gen" location="${build}/${platform}/debug/gen"/> + <property name="build-opt-gen" location="${build}/${platform}/opt/gen"/> </target> <target name="init"> <!-- Create the time stamp --> <tstamp> - <format property="buildtime" + <format property="buildtime_verbose" pattern="dd MMM yyyy HH:mm:ss z"/> + <format property="buildtime" pattern="yyMMddHHmm"/> + <format property="buildtime_old" pattern="yyyy-MM-dd'T'HH:mm:ss"/> </tstamp> - <echo message="buildtime = ${buildtime}"/> + + <echo message="buildtime = ${buildtime_verbose}"/> <!-- Create the base build directory --> <mkdir dir="${build}"/> @@ -144,7 +163,8 @@ <mkdir dir="${build}/rpm/BUILD"/> <mkdir dir="${build}/rpm/RPMS"/> - <copy file="build-tools/java3d-rpm.spec" todir="${build}/rpm/SPECS"> + <copy file="build-tools/java3d-rpm.spec" + todir="${build}/rpm/SPECS"> <filterset> <filter token="VERSION" value="${version}"/> </filterset> @@ -166,7 +186,7 @@ <rpm specFile="java3d-rpm.spec" topDir="${build}/rpm"/> - <copy file="${build}/rpm/RPMS/i586/java3d-${version}-1.i586.rpm" todir="dist"/> + <copy file="${build}/rpm/RPMS/i586/java3d-${version}-1.i586.rpm" todir="dist/linux-i586"/> </target> <target name="clean-dist"> diff --git a/src/classes/J3dVersion b/src/classes/J3dVersion index 748a302..61276d5 100644 --- a/src/classes/J3dVersion +++ b/src/classes/J3dVersion @@ -3,7 +3,7 @@ Specification-Title: Java 3D API Specification Specification-Version: 1.3 Specification-Vendor: Sun Microsystems, Inc. Implementation-Title: Java 3D Core Runtime Environment -Implementation-Version: 1.3.2 +Implementation-Version: @VERSION_BASE@ Implementation-Vendor: Sun Microsystems, Inc. Extension-Name: javax.media.j3d Implementation-Vendor-Id: com.sun diff --git a/src/classes/build.xml b/src/classes/build.xml index 6dcdf37..d538822 100644 --- a/src/classes/build.xml +++ b/src/classes/build.xml @@ -31,25 +31,21 @@ <mkdir dir="${build}/${platform}/debug/classes"/> <!-- Create the directories used for compiling generated files --> - <property name="build-debug-gen" location="${build}/${platform}/debug/gen"/> <mkdir dir="${build-debug-gen}/tools"/> <mkdir dir="${build-debug-gen}/classes/javax/media/j3d"/> - <!-- Compile and execute the program to create the build time stamp class --> - <javac srcdir="${build-tools}" - destdir="${build-debug-gen}/tools" - source="1.4" - target="1.4" - debug="yes" - deprecation="on"> - </javac> - - <!-- Execute the time stamp generator --> - <java classname="MakeJ3dBuildInfo" - classpath="${build-debug-gen}/tools"> - <arg value="-debug"/> - <arg value="${build-debug-gen}/classes"/> - </java> + <!-- 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="VERSION_BUILD" value="${version_build}"/> + <filter token="VERSION_BASE" value="${version_base}"/> + <filter token="IS_DEBUG" value="true"/> + <filter token="DEV_PHASE" value="true"/> + <filter token="TIME_STAMP" value="${buildtime_verbose}"/> + </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" @@ -74,35 +70,31 @@ <mkdir dir="${build}/${platform}/opt/classes"/> <!-- Create the directories used for compiling generated files --> - <property name="build-opt-gen" location="${build}/${platform}/opt/gen"/> <mkdir dir="${build-opt-gen}/tools"/> <mkdir dir="${build-opt-gen}/classes/javax/media/j3d"/> - <!-- Compile and execute the program to create the build time stamp class --> - <javac srcdir="${build-tools}" - destdir="${build-opt-gen}/tools" - source="1.4" - target="1.4" - debug="no" - deprecation="on"> - </javac> - - <!-- Execute the time stamp generator --> - <java classname="MakeJ3dBuildInfo" - classpath="${build-opt-gen}/tools"> - <arg value="${build-opt-gen}/classes"/> - </java> + <!-- 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="VERSION_BUILD" value="${version_build}"/> + <filter token="VERSION_BASE" value="${version_base}"/> + <filter token="IS_DEBUG" value="false"/> + <filter token="DEV_PHASE" value="${dev_phase}"/> + <filter token="TIME_STAMP" value="${buildtime_verbose}"/> + </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="no" + <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="no" deprecation="off"> - <classpath refid="vecmath.opt.classpath"/> + <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"/> @@ -114,6 +106,15 @@ <!-- 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"/> @@ -128,14 +129,14 @@ <!-- Put everything in ${build}/${platform}/debug/classes/javax into the j3dcore.jar file --> <jar jarfile="${build}/${platform}/debug/lib/ext/j3dcore.jar" - manifest="${src}/classes/J3dVersion" update="yes" + manifest="${build-debug-gen}/J3dVersion" update="yes" 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="${core_utils_src}/classes/ToolsVersion" update="yes" + manifest="${build-debug-gen}/ToolsVersion" update="yes" compress="false"> <fileset dir="${build}/${platform}/debug/classes" includes="com/**/*"/> </jar> @@ -145,6 +146,15 @@ <!-- 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"/> @@ -159,14 +169,14 @@ <!-- Put everything in ${build}/${platform}/opt/classes/javax into the j3dcore.jar file --> <jar jarfile="${build}/${platform}/opt/lib/ext/j3dcore.jar" - manifest="${src}/classes/J3dVersion" update="yes" + manifest="${build-opt-gen}/J3dVersion" update="yes" 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="${core_utils_src}/classes/ToolsVersion" update="yes" + manifest="${build-opt-gen}/ToolsVersion" update="yes" compress="false"> <fileset dir="${build}/${platform}/opt/classes" includes="com/**/*"/> </jar> diff --git a/src/classes/share/javax/media/j3d/J3dDebug.java b/src/classes/share/javax/media/j3d/J3dDebug.java index 3b056a5..564d61a 100644 --- a/src/classes/share/javax/media/j3d/J3dDebug.java +++ b/src/classes/share/javax/media/j3d/J3dDebug.java @@ -37,7 +37,7 @@ class J3dDebug { // uncovering potential bugs during code development. This // variable should be turned off during production release as it // may cause performance hit. - static final boolean devPhase = true; + static final boolean devPhase = VersionInfo.devPhase; // This is a property variable. It allows a true/false be sent to // J3d from command line, to on/off code segments. To avoid diff --git a/src/classes/share/javax/media/j3d/RenderBin.java b/src/classes/share/javax/media/j3d/RenderBin.java index 1f44d42..ff14754 100644 --- a/src/classes/share/javax/media/j3d/RenderBin.java +++ b/src/classes/share/javax/media/j3d/RenderBin.java @@ -5729,7 +5729,7 @@ System.out.println("......tb.soleUser= " + } // Assertion check in debug mode - if (J3dBuildInfo.isDebug && dirtyDepthSortRenderAtom.contains(ra)) { + if (VersionInfo.isDebug && dirtyDepthSortRenderAtom.contains(ra)) { System.err.println("removeARenderAtom: ERROR: RenderAtom not removed from dirty list"); } } diff --git a/src/classes/share/javax/media/j3d/VirtualUniverse.java b/src/classes/share/javax/media/j3d/VirtualUniverse.java index 35b1d69..d308173 100644 --- a/src/classes/share/javax/media/j3d/VirtualUniverse.java +++ b/src/classes/share/javax/media/j3d/VirtualUniverse.java @@ -219,7 +219,7 @@ public class VirtualUniverse extends Object { static { // Print out version information unless this is a // non-debuggable, release (fcs) build - if(J3dDebug.devPhase || J3dBuildInfo.isDebug) { + if(J3dDebug.devPhase || VersionInfo.isDebug) { String versionStr = VersionInfo.getVersion(); if (J3dDebug.devPhase) { System.err.println("Java 3D pre-release version: " + versionStr); @@ -231,7 +231,7 @@ public class VirtualUniverse extends Object { } // Print out debugging information for debug builds - if(J3dBuildInfo.isDebug) { + if(VersionInfo.isDebug) { System.err.println("Initializing Java 3D runtime system:"); System.err.println(" version = " + VersionInfo.getVersion()); System.err.println(" vendor = " + VersionInfo.getVendor()); @@ -255,7 +255,7 @@ public class VirtualUniverse extends Object { createMC(); // Print out debugging information for debug builds - if(J3dBuildInfo.isDebug) { + if(VersionInfo.isDebug) { System.err.println("Java 3D system initialized"); System.err.print(" graphics library = "); switch (mc.getRenderingAPI()) { |