From 8a4a0975acb26215cd730d03693f17e15536f9b7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 8 Dec 2001 05:43:32 +0000 Subject: osName to lower case added MacOsX to makeLibName .. --- gl4java/GLContext.java.skel | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'gl4java/GLContext.java.skel') 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"); -- cgit v1.2.3