aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-04-17 08:24:48 +0000
committerKenneth Russel <[email protected]>2006-04-17 08:24:48 +0000
commit081ce00eaad7568f5a651a34d0940feb5c9f9124 (patch)
tree3d7ba5cebe98f55bf2f10a7249e5c86c0ee20cfb /make
parent66035d8db744c3bebd8b4ba1979e3846fa79b24c (diff)
Fixed Issue 215: Enhancement for NativeLibLoader
Incorporated patch largely unmodified from user s_koehler. Cleaned up Cg library loading based on this work. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@720 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make')
-rwxr-xr-xmake/cg-common-CustomJavaCode.java17
-rw-r--r--make/cg-common.cfg4
2 files changed, 3 insertions, 18 deletions
diff --git a/make/cg-common-CustomJavaCode.java b/make/cg-common-CustomJavaCode.java
index ba0df4ee9..63afdb65d 100755
--- a/make/cg-common-CustomJavaCode.java
+++ b/make/cg-common-CustomJavaCode.java
@@ -1,20 +1,5 @@
static {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- try {
- // Workaround so that these don't need to be in the system
- // path but can be referenced from java.library.path
- // (this is intended to help with Webstarted applications)
- System.loadLibrary("cg");
- System.loadLibrary("cgGL");
- } catch (UnsatisfiedLinkError e) {
- // Consider this non-fatal
- }
- // Load the actual Cg binding
- System.loadLibrary("jogl_cg");
- return null;
- }
- });
+ NativeLibLoader.loadCgImpl();
}
/** A convenience method which reads all available data from the InputStream and then calls cgCreateProgram. */
diff --git a/make/cg-common.cfg b/make/cg-common.cfg
index f264fb2bf..6f73e7ed0 100644
--- a/make/cg-common.cfg
+++ b/make/cg-common.cfg
@@ -96,8 +96,8 @@ Ignore cgGetProgramOptions
# Need to import New IO for Buffer classes
#
Import java.nio.*
-# and java.security.* to allow unsigned Cg applications
-Import java.security.*
+# And NativeLibLoader for help loading the native libraries
+Import com.sun.opengl.impl.*
# Raise CgException instead of RuntimeException in glue code
RuntimeExceptionType CgException