瀏覽代碼

* Avoid conflicts when extracting both 64-bit and 32-bit libraries to the same folder .. This is mainly for the bulletjme library which doesn't specify "64" at the end of the filename

shadowislord 11 年之前
父節點
當前提交
36483c4b49
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java
  2. 二進制
      jme3-examples/libbulletjme64.so

+ 6 - 0
jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java

@@ -360,6 +360,12 @@ public final class NativeLibraryLoader {
             String fileNameInJarWithoutExtension 
                     = fileNameInJar.substring(0, fileNameInJar.lastIndexOf("."));
             
+            if (platform.is64Bit() && !fileNameInJarWithoutExtension.endsWith("64")) {
+                // This is to avoid conflicts with 32-bit versions of the 
+                // same library when extracting.
+                fileNameInJarWithoutExtension += "64";
+            }
+            
             String systemJniExtension;
             String dummyLib = System.mapLibraryName("");
             if (dummyLib.contains(".")) {

二進制
jme3-examples/libbulletjme64.so