-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
[API] Fix native loading by stopping creating tmpDir every time #197
Conversation
Oh I found this works in example code, but do not works in external project. I'll fix this so please wait. |
I fixed it. |
This one is really good! Yet I think we can do it a little bit easier. With all |
I think we should not use MANIFEST.MF file. If you make a fat jar, the MANIFEST.MF would not be included. |
Good call. Yeah, in that case let's keep it in generated properties. |
Thank you for your nice advice! |
I think imgui-java should load the native library in this order, how about you?
|
Sounds reasonable 👍 |
And I think it should be added checking hash of native library. If user set |
1.imgui.library.path 2.java.library.path 3.extract from resources
I'll do merge on the next week. With it I plan to make a release, so if you are willing to do any other changes to the library - I'll glad to review them. 👍 |
Description
imgui-java tries delete the native library when JVM shutdowns, but JVM locks the native library until JVM shutdowns, so deleteOnExit() will fail.
Instead of creating a temporary directory, imgui-java creates a directory that depends on its version on tmp dir of OS. This enables us to launch different versions of imgui-java at the same time.
This way is used by LWJGL.
Fixes #182
Type of change