Skip to content
Snippets Groups Projects
Commit 5c179a8f authored by Jeff Wallace's avatar Jeff Wallace
Browse files

Added file that should have been included in last commit

parent 19cef102
No related branches found
No related tags found
No related merge requests found
...@@ -64,12 +64,10 @@ public String getLibName() { ...@@ -64,12 +64,10 @@ public String getLibName() {
*/ */
public static String getPlatform() { public static String getPlatform() {
String os = System.getProperty("os.name").toLowerCase(); String os = System.getProperty("os.name").toLowerCase();
if(os.contains("win")) { if(LibraryUtils.isWindows()) {
os = "win"; os = "win";
} else if(os.contains("mac")) { } else if(LibraryUtils.isMac()) {
os = "mac"; os = "mac";
} else {
os = "unix";
} }
// os.arch represents the architecture of the JVM, not the os // os.arch represents the architecture of the JVM, not the os
String arch = System.getProperty("os.arch"); String arch = System.getProperty("os.arch");
...@@ -94,6 +92,15 @@ private static boolean isMac() { ...@@ -94,6 +92,15 @@ private static boolean isMac() {
return System.getProperty("os.name").toLowerCase().contains("mac"); return System.getProperty("os.name").toLowerCase().contains("mac");
} }
/**
* Is the platform Linux?
*
* @return
*/
public static boolean isLinux() {
return System.getProperty("os.name").equals("Linux");
}
/** /**
* Attempt to extract and load the specified library. * Attempt to extract and load the specified library.
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment