diff --git a/README.md b/README.md index a898f14eaee6b0bccd05c15b70fb99455cc3eb4c..87a06a670608d72dc71a5683140ad3c5872d9791 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This project simply loads the [Aparapi Native](https://github.com/Syncleus/aparapi-native) library at runtime. This prevents the need for the user to install it manually. -There is usually no need for a user to call this library directly as it is called internally by [Aparapi](https://github.com/Syncleus/aparapi). However it may be useful if creating your own user agent. +There is usually no need for a user to call this library directly as it is called internally by [Aparapi](https://github.com/Syncleus/aparapi). However it may be useful if creating your own custom agent. **Currently packaged native libraries support Mac OSX 64bit, Linux 64bit, and Linux 32bit. Windows support coming in the next few days.** @@ -71,4 +71,4 @@ catch (final IOException e) { + " or possibly failed to locate opencl native library (opencl.dll/opencl.so)." + " Ensure that OpenCL is in your PATH (windows) or in LD_LIBRARY_PATH (linux)."); } -``` \ No newline at end of file +``` diff --git a/src/main/java/com/aparapi/natives/NativeLoader.java b/src/main/java/com/aparapi/natives/NativeLoader.java index 132a9b636ec21b6692f97607cc60b150a20b579f..c47627b5ec4efe811ce755acfd3639389172091a 100644 --- a/src/main/java/com/aparapi/natives/NativeLoader.java +++ b/src/main/java/com/aparapi/natives/NativeLoader.java @@ -42,19 +42,19 @@ public class NativeLoader { } private static boolean isWindows() { - return (OS.indexOf("win") >= 0); + return OS.contains("win"); } private static boolean isMac() { - return (OS.indexOf("mac") >= 0); + return OS.contains("mac"); } private static boolean isUnix() { - return (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 ); + return (OS.contains("nix") || OS.contains("nux") || OS.contains("aix")); } private static boolean isSolaris() { - return (OS.indexOf("sunos") >= 0); + return OS.contains("sunos"); } private static boolean is64Bit() {