我正在尝试在Mac OS下运行Lionheart Remake,但是文件丢失并且它不想启动。我完成了Maven的构建,并生成了游戏的JAR文件。

您能告诉我如何获取libsc68.dylib文件吗?

这是我运行JAR时遇到的错误:

java -jar lionheart-pc-0.0.17.jar

12/30/19 5:50 PM    INFO: Class resources = com.b3dgs.lionheart.AppLionheartPc
12/30/19 5:50 PM    INFO: Load library: sc68
Exception in thread "main" com.b3dgs.lionengine.LionEngineException: Error on loading SC68 Library: sc68
    at com.b3dgs.lionengine.audio.sc68.Sc68Format.loadLibrary(Sc68Format.java:87)
    at com.b3dgs.lionengine.audio.sc68.Sc68Format.<init>(Sc68Format.java:103)
    at com.b3dgs.lionheart.AppLionheartPc.main(AppLionheartPc.java:42)
Caused by: java.lang.UnsatisfiedLinkError: Unable to load library 'sc68': Native library (darwin/libsc68.dylib) not found in resource path ([file:/Users/todorbalabanov/Desktop/lionheart-remake-master/lionheart-pc/target/lionheart-pc-0.0.17.jar])
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:303)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:427)
    at com.sun.jna.Library$Handler.<init>(Library.java:179)
    at com.sun.jna.Native.loadLibrary(Native.java:569)
    at com.sun.jna.Native.loadLibrary(Native.java:544)
    at com.b3dgs.lionengine.audio.sc68.Sc68Format.loadLibrary(Sc68Format.java:81)
    ... 2 more
12/30/19 5:50 PM    INFO: Starting sequence: com.b3dgs.lionheart.Loading
12/30/19 5:50 PM    INFO: Ending sequence: com.b3dgs.lionheart.Loading
12/30/19 5:50 PM    INFO: Starting sequence: com.b3dgs.lionheart.Scene
12/30/19 5:50 PM    INFO: Loading collision formulas from: file:/Users/todorbalabanov/Desktop/lionheart-remake-master/lionheart-pc/target/lionheart-pc-0.0.17.jar!/com/b3dgs/lionheart/levels/swamp/formulas.xml
12/30/19 5:50 PM    INFO: Loading collision groups from: file:/Users/todorbalabanov/Desktop/lionheart-remake-master/lionheart-pc/target/lionheart-pc-0.0.17.jar!/com/b3dgs/lionheart/levels/swamp/collisions.xml
12/30/19 5:50 PM  SEVERE:
com.b3dgs.lionengine.LionEngineException: [effect] Invalid directory:
    at com.b3dgs.lionengine.MediaDefault.getMedias(MediaDefault.java:284)
    at com.b3dgs.lionengine.game.feature.Factory.createCache(Factory.java:172)
    at com.b3dgs.lionheart.World.prepareCache(World.java:192)
    at com.b3dgs.lionheart.World.loading(World.java:210)
    at com.b3dgs.lionengine.game.feature.WorldGame.loadFromFile(WorldGame.java:163)
    at com.b3dgs.lionheart.Scene.load(Scene.java:118)
    at com.b3dgs.lionengine.graphic.engine.Sequence.start(Sequence.java:215)
    at com.b3dgs.lionengine.graphic.engine.Loader.handle(Loader.java:100)
    at com.b3dgs.lionengine.graphic.engine.Loader.lambda$start$0(Loader.java:62)
    at java.lang.Thread.run(Thread.java:745)
12/30/19 5:50 PM    INFO: LionEngine terminated

最佳答案

您看到的错误描述了一个不完整的软件。 Searching around,看起来sc68是指音乐播放器或音频库。

这是根本问题:

Caused by: java.lang.UnsatisfiedLinkError: Unable to load library 'sc68': Native library (darwin/libsc68.dylib) not found in resource path ([file:/Users/todorbalabanov/Desktop/lionheart-remake-master/lionheart-pc/target/lionheart-pc-0.0.17.jar])

这表示未找到darwin/libsc68.dylib。它在路径/Users/todorbalabanov/Desktop/lionheart-remake-master/lionheart-pc/target/lionheart-pc-0.0.17.jar中查找,该路径是您正在运行的jar本身。

lionheart-remake-master目录中可能还有其他文件,而其中的一个可能是sc68库。您可以尝试这样做,也许它将找到一个匹配项:

find /Users/todorbalabanov/Desktop/lionheart-remake-master -name 'libsc68.dylib'


如果找到匹配项,则可以通过更改程序的运行方式使事情正常。如果没有,请与发行该游戏的人联系,或者寻找较新的版本。

10-07 22:20