-
Notifications
You must be signed in to change notification settings - Fork 68
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
Fix SteamLibraryLoaderGdx on macOS #133
Conversation
Behind the scenes, the libgdx loader extracts libsteam_api.dylib and libsteamworks4j.dylib into separate directories based on the CRC checksum of their contents. Unfortunately, libsteam_api.dylib has an install name of @loader_path/libsteam_api.dylib. When loading libsteamworks4j.dylib it expects libsteam_api.dylib to have been in the same directory. This patch hardcodes the result of `crc()` to `00000000`. As a result, both libraries will be extracted inside `<libgdx-path>/00000000/` and libsteamworks4j.dylib loads successfully.
Closing #130 as this solves the problem it tried to workaround. |
Tested on Windows, Intel Mac, and Steam Deck |
@noblemaster Could you try this out for me on an apple silicon mac? I still don't have access to one sadly, but I suspect this will work for you since the previous loader did. |
Yes, it works on M2! Just merge it when you are ready. 😄 |
Awesome! Thanks. |
@code-disaster Any thoughts? |
This seems to be the solution I need. How can I test this as well? |
Behind the scenes, the libgdx loader extracts
libsteam_api.dylib
andlibsteamworks4j.dylib
into separate directories based on the CRC checksum of their contents.Unfortunately,
libsteam_api.dylib
has an install name of@loader_path/libsteam_api.dylib
.When loading
libsteamworks4j.dylib
it expectslibsteam_api.dylib
to be in the same directory.This patch hardcodes the result of
crc()
to00000000
. As a result, both libraries will be extracted inside<libgdx-path>/00000000/
and libsteamworks4j.dylib loads successfully.Fixes #117