mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-17 17:27:19 +02:00
Linux: sockets v013/v012 fallback + Steam lib docs
- SDK 1.65 provides GameServerNetworkingSockets v013, Skate DLL v012; try v013 then v012 (superset, same methods used) - verified live: sign-in, Steam ID, join code, clean shutdown - README: steamclient sdk64 symlink, version fallback note
This commit is contained in:
1 parent
a5f6176144
commit
ef294c05d8
2 files changed
+29
-6
No files matched your search
@@ -343,7 +343,17 @@ bool SteamTransport::open() {
|
||||
} catch (...) {
|
||||
p.friends = nullptr;
|
||||
}
|
||||
return bind(module, symbol<void *(*)()>(module, "SteamAPI_SteamNetworkingSockets_SteamAPI_v012")(),
|
||||
void *sockets = nullptr;
|
||||
for (const char *name : {"SteamAPI_SteamNetworkingSockets_SteamAPI_v013",
|
||||
"SteamAPI_SteamNetworkingSockets_SteamAPI_v012"}) {
|
||||
try {
|
||||
sockets = symbol<void *(*)()>(module, name)();
|
||||
break;
|
||||
} catch (...) {
|
||||
}
|
||||
}
|
||||
if (!sockets) throw std::runtime_error("Missing Steam export: SteamAPI_SteamNetworkingSockets_SteamAPI");
|
||||
return bind(module, sockets,
|
||||
symbol<void *(*)()>(module, "SteamAPI_SteamNetworkingUtils_SteamAPI_v004")());
|
||||
} catch (const std::exception &e) {
|
||||
p.state.detail = e.what();
|
||||
@@ -367,8 +377,19 @@ bool SteamTransport::open_game_server(void *library) {
|
||||
const auto find = symbol<void *(*)(int, const char *)>(module, "SteamInternal_FindOrCreateGameServerInterface");
|
||||
// Game servers have no friends list; names come from each player's hello.
|
||||
p.friends = nullptr;
|
||||
return bind(module, symbol<void *(*)()>(module, "SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v012")(),
|
||||
find(user, "SteamNetworkingUtils004"));
|
||||
// Sockets v012 (Skate's Windows DLL) vs v013 (current SDK): same methods
|
||||
// used here, v013 is a superset. Try new first, fall back to old.
|
||||
void *sockets = nullptr;
|
||||
for (const char *name : {"SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v013",
|
||||
"SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v012"}) {
|
||||
try {
|
||||
sockets = symbol<void *(*)()>(module, name)();
|
||||
break;
|
||||
} catch (...) {
|
||||
}
|
||||
}
|
||||
if (!sockets) throw std::runtime_error("Missing Steam export: SteamAPI_SteamGameServerNetworkingSockets_SteamAPI");
|
||||
return bind(module, sockets, find(user, "SteamNetworkingUtils004"));
|
||||
} catch (const std::exception &e) {
|
||||
p.state.detail = e.what();
|
||||
return false;
|
||||
|
||||
@@ -18,7 +18,8 @@ the release ZIP is expected to ship them; this repo never vendors Valve binaries
|
||||
|
||||
- `libsteam_api.so`: from the Steamworks SDK `redistributable_bin/linux64/`
|
||||
(official download via `partner.steamgames.com`; any recent 1.x works — the server
|
||||
uses stable flat exports `SteamGameServer015`/`SteamNetworkingSockets012`).
|
||||
tries `SteamGameServerNetworkingSockets_SteamAPI_v013` then `v012`, and uses
|
||||
stable flat exports `SteamGameServer015`/`SteamNetworkingUtils004`).
|
||||
It is generic; the app is selected at runtime via `SteamAppId=3354750`.
|
||||
- `steamclient.so` (+ `tier0`/`vstdlib` if present): **not** in the SDK.
|
||||
Get it from SteamCMD or a Steam client install, e.g.:
|
||||
@@ -28,8 +29,9 @@ the release ZIP is expected to ship them; this repo never vendors Valve binaries
|
||||
# next to ReSkateServer (same folder as libsteam_api.so)
|
||||
```
|
||||
or copy/symlink an existing client copy (`~/.steam/steam/linux64/steamclient.so`,
|
||||
Valve also documents `~/.steam/sdk64/steamclient.so`). The server `dlopen`s
|
||||
`libsteam_api.so`, which in turn loads `steamclient.so`; either adjacent or
|
||||
Valve also documents `~/.steam/sdk64/steamclient.so` — the server looks there,
|
||||
so `ln -s <folder>/steamclient.so ~/.steam/sdk64/steamclient.so` works).
|
||||
The server `dlopen`s `libsteam_api.so`, which in turn loads `steamclient.so`; either adjacent or
|
||||
`LD_LIBRARY_PATH` works.
|
||||
|
||||
Arch/CachyOS:
|
||||
|
||||
Reference in new issue
Block a user