|
@@ -58,17 +58,21 @@ public class Natives {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
protected static void extractNativeLib(String sysName, String name) throws IOException {
|
|
protected static void extractNativeLib(String sysName, String name) throws IOException {
|
|
|
- extractNativeLib(sysName, name, false);
|
|
|
|
|
|
|
+ extractNativeLib(sysName, name, false, true);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
protected static void extractNativeLib(String sysName, String name, boolean load) throws IOException {
|
|
protected static void extractNativeLib(String sysName, String name, boolean load) throws IOException {
|
|
|
|
|
+ extractNativeLib(sysName, name, load, true);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ protected static void extractNativeLib(String sysName, String name, boolean load, boolean warning) throws IOException {
|
|
|
String fullname = System.mapLibraryName(name);
|
|
String fullname = System.mapLibraryName(name);
|
|
|
|
|
|
|
|
String path = "native/" + sysName + "/" + fullname;
|
|
String path = "native/" + sysName + "/" + fullname;
|
|
|
InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
|
|
InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
|
|
|
//InputStream in = Natives.class.getResourceAsStream();
|
|
//InputStream in = Natives.class.getResourceAsStream();
|
|
|
if (in == null) {
|
|
if (in == null) {
|
|
|
- if (name != "bulletjme") {
|
|
|
|
|
|
|
+ if (!warning) {
|
|
|
logger.log(Level.WARNING, "Cannot locate native library: {0}/{1}",
|
|
logger.log(Level.WARNING, "Cannot locate native library: {0}/{1}",
|
|
|
new String[]{sysName, fullname});
|
|
new String[]{sysName, fullname});
|
|
|
}
|
|
}
|
|
@@ -159,7 +163,7 @@ public class Natives {
|
|
|
extractNativeLib("windows", "jinput-raw_64");
|
|
extractNativeLib("windows", "jinput-raw_64");
|
|
|
}
|
|
}
|
|
|
if (needNativeBullet) {
|
|
if (needNativeBullet) {
|
|
|
- extractNativeLib("windows", "bulletjme", true);
|
|
|
|
|
|
|
+ extractNativeLib("windows", "bulletjme", true, false);
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case Windows32:
|
|
case Windows32:
|
|
@@ -174,7 +178,7 @@ public class Natives {
|
|
|
extractNativeLib("windows", "jinput-raw");
|
|
extractNativeLib("windows", "jinput-raw");
|
|
|
}
|
|
}
|
|
|
if (needNativeBullet) {
|
|
if (needNativeBullet) {
|
|
|
- extractNativeLib("windows", "bulletjme", true);
|
|
|
|
|
|
|
+ extractNativeLib("windows", "bulletjme", true, false);
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case Linux64:
|
|
case Linux64:
|
|
@@ -188,7 +192,7 @@ public class Natives {
|
|
|
extractNativeLib("linux", "openal64");
|
|
extractNativeLib("linux", "openal64");
|
|
|
}
|
|
}
|
|
|
if (needNativeBullet) {
|
|
if (needNativeBullet) {
|
|
|
- extractNativeLib("linux", "bulletjme", true);
|
|
|
|
|
|
|
+ extractNativeLib("linux", "bulletjme", true, false);
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case Linux32:
|
|
case Linux32:
|
|
@@ -202,7 +206,7 @@ public class Natives {
|
|
|
extractNativeLib("linux", "openal");
|
|
extractNativeLib("linux", "openal");
|
|
|
}
|
|
}
|
|
|
if (needNativeBullet) {
|
|
if (needNativeBullet) {
|
|
|
- extractNativeLib("linux", "bulletjme", true);
|
|
|
|
|
|
|
+ extractNativeLib("linux", "bulletjme", true, false);
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case MacOSX_PPC32:
|
|
case MacOSX_PPC32:
|
|
@@ -218,7 +222,7 @@ public class Natives {
|
|
|
extractNativeLib("macosx", "jinput-osx");
|
|
extractNativeLib("macosx", "jinput-osx");
|
|
|
}
|
|
}
|
|
|
if (needNativeBullet) {
|
|
if (needNativeBullet) {
|
|
|
- extractNativeLib("macosx", "bulletjme", true);
|
|
|
|
|
|
|
+ extractNativeLib("macosx", "bulletjme", true, false);
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|