[gdx-lwjgl3-angle] Library extraction not compatible with osx packaging
Issue details
The angle libraries are extracted in the current directory of the app, see source code
This causes issues with various package formats since it changes the overall package signature.
On OSX for example, the *.app package won't run anymore because of that.
There is no issue when running the plain jar file, but as soon as you're running from a package application everything breaks.
On a more general note it looks like a lot of the native library load code is duplicated from gdx-jnigen.
Wouldn't it be possible to simply reuse it instead of re-inventing the wheel?
I noticed the same issue duplicate code issue in the GlfwAWTLoader.
Merging the load code would also make sure that the folder/file structure for the native libraries is the same. Currently it's a big mix of everything: Subfolders per os/arch, files per os/arch.
If it's really required to have the libraries in a path accessible by dlopen, would it be possible to specify a custom directory which should be used for extraction and then provide DYLD_LIBRARY_PATH as startup environment? (not sure if that works, might need to do some testing)
Reproduction steps/code
- Use the angle extension
- Package the libgdx app into an
*.appbundle - Sign all files
- Notarize and stamp the bundle
- Try to start the app
Version of libGDX and/or relevant dependencies
1.11.0
Stacktrace
When manually running the jar in the app bundle:
EGL: Library not foundWhen running the app bundle (as an end-user would): Nothing, app doesn't start
Please select the affected platforms
- macOS
Source: libgdx/libgdx