aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build-tools/VersionInfo.java128
-rw-r--r--build.xml213
-rw-r--r--src/classes/build.xml26
-rw-r--r--src/classes/share/javax/media/j3d/J3dDebug.java4
4 files changed, 275 insertions, 96 deletions
diff --git a/build-tools/VersionInfo.java b/build-tools/VersionInfo.java
index d2c3986..3450fc5 100644
--- a/build-tools/VersionInfo.java
+++ b/build-tools/VersionInfo.java
@@ -80,42 +80,73 @@ class VersionInfo extends Object {
// -------------------------------------------------------------------
/**
- * Constant that indicates whether or not this is
- * a debug build.
+ * 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.
+ * This static final variable is used to enable debugging and
+ * assertion checking during the development phase of a particular
+ * version of Java 3D. It is disabled for "opt" production builds
+ * (beta, release candidate, fcs, and patch builds). It is enabled
+ * for all "debug" builds and for daily and stable "opt" builds.
+ *
+ * <p>
+ * This parameter is controlled by ant via the build.xml file. The
+ * default value is true.
*/
- static final boolean devPhase = @DEV_PHASE@;
+ static final boolean isDevPhase = @IS_DEV_PHASE@;
/**
- * This flag is set to true for daily builds and false for stable builds.
+ * This static final variable is used indicate a production
+ * (beta, release candidate, fcs, or patch) build.
+ * <p>
+ * This parameter is controlled by ant via the build.xml file. The
+ * default value is false.
*/
- private static final boolean dailyBuild = @DAILY_BUILD@;
+ static final boolean isProduction = @IS_PRODUCTION@;
/**
- * 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.
+ * If this flag is set to true, the verbose buildtime string
+ * will be appended to the version string)
+ * <p>
+ * This parameter is controlled by ant via the build.xml file. The
+ * default value is true.
+ */
+ private static final boolean useVerboseBuildTime = @USE_VERBOSE_BUILDTIME@;
+
+ /**
+ * String identifying the type of Java 3D build, one of:
+ * "daily", "stable", "beta", "fcs", or "patch". The default value
+ * is "daily".
+ */
+ private static final String BUILD_TYPE = "@BUILD_TYPE@";
+
+ /**
+ * String identifying the build number of Java 3D in the format
+ * "buildNN", where "NN" is the sequential build number, for
+ * example, build47. This string contain only letters and
+ * numbers, 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.
+ * For production builds, this string appears parenthetically,
+ * after the first space.
*/
private static final String VERSION_BUILD = "@VERSION_BUILD@";
/**
+ * String identifying the particular build of Java 3D, for
+ * example, "-beta1", "-build47", "-rc1", "_01", etc. Note that
+ * this includes the leading dash or underscore. It will typically
+ * be empty for FCS builds. This string may only contain letters,
+ * numbers, periods, dashes, or underscores. It must not contain
+ * any other characters or spaces.
+ *
+ * This us used as part of the j3d.version that appears before the
+ * optional first space.
+ */
+ private static final String VERSION_SUFFIX = "@VERSION_SUFFIX@";
+
+ /**
* Date stamp
*
* This is only used for daily builds.
@@ -150,13 +181,13 @@ class VersionInfo extends Object {
private static final String VERSION_BASE = "@VERSION_BASE@";
/**
- * Qualifier indicating that the version of Java 3D is
- * experimental. This must <i>not</i> be modified by deverlopers.
+ * Boolean flag indicating that the version of Java 3D is
+ * experimental. This must <i>not</i> be modified by developers.
* All non-official builds <i>must</i> contain the string
* <code>"experimental"</code> as part of the release name that
* appears before the optional first space.
*/
- private static final String VERSION_SUFFIX = "experimental";
+ private static final boolean isExperimental = !isProduction;
/**
* The composite version string. This is composed in the static
@@ -171,11 +202,19 @@ class VersionInfo extends Object {
private static final String VENDOR;
/**
+ * Build type string, one of "fcs", "fcs-patch", or "", that is
+ * appended to the end of the version string after the build
+ * identifier (and after the first space, which will automatically
+ * be added) and before the optional verbose time and date stamp.
+ */
+ private static final String BUILD_QUALIFIER = "@BUILD_QUALIFIER@";
+
+ /**
* Verbose 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 is only used for non-fcs (non-production) builds.
+ * string. This string is only used for non-fcs builds.
*/
private static final String BUILDTIME_VERBOSE = "@BUILDTIME_VERBOSE@";
@@ -190,6 +229,12 @@ class VersionInfo extends Object {
// The static initializer composes the version and vendor strings
static {
+ final boolean isPatchBuild = BUILD_TYPE.equals("patch");
+ final boolean isFcsBuild = BUILD_TYPE.equals("fcs");
+ final boolean isBetaBuild = BUILD_TYPE.equals("beta");
+ final boolean isStableBuild = BUILD_TYPE.equals("stable");
+ final boolean isDailyBuild = BUILD_TYPE.equals("daily");
+
// Assign the vendor by concatenating primary and developer
// vendor strings
String tmpVendor = VENDOR_PRIMARY;
@@ -198,19 +243,40 @@ class VersionInfo extends Object {
}
String tmpVersion = VERSION_BASE;
- if (devPhase && isNonEmpty(VERSION_BUILD)) {
- tmpVersion += "-" + VERSION_BUILD;
+ if (isNonEmpty(VERSION_SUFFIX)) {
+ if (isPatchBuild) {
+ tmpVersion += "_";
+ }
+ else {
+ tmpVersion += "-";
+ }
+ tmpVersion += VERSION_SUFFIX;
}
- if (dailyBuild && isNonEmpty(BUILDTIME)) {
+ if (isDailyBuild && isNonEmpty(BUILDTIME)) {
tmpVersion += "-" + BUILDTIME;
}
- if (isNonEmpty(VERSION_SUFFIX)) {
- tmpVersion += "-" + VERSION_SUFFIX;
+ if (isExperimental) {
+ tmpVersion += "-experimental";
+ }
+
+ // Append the optional fields that follow the first space
+
+ if (isProduction) {
+ if (isFcsBuild) {
+ tmpVersion += " fcs";
+ }
+ else if (isPatchBuild) {
+ tmpVersion += " fcs+patch";
+ }
+
+ if (isNonEmpty(VERSION_BUILD)) {
+ tmpVersion += " (" + VERSION_BUILD + ")";
+ }
}
- if (devPhase && isNonEmpty(BUILDTIME_VERBOSE)) {
+ if (useVerboseBuildTime && isNonEmpty(BUILDTIME_VERBOSE)) {
tmpVersion += " " + BUILDTIME_VERBOSE;
}
diff --git a/build.xml b/build.xml
index 6f1e79b..9c7d0f6 100644
--- a/build.xml
+++ b/build.xml
@@ -34,7 +34,7 @@
*
* For example:
*
- * ant -Dbuild.comp=vc -Dbuild.rend=d3d
+ * ant -Dbuild.comp=vc -Dbuild.rend=d3d ...
*
*********************************************************************
-->
@@ -44,19 +44,37 @@
<!-- *************************************** -->
<!--
- * The following two properties specify the version and build number
- * of Java 3D being built. 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 ".". The version_build property
- * specifies the build number (e.g., pre6, build6, beta1, rc1). It
- * is ignored for production builds.
+ * 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="9"/>
+ <!--
+ * 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="beta1"/>
+
+ <!--
+ * 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.3.2"/>
<property name="version_base_file" value="1_3_2"/>
- <property name="version_build" value="pre9"/>
+
<!-- ************************************* -->
<!-- *** End build-specific properties *** -->
@@ -65,18 +83,27 @@
<!--
*********************************************************************
*
- * A build of Java 3D is one of the following three types: daily
- * build, stable build, production build. Daily builds are identified
- * with a "preN_YYMMDDHHMM" suffix; stable builds are identified with
- * a "buildN" suffix; production builds are identified with an "rcN"
- * suffix or with no suffix.
+ * 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. One of the following
- * properties may be set on the command line to do a different kind
+ * 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.stable=true Do a stable build
- * build.production=true Do a production (RC or FCS) 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 ...
*
*********************************************************************
-->
@@ -95,23 +122,31 @@
<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="java.home = ${java.home}"/>
- <echo message="ant.home = ${ant.home}"/>
- <echo message="O/S arch = ${os.arch}"/>
- <echo message="O/S name = ${os.name}"/>
+
+ <echo message=""/>
+ <echo message="build.type = ${build.type}"/>
<echo message="build.rend = ${build.rend}"/>
<echo message="build.comp = ${build.comp}"/>
- <echo message="vecmath_home = ${vecmath_home}"/>
- <echo message="core_utils_home = ${core_utils_home}"/>
- <echo message="ostype = ${ostype}"/>
- <echo message="platform = ${platform}"/>
+ <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}"/>
- <echo message="daily_build = ${daily_build}"/>
- <echo message="dev_phase = ${dev_phase}"/>
</target>
<target name="setupSolaris" if="isSolarisOnSparc">
@@ -135,41 +170,113 @@
<property name="platform" value="windows-i586-${build.comp}"/>
</target>
- <target name="setupDaily" unless="build.stable">
- <echo message="setupDaily"/>
- <property name="daily_build" value="true"/>
- <property name="version" value="${version_base}-${version_build}-${buildtime}"/>
- <property name="version_file" value="${version_base_file}-${version_build}-${buildtime}"/>
- <property name="version_rpm" value="${version_base}_${version_build}_${buildtime}"/>
+ <target name="setupPlatform"
+ depends="init, setupBuildType, setupSolaris, setupLinux, setupLinuxAmd64, 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="setupStable" if="build.stable">
- <echo message="setupStable"/>
- <property name="daily_build" value="false"/>
- <property name="version" value="${version_base}-${version_build}"/>
- <property name="version_file" value="${version_base_file}-${version_build}"/>
- <property name="version_rpm" value="${version_base}_${version_build}"/>
+
+ <target name="setupBuildType" depends="initBuildType, setupBuildPatch, setupBuildFcs, setupBuildBeta, setupBuildStable, setupBuildDaily, checkBuildType">
+ <echo message="build.type = ${build.type}"/>
</target>
- <target name="setupProduction" if="build.production">
- <echo message="setupProduction"/>
- <property name="daily_build" value="false"/>
- <property name="dev_phase" value="false"/>
+ <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>
- <target name="setupDevPhase" unless="build.production" depends="setupDaily,setupStable">
- <echo message="setupDevPhase"/>
- <property name="dev_phase" value="true"/>
+
+ <!-- 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>
- <target name="setupPlatform"
- depends="init, setupProduction, setupDevPhase ,setupSolaris, setupLinux, setupLinuxAmd64, 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"/>
+
+ <!-- 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>
diff --git a/src/classes/build.xml b/src/classes/build.xml
index 30004b0..6b63d5e 100644
--- a/src/classes/build.xml
+++ b/src/classes/build.xml
@@ -39,13 +39,16 @@
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="DAILY_BUILD" value="${daily_build}"/>
+ <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>
@@ -80,13 +83,16 @@
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="DAILY_BUILD" value="${daily_build}"/>
+ <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>
diff --git a/src/classes/share/javax/media/j3d/J3dDebug.java b/src/classes/share/javax/media/j3d/J3dDebug.java
index 564d61a..8490d5e 100644
--- a/src/classes/share/javax/media/j3d/J3dDebug.java
+++ b/src/classes/share/javax/media/j3d/J3dDebug.java
@@ -14,7 +14,7 @@ package javax.media.j3d;
class J3dDebug {
- // For production release devPhase must be set to false.
+ // For production release devPhase is set to false.
// Do no debugging.
static final int NO_DEBUG = 0;
@@ -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 = VersionInfo.devPhase;
+ static final boolean devPhase = VersionInfo.isDevPhase;
// This is a property variable. It allows a true/false be sent to
// J3d from command line, to on/off code segments. To avoid