forked from I2P_Developers/i2p.i2p
Preliminary jbigi support for osx. jcpuid will be coming later.
This commit is contained in:
@ -55,6 +55,7 @@ public class CPUID {
|
|||||||
private static final boolean isLinux = System.getProperty("os.name").toLowerCase().contains("linux");
|
private static final boolean isLinux = System.getProperty("os.name").toLowerCase().contains("linux");
|
||||||
private static final boolean isFreebsd = System.getProperty("os.name").toLowerCase().contains("freebsd");
|
private static final boolean isFreebsd = System.getProperty("os.name").toLowerCase().contains("freebsd");
|
||||||
private static final boolean isSunos = System.getProperty("os.name").toLowerCase().contains("sunos");
|
private static final boolean isSunos = System.getProperty("os.name").toLowerCase().contains("sunos");
|
||||||
|
private static final boolean isMac = System.getProperty("os.name").startsWith("Mac");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -428,6 +429,11 @@ public class CPUID {
|
|||||||
private static final String getLibraryMiddlePart(){
|
private static final String getLibraryMiddlePart(){
|
||||||
if(isWindows)
|
if(isWindows)
|
||||||
return "jcpuid-x86-windows"; // The convention on Windows
|
return "jcpuid-x86-windows"; // The convention on Windows
|
||||||
|
if(isMac) {
|
||||||
|
if(isX86) {
|
||||||
|
return "jcpuid-x86-osx"; // The convention on Intel Macs
|
||||||
|
}
|
||||||
|
}
|
||||||
if(isFreebsd)
|
if(isFreebsd)
|
||||||
return "jcpuid-x86-freebsd"; // The convention on freebsd...
|
return "jcpuid-x86-freebsd"; // The convention on freebsd...
|
||||||
if(isSunos)
|
if(isSunos)
|
||||||
@ -443,6 +449,8 @@ public class CPUID {
|
|||||||
return "jcpuid-x86_64-windows";
|
return "jcpuid-x86_64-windows";
|
||||||
if(isFreebsd)
|
if(isFreebsd)
|
||||||
return "jcpuid-x86_64-freebsd";
|
return "jcpuid-x86_64-freebsd";
|
||||||
|
if(isMac)
|
||||||
|
return "jcpuid-x86_64-osx";
|
||||||
if(isSunos)
|
if(isSunos)
|
||||||
return "jcpuid-x86_64-solaris";
|
return "jcpuid-x86_64-solaris";
|
||||||
// use linux as the default, don't throw exception
|
// use linux as the default, don't throw exception
|
||||||
@ -453,6 +461,8 @@ public class CPUID {
|
|||||||
{
|
{
|
||||||
if(isWindows)
|
if(isWindows)
|
||||||
return "dll";
|
return "dll";
|
||||||
|
if(isMac)
|
||||||
|
return "jnilib";
|
||||||
else
|
else
|
||||||
return "so";
|
return "so";
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Reference in New Issue
Block a user