• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


Commit MetaInfo

修訂23b3ed60983cfbc0615a07ced8981f858f08d4c4 (tree)
時間2013-09-03 23:48:03
作者kobayasi <kobayasi@pscn...>
Commiterkobayasi

Log Message

Fix jnilib loading problem.

Change Summary

差異

--- a/engine/src/desktop/com/jme3/system/Natives.java
+++ b/engine/src/desktop/com/jme3/system/Natives.java
@@ -72,16 +72,31 @@ public class Natives {
7272 URL url = Thread.currentThread().getContextClassLoader().getResource(path);
7373
7474 if (url == null) {
75- if (!warning) {
76- logger.log(Level.WARNING, "Cannot locate native library: {0}/{1}",
77- new String[]{sysName, fullname});
75+ if (sysName.equals("macosx")) {
76+ fullname = fullname.replace(".dylib", ".jnilib");
77+ String path2 = "native/" + sysName + "/" + fullname;
78+ // logger.warning("retry "+path2);
79+ url = Thread.currentThread().getContextClassLoader().getResource(path2);
80+ if (url == null) {
81+ if (!warning) {
82+ logger.log(Level.WARNING, "Cannot locate native library: {0}/{1}",
83+ new String[]{sysName, fullname});
84+ }
85+ return;
86+ }
87+ } else {
88+ if (!warning) {
89+ logger.log(Level.WARNING, "Cannot locate native library: {0}/{1}",
90+ new String[]{sysName, fullname});
91+ }
92+ return;
7893 }
79- return;
8094 }
8195
8296 URLConnection conn = url.openConnection();
8397 InputStream in = conn.getInputStream();
8498 File targetFile = new File(workingDir, fullname);
99+ // logger.info("targetFile = "+targetFile.getPath());
85100 if (targetFile.exists()){
86101 // OK, compare last modified date of this file to
87102 // file in jar
@@ -274,8 +289,8 @@ public class Natives {
274289 if (needLWJGL) {
275290 extractNativeLib("macosx", "lwjgl");
276291 }
277-// if (needOAL)
278-// extractNativeLib("macosx", "openal");
292+ if (needOAL)
293+ extractNativeLib("macosx", "openal");
279294 if (needJInput) {
280295 extractNativeLib("macosx", "jinput-osx");
281296 }