diff options
author | Sven Gothel <[email protected]> | 2001-12-08 05:43:32 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2001-12-08 05:43:32 +0000 |
commit | 8a4a0975acb26215cd730d03693f17e15536f9b7 (patch) | |
tree | 2e8b474a05f0c006cb3bf2d2c8c1cb56ee1be76b | |
parent | e2e8e5258f79a25fdc6dad9392e290a843fe3627 (diff) |
osName to lower case
added MacOsX to makeLibName ..
-rw-r--r-- | gl4java/GLContext.java.skel | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gl4java/GLContext.java.skel b/gl4java/GLContext.java.skel index bec29b4..e825218 100644 --- a/gl4java/GLContext.java.skel +++ b/gl4java/GLContext.java.skel @@ -694,12 +694,12 @@ public class GLContext extends Object isIBMJvm = jvmVendor!=null && jvmVendor.indexOf("IBM")>=0 ; // Determine the OS - osName = System.getProperty( "os.name" ); - if( osName.startsWith( "Wind" ) ) + osName = System.getProperty( "os.name" ).toLowerCase(); + if( osName.startsWith( "wind" ) ) osType = OsWindoof; - else if( osName.startsWith( "Mac OS X" ) ) + else if( osName.startsWith( "darwin" ) ) osType = OsMacX; - else if( osName.startsWith( "Mac OS" ) ) + else if( osName.startsWith( "mac os" ) ) osType = OsMac9; else /* oops - lets guess unix/x11 :-) */ osType = OsX11; @@ -2150,11 +2150,12 @@ public class GLContext extends Object */ protected static final native boolean useJAWT(); - private static String makeLibName(String name) { + private static String makeLibName(String name) + { int type = getNativeOSType(); if (type == OsWindoof) { return name + ".dll"; - } else if (type == OsX11) { + } else if ( type == OsX11 || type == OsMacX ) { return "lib" + name + ".so"; } else { throw new RuntimeException("Please port makeLibName to your platform"); |