Closed code-disaster closed 1 year ago
You might be interested in https://github.com/libgdx/gdx-jnigen , which is what libGDX uses for shared library loading now (they moved SharedLibraryLoader.java out of libGDX proper and into this library), and is much more lightweight than including all of libgdx as a dependency.
Oh, good point. I didn't even notice in my test that gdx pulls in gdx-jnigen-loader as a dependency.
Ok, it's gone. There's now a SteamLibraryLoader
interface, and two new modules, steamworks4j-gdx
and steamworks4j-lwjgl3
. Both implement this interface using their respective backend.
SteamAPI.loadLibraries()
takes an instance of this interface. Applications simply need to choose one of the two above, or implement their own.
Also uploaded a SNAPSHOT version to https://oss.sonatype.org/content/repositories/snapshots/com/code-disaster/steamworks4j/. In case someone wants to try it.
I only use LWJGL, so the LWJGL loader is fine for me.
When can we find these changes in the maven repo?
Available via 1.10.0-SNAPSHOT (until I manage to deploy 1.10.0)
I'm thinking about nuking
SteamSharedLibraryLoader
from orbit. I want to ask your opinion about that.I believe it has been a mistake to introduce the loader in the first place. The intention was to keep the library free of dependencies as much as possible, so I went and shamelessly copied&modified the libGDX loader. I've updated it a couple of times since then, but frankly it's a nightmare to work on, is not on par with its libGDX sibling, and miles behind what the LWJGL3 library loader can do.
In fact, some changes to
steamworks4j
have been done only to allow bypassing the shared library loader. Our own game, Pathway, even jumps some extra hoops to sneak past the libGDX loader, and uses the one of LWJGL3, esp on Windows, for compatibility reasons.The current idea would be to introduce one or two additional packages. Let's call them
steamworks4j-gdx
andsteamworks4j-lwjgl3
. Their sole purpose would be to demonstrate how to load the native libraries within those frameworks. People could use them as-is, or just have a look and do their own version.Question is: does anyone of you out there use anything but libGDX or LWJGL3, and if yes, does it have its own means of loading shared libraries?