code-disaster / steamworks4j

A thin Java wrapper to access the Steamworks API
https://code-disaster.github.io/steamworks4j/
MIT License
468 stars 64 forks source link

Add 1.9.0 SteamSharedLibraryLoader as SteamLibraryLoaderLegacy #130

Closed Rizato closed 11 months ago

Rizato commented 1 year ago

Adds the original loader as a legacy loader module.

The old loader works with mac with gradle where gdx, and lwjgl3 currently do not.

The changes to the old loader are minimal, just enough to implement the SteamLibraryLoader interface.

Tested on Windows, Intel Mac, and Linux.

Rizato commented 1 year ago

See #117 #127 #129

WinterAlexander commented 1 year ago

Very useful, thank you.

A bit pedantic but I would call it the "LegacyLoader" and not the "LoaderLegacy" since Loader is the noun and Legacy is the adjective, but that's just me.

Also it would be great if the "new way of doing things" was documented or explained somewhere. I'm not keen on writing my own loader just to boost to version 1.10 and this LegacyLoader is most convenient to me at the moment. I do not use LWJGL3

Rizato commented 1 year ago

A bit pedantic but I would call it the "LegacyLoader" and not the "LoaderLegacy" since Loader is the noun and Legacy is the adjective, but that's just me.

It matches the existing naming pattern set by SteamLibraryLoaderGdx, and SteamLibraryLoaderLwjgl. I don’t know the original reason, but I would guess it’s so IDE autocomplete shows all the options.

Also it would be great if the "new way of doing things" was documented or explained somewhere. I'm not keen on writing my own loader just to boost to version 1.10 and this LegacyLoader is most convenient to me at the moment. I do not use LWJGL3

Yea, writing a loader feels out of scope for projects using steamworks4j. It’s not like writing a callback to use the library, it’s writing an essential piece of the library itself. I do appreciate the new loader interface, and think it's great that loading can be customized to match the frameworks people are using. However, I think the library should still have a default loader.

I’m assuming updated docs will come with the official 1.10.0 release.

noblemaster commented 1 year ago

I tried and this legacy loader is the only one that works on Mac OS with M1/M2 CPU! I also propose +1 to have this added back. Given, this is old, maybe we can add a @Deprecated annotation to the class?

Rizato commented 1 year ago

I tried and this legacy loader is the only one that works on Mac OS with M1/M2 CPU! I also propose +1 to have this added back. Given, this is old, maybe we can add a @Deprecated annotation to the class?

Thanks for trying it out. Stoked to see it works on new Macs as well.

Agree on @Deprecated, will add.

Rizato commented 11 months ago

Found a better solution for loading the libraries on macOS. Closing this.