Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native bullet library (for JME3.1) is not extracted #22

Open
Entropy4711 opened this issue Jun 10, 2017 · 7 comments
Open

Native bullet library (for JME3.1) is not extracted #22

Entropy4711 opened this issue Jun 10, 2017 · 7 comments
Assignees
Labels
Milestone

Comments

@Entropy4711
Copy link

Hello,

I started using this plugin to create a game using JME 3.1l, which uses some native libraries (like LWJGL, OpenAL, and Bullet Physics). The plugin almost works perfectly - but it isn't able to extract the native libary files from the Bullet jar. I have the impression that it has something to do with the different structure of the bullet jar. The other jars have a flat directory structure, but the bullet jar has many nested directories for each platform and even for 32-bit and 64-bit.
Here is a screenshot of this structure:

bullet_structure

Here a log of ./gradlew clean build includeNatives:

:client:includeNatives worker Thread 16,5,main]) started.
:client:includeNatives
Putting task artifact state for task ':client:includeNatives' into context took 0.0 secs.
Executing task ':client:includeNatives' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
Including native libraries found for configurations (compile, runtime)...
 - jinput-platform-2.0.5-natives-linux.jar:
        [LINUX] libjinput-linux.so --> <mypath>/build/natives
        [LINUX] libjinput-linux64.so --> <mypath>/build/natives
 - jinput-platform-2.0.5-natives-osx.jar:
        [MAC] libjinput-osx.jnilib --> <mypath>/build/natives
 - lwjgl-platform-2.9.3-natives-osx.jar:
        [MAC] liblwjgl.dylib --> <mypath>/build/natives
        [MAC] openal.dylib --> <mypath>/build/natives
 - jinput-platform-2.0.5-natives-windows.jar:
        [WINDOWS] jinput-raw_64.dll --> <mypath>/build/natives
        [WINDOWS] jinput-wintab.dll --> <mypath>/build/natives
        [WINDOWS] jinput-raw.dll --> <mypath>/build/natives
        [WINDOWS] jinput-dx8_64.dll --> <mypath>/build/natives
        [WINDOWS] jinput-dx8.dll --> <mypath>/build/natives
 - lwjgl-platform-2.9.3-natives-linux.jar:
        [LINUX] liblwjgl.so --> <mypath>/build/natives
        [LINUX] libopenal64.so --> <mypath>/build/natives
        [LINUX] libopenal.so --> <mypath>/build/natives
        [LINUX] liblwjgl64.so --> <mypath>/build/natives
 - lwjgl-platform-2.9.3-natives-windows.jar:
        [WINDOWS] lwjgl.dll --> <mypath>/build/natives
        [WINDOWS] lwjgl64.dll --> <mypath>/build/natives
        [WINDOWS] OpenAL64.dll --> <mypath>/build/natives
        [WINDOWS] OpenAL32.dll --> <mypath>/build/natives
 - jme3-bullet-native-3.1.0-stable.jar:
        [WINDOWS] native/windows/x86/bulletjme.dll --> <mypath>/build/natives
:client:includeNatives FAILED
:client:includeNatives (Thread[Daemon worker Thread 16,5,main]) completed. Took 0.146 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':client:includeNatives'.
> java.io.FileNotFoundException: <mypath>/build/natives/native/windows/x86/bulletjme.dll (No such file or directory)

The <mypath> texts were added by me.
Is this an issue with the plugin, or could I somehow configure this?

@cjstehno
Copy link
Owner

The plugin should find all native libs in project dependency jars.

Can you add a link to the bullet project so I can have something to test.

@cjstehno cjstehno self-assigned this Jun 10, 2017
@cjstehno cjstehno added the bug label Jun 10, 2017
@Entropy4711
Copy link
Author

Entropy4711 commented Jun 11, 2017

Thanks for your response!
I can give you the gradle/maven dependency:

compile 'org.jmonkeyengine:jme3-bullet-native:3.1.0-stable'

EDIT: You'll need this repository url to be able to fetch it:

maven {
   url 'http://updates.jmonkeyengine.org/maven'
}

The jar that you get from that contains the structure from the screenshot.
If you need anything else just let me know.

@cjstehno
Copy link
Owner

Thanks. I will try to take a look at it this week.

@cjstehno cjstehno modified the milestone: v0.3.2 Jun 12, 2017
@Entropy4711
Copy link
Author

Were you able to find anything? Or could I somehow configure the plugin differently?

@cjstehno
Copy link
Owner

cjstehno commented Jul 3, 2017

That repo location returns a 404 - according to the JME3 docs, their artifacts are in JCenter. Using the jcenter() repo, the listNatives task returns:

:listNatives
Native libraries found for configurations (compile, runtime)...
 - jme3-bullet-native-3.1.0-stable.jar:
	[WINDOWS] native/windows/x86/bulletjme.dll
	[WINDOWS] native/windows/x86_64/bulletjme.dll
	[LINUX] native/linux/x86/libbulletjme.so
	[LINUX] native/linux/x86_64/libbulletjme.so
	[MAC] native/osx/x86_64/libbulletjme.dylib
	[MAC] native/osx/x86/libbulletjme.dylib

So it appears to be finding them all. If you are still having issues I would need a standalone example or a failing test to look at.

cjstehno added a commit that referenced this issue Jul 3, 2017
cjstehno added a commit that referenced this issue Jul 3, 2017
@Entropy4711
Copy link
Author

You can test it with my project here on github: https://github.com/Entropy4711/infinite-wars
Just clone it and run ./gradlew client:includeNatives
The file client/build.gradle has the plugin configured. You'll find all dependencies on the file dependencies.gradle
Feel free to ask me anything :)

@cjstehno
Copy link
Owner

cjstehno commented Jul 7, 2017

I have a lot going on right now, so I am not sure when I will get back to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants