From: <ma...@us...> - 2006-07-02 21:57:04
|
Revision: 2411 Author: matzon Date: 2006-07-02 14:56:57 -0700 (Sun, 02 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2411&view=rev Log Message: ----------- preliminary applet support Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-07-02 21:55:09 UTC (rev 2410) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-07-02 21:56:57 UTC (rev 2411) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2004 LWJGL Project + * Copyright (c) 2002-2006 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +31,7 @@ */ package org.lwjgl; +import java.io.File; import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URL; @@ -38,6 +39,7 @@ import java.security.PrivilegedAction; import java.security.PrivilegedExceptionAction; +import org.lwjgl.applet.LWJGLInstaller; import org.lwjgl.input.Mouse; /** @@ -51,15 +53,24 @@ public final class Sys { /** Current version of library */ - private static final String VERSION = "1.0beta"; + private static final String VERSION = "1.0beta2"; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; - private static void loadLibrary(final String name) { + /** + * utility loadlibrary to load the native library using elevated priviledges + * @param name Name of library to load, or full path if usingPath is true + * @param usingPath true if using the full path to the native + */ + private static void loadLibrary(final String name, final boolean usingPath) { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { - System.loadLibrary(name); + if(usingPath) { + System.load(name); + } else { + System.loadLibrary(name); + } return null; } }); @@ -71,15 +82,32 @@ UnsatisfiedLinkError last_load_error = null; for (int i = 0; i < library_names.length; i++) { try { - loadLibrary(library_names[i]); + loadLibrary(library_names[i], false); last_load_error = null; break; } catch (UnsatisfiedLinkError e) { last_load_error = e; } } - if (last_load_error != null) + + // failed normal loading - check installer + if (last_load_error != null && LWJGLInstaller.installed) { + for (int i = 0; i < library_names.length; i++) { + try { + loadLibrary(LWJGLInstaller.installDirectory + File.separator + System.mapLibraryName(library_names[i]), true); + last_load_error = null; + break; + } catch (UnsatisfiedLinkError e) { + last_load_error = e; + } + } + } + + // check for error + if (last_load_error != null) { throw last_load_error; + } + String native_version = implementation.getNativeLibraryVersion(); if (!native_version.equals(getVersion())) throw new LinkageError("Version mismatch: jar version is '" + getVersion() + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2006-07-11 21:00:45
|
Revision: 2482 Author: elias_naur Date: 2006-07-11 14:00:39 -0700 (Tue, 11 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2482&view=rev Log Message: ----------- Linux: more 64 bit stuff Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-07-11 20:56:40 UTC (rev 2481) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-07-11 21:00:39 UTC (rev 2482) @@ -83,10 +83,12 @@ if (implementation.has64Bit()) { try { doLoadLibrary(lib_name + POSTFIX64BIT); + return; } catch (UnsatisfiedLinkError e2) { LWJGLUtil.log("Failed to load 64 bit library:" + e2.getMessage()); } } + // Throw original error throw e; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2006-09-21 14:39:15
|
Revision: 2578 http://svn.sourceforge.net/java-game-lib/?rev=2578&view=rev Author: elias_naur Date: 2006-09-21 07:39:10 -0700 (Thu, 21 Sep 2006) Log Message: ----------- Bumped JNI library version Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-09-21 13:49:49 UTC (rev 2577) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-09-21 14:39:10 UTC (rev 2578) @@ -57,7 +57,7 @@ private static final String VERSION = "1.0beta3"; /** Current version of the JNI library */ - static final int JNI_VERSION = 3; + static final int JNI_VERSION = 4; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2006-12-06 14:01:34
|
Revision: 2688 http://svn.sourceforge.net/java-game-lib/?rev=2688&view=rev Author: elias_naur Date: 2006-12-06 06:01:29 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Bumped Sys.JNI_VERSION because of earlier OpenGL function changes Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-12-04 21:58:46 UTC (rev 2687) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-12-06 14:01:29 UTC (rev 2688) @@ -57,7 +57,7 @@ private static final String VERSION = "1.0beta4"; /** Current version of the JNI library */ - static final int JNI_VERSION = 5; + static final int JNI_VERSION = 6; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2007-01-17 08:22:32
|
Revision: 2728 http://svn.sourceforge.net/java-game-lib/?rev=2728&view=rev Author: elias_naur Date: 2007-01-17 00:22:31 -0800 (Wed, 17 Jan 2007) Log Message: ----------- Bumped native version because of internal linux API change Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-01-17 08:16:16 UTC (rev 2727) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-01-17 08:22:31 UTC (rev 2728) @@ -57,7 +57,7 @@ private static final String VERSION = "1.0-rc1"; /** Current version of the JNI library */ - static final int JNI_VERSION = 7; + static final int JNI_VERSION = 8; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2007-01-17 12:49:26
|
Revision: 2729 http://svn.sourceforge.net/java-game-lib/?rev=2729&view=rev Author: elias_naur Date: 2007-01-17 04:49:20 -0800 (Wed, 17 Jan 2007) Log Message: ----------- Sys.java: Don't use reflection to create platform specific implementations Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-01-17 08:22:31 UTC (rev 2728) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-01-17 12:49:20 UTC (rev 2729) @@ -111,27 +111,14 @@ String class_name; switch (LWJGLUtil.getPlatform()) { case LWJGLUtil.PLATFORM_LINUX: - class_name = "org.lwjgl.LinuxSysImplementation"; - break; + return new LinuxSysImplementation(); case LWJGLUtil.PLATFORM_WINDOWS: - class_name = "org.lwjgl.WindowsSysImplementation"; - break; + return new org.lwjgl.WindowsSysImplementation(); case LWJGLUtil.PLATFORM_MACOSX: - class_name = "org.lwjgl.MacOSXSysImplementation"; - break; + return new org.lwjgl.MacOSXSysImplementation(); default: throw new IllegalStateException("Unsupported platform"); } - try { - Class impl_class = Class.forName(class_name); - return (SysImplementation)impl_class.newInstance(); - } catch (ClassNotFoundException e) { - throw new RuntimeException(e); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InstantiationException e) { - throw new RuntimeException(e); - } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2007-07-28 21:28:35
|
Revision: 2860 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2860&view=rev Author: elias_naur Date: 2007-07-28 14:28:33 -0700 (Sat, 28 Jul 2007) Log Message: ----------- Bumped Sys.JNI_VERSION Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-07-28 21:19:58 UTC (rev 2859) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-07-28 21:28:33 UTC (rev 2860) @@ -57,7 +57,7 @@ private static final String VERSION = "1.1"; /** Current version of the JNI library */ - static final int JNI_VERSION = 10; + static final int JNI_VERSION = 11; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2007-11-01 13:06:33
|
Revision: 2916 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2916&view=rev Author: elias_naur Date: 2007-11-01 06:06:11 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Tweaked exception message Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-10-30 18:34:38 UTC (rev 2915) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-11-01 13:06:11 UTC (rev 2916) @@ -88,7 +88,7 @@ doLoadLibrary(lib_name + POSTFIX64BIT); return; } catch (UnsatisfiedLinkError e2) { - LWJGLUtil.log("Failed to load 64 bit library:" + e2.getMessage()); + LWJGLUtil.log("Failed to load 64 bit library: " + e2.getMessage()); } } // Throw original error This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2008-01-21 21:55:23
|
Revision: 2947 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2947&view=rev Author: matzon Date: 2008-01-21 13:55:20 -0800 (Mon, 21 Jan 2008) Log Message: ----------- 2.0 version string Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-01-21 21:55:17 UTC (rev 2946) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-01-21 21:55:20 UTC (rev 2947) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "1.1.4"; + private static final String VERSION = "2.0"; /** Current version of the JNI library */ static final int JNI_VERSION = 12; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2008-04-07 17:34:38
|
Revision: 2982 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2982&view=rev Author: elias_naur Date: 2008-04-07 10:34:29 -0700 (Mon, 07 Apr 2008) Log Message: ----------- Bumped Sys.JNI_VERSION Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-07 17:10:14 UTC (rev 2981) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-07 17:34:29 UTC (rev 2982) @@ -57,7 +57,7 @@ private static final String VERSION = "2.0a2"; /** Current version of the JNI library */ - static final int JNI_VERSION = 12; + static final int JNI_VERSION = 13; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2008-04-12 20:45:45
|
Revision: 3009 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3009&view=rev Author: elias_naur Date: 2008-04-12 13:45:43 -0700 (Sat, 12 Apr 2008) Log Message: ----------- Bumped Sys.JNI_VERSION Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-12 20:40:27 UTC (rev 3008) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-12 20:45:43 UTC (rev 3009) @@ -57,7 +57,7 @@ private static final String VERSION = "2.0a4"; /** Current version of the JNI library */ - static final int JNI_VERSION = 15; + static final int JNI_VERSION = 16; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |