jMonkeyEngine / jmonkeyengine

A complete 3-D game development suite written in Java.
http://jmonkeyengine.org
BSD 3-Clause "New" or "Revised" License
3.81k stars 1.12k forks source link

bulletjme: Add Bitness/Architecture Suffix #1422

Closed MeFisto94 closed 1 year ago

MeFisto94 commented 3 years ago

For all other native libs we have like OpenAL64.dll and lwjgl32.dll, not so for bulletjme. When switching jvms between 32bit and 64bit, you get an UnsatisfiedLinkError due to the DLL requiring a manual deletion.

stephengold commented 3 years ago
  1. Changing the filenames of Bullet native libraries will break Minie, which relies on the current naming scheme

  2. Even with this change, file deletion will still be required when switching between different versions of jme3-bullet-native, or when switching between jme3-bullet-native and Minie

Ali-RS commented 1 year ago

I am closing this because Bullet native has moved out from the main JME repo and is not maintained anymore but this might be still something to consider for the Minie project.

Ali-RS commented 1 year ago

Apparently, Minie depends on bulletjme natives that are loaded via NativeLibraryLoader on JME side.

https://github.com/jMonkeyEngine/jmonkeyengine/blob/5e859d59a3193608aa2f55e582515cd3ae8192b7/jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java#L143-L153

There was some discussion going on https://github.com/jMonkeyEngine/jmonkeyengine/issues/1965#issuecomment-1444140527

Ali-RS commented 1 year ago

Fixed in #1973

Added Architecture Suffix to all bulletjme natives when extracting. Note: This is not a breaking change, no changes are required on the Minie project.

https://github.com/jMonkeyEngine/jmonkeyengine/blob/308cdf12fb1042d07866ab726b4835c492bd8d59/jme3-desktop/src/main/java/com/jme3/system/NativeLibraries.java#L74-L86