diff options
-rw-r--r-- | make/build.xml | 16 | ||||
-rw-r--r-- | make/joglRIversion | 4 | ||||
-rw-r--r-- | make/joglversion | 4 | ||||
-rwxr-xr-x | src/classes/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. --> <project name="JOGL" basedir="." default="all"> + + <!-- This is the version of JOGL you are building --> + <property name="base_version" value="1.0.0"/> <!-- Pull in GlueGen cpptasks build file --> <property name="gluegen.root" value="../../gluegen" /> @@ -901,13 +904,24 @@ <target name="cond-else-RImanifest" depends="check-RIcond" unless="RIcond-is-true"> - <jar manifest="joglversion" destfile="${jogl.jar}"> + <tstamp> + <format property="timestamp" pattern="yyyyMMdd-HH:mm:ss"/> + </tstamp> + <copy file="joglversion" + tofile="tempversion" + overwrite="true"> + <filterset> + <filter token="VERSION" value="${base_version}-pre-${timestamp}"/> + </filterset> + </copy> + <jar manifest="tempversion" destfile="${jogl.jar}"> <fileset dir="${classes}"> <include name="javax/media/opengl/**" /> <include name="com/sun/gluegen/runtime/**" /> <include name="com/sun/opengl/**" /> </fileset> </jar> + <delete file="tempversion"/> </target> 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 |