From dee28910f1cf4c5c7ff4fe4500fd12acba8beadd Mon Sep 17 00:00:00 2001 From: gfxadmin Date: Thu, 16 Feb 2006 01:34:08 +0000 Subject: Issue number: Obtained from: Submitted by: Travis Reviewed by: We are modifying the versioning for non-release builds. Now the timestamp is part of the implementation version string. For instance, "1.0.0-pre-20060215-17:03:32" is an implementation of the 1.0.0 version of the API built on Feb. 15, 2006, at 5:03:32 PM. This is how our daily build version strings will look. This is how the default build works. Our official beta builds which are known as "stable" builds will have a version string like: "1.0.0-beta3", etc. Our final version of 1.0.0 implementation will become the "release" build and the version string will be: 1.0.0 There are two easy ways to obtain the version string: 1) use the jogl.verbose properties flag (-Djogl.verbose) to see it at the command line 2) use the java.lang.Package API to query it programatically. See example in demos called demos/misc/VersionInfo We are removing the Version utility class because it was insufficient for a number of reasons. It should be removed with this putback. I am not 100% positive that this does not break the JOGLAppletLauncher class with the change that I have putback, but I can't test it here in my environment. And I am pretty sure it will still work, but we will test it. Modified Files: src/classes/com/sun/opengl/util/JOGLAppletLauncher.java make/joglversion make/build.xml make/joglRIversion ---------------------------------------------------------------------- git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@612 232f8b59-042b-4e1e-8c03-345bb8c30851 --- make/build.xml | 16 ++++++++++- make/joglRIversion | 4 +-- make/joglversion | 4 +-- .../com/sun/opengl/util/JOGLAppletLauncher.java | 33 +++++++++++++++------- 4 files changed, 42 insertions(+), 15 deletions(-) diff --git a/make/build.xml b/make/build.xml index daa12edc5..d013e4181 100644 --- a/make/build.xml +++ b/make/build.xml @@ -54,6 +54,9 @@ - the original OS detection code. --> + + + @@ -901,13 +904,24 @@ - + + + + + + + + + + diff --git a/make/joglRIversion b/make/joglRIversion index e361f4c51..8203b56b8 100644 --- a/make/joglRIversion +++ b/make/joglRIversion @@ -1,8 +1,8 @@ Specification-Title: Java Bindings for OpenGL API Specification -Specification-Version: 1.0 +Specification-Version: 1.0.0 Specification-Vendor: Sun Microsystems, Inc. Implementation-Title: Java Bindings for OpenGL Runtime Environment -Implementation-Version: 1.0 +Implementation-Version: 1.0.0 Implementation-Vendor: Sun Microsystems, Inc. Extension-Name: javax.media.opengl Implementation-Vendor-Id: com.sun diff --git a/make/joglversion b/make/joglversion index b0eaae91d..9a37794aa 100644 --- a/make/joglversion +++ b/make/joglversion @@ -1,8 +1,8 @@ Specification-Title: Java Bindings for OpenGL API Specification -Specification-Version: 1.0 Public Review plus +Specification-Version: 1.0.0 Specification-Vendor: Sun Microsystems, Inc. Implementation-Title: Java Bindings for OpenGL Runtime Environment -Implementation-Version: 1.0 Beta2 plus +Implementation-Version: @VERSION@ Implementation-Vendor: java.net JOGL community Extension-Name: javax.media.opengl Implementation-Vendor-Id: com.sun diff --git a/src/classes/com/sun/opengl/util/JOGLAppletLauncher.java b/src/classes/com/sun/opengl/util/JOGLAppletLauncher.java index 0af380255..7a9f8ab74 100755 --- a/src/classes/com/sun/opengl/util/JOGLAppletLauncher.java +++ b/src/classes/com/sun/opengl/util/JOGLAppletLauncher.java @@ -280,18 +280,31 @@ public class JOGLAppletLauncher extends Applet { if (firstStart) { firstStart = false; String userHome = System.getProperty("user.home"); - String installDirName = userHome + File.separator + ".jogl_ext" - + File.separator + installDirectory + File.separator + Version.getVersion(); - final File installDir = new File(installDirName); + try { + // We need to load in the jogl package so that we can query the version information + ClassLoader classloader = getClass().getClassLoader(); + classloader.loadClass("javax.media.opengl.GL"); + Package p = Package.getPackage("javax.media.opengl"); + + String installDirName = userHome + File.separator + ".jogl_ext" + + File.separator + installDirectory + File.separator + p.getImplementationVersion(); + + final File installDir = new File(installDirName); + + Thread refresher = new Thread() { + public void run() { + refreshJOGL(installDir); + } + }; + refresher.setPriority(Thread.NORM_PRIORITY - 1); + refresher.start(); + } + catch (ClassNotFoundException e) { + System.err.println("Unable to load javax.media.opengl package"); + System.exit(0); + } - Thread refresher = new Thread() { - public void run() { - refreshJOGL(installDir); - } - }; - refresher.setPriority(Thread.NORM_PRIORITY - 1); - refresher.start(); } else if (joglStarted) { // we have to start again the applet (start can be called multiple times, // e.g once per tabbed browsing -- cgit v1.2.3