SteamworksPy
SteamworksPy copied to clipboard
Compiling SteamworksPy from Steamworks SDK 1.55 to 1.61
Hey, completely new to contributing, plus I'm not sure if this is the correct way to handle it.
The current release build of SteamworksPy works with Steam SDK 1.55. I've done the following to get it working with the as-of-this-time current SDK 1.61
Code in C++: SteamworksPy.cpp v.1.56) "GetAuthSessionTicket API includes SteamNetworkingIdentity as input" SteamworksPy.cpp::~995
// Returns the info needed to obtain a Session Ticket.
SW_PY int GetAuthSessionTicket(char* buffer) {
if (SteamUser() == NULL) {
return 0;
}
uint32 size{};
SteamNetworkingIdentity pSteamNetworkingIdentity = SteamNetworkingIdentity();
SteamUser()->GetAuthSessionTicket(buffer, 1024, &size, &pSteamNetworkingIdentity);
return size;
}
v1.59) RequestCurrentStats() is now asynchronous through the Steam Client and doesn't need to be called. Comment out: SteamworksPy.cpp::~290
// DEPRECATED: This is no longer required as it is managed by the Steam Client
// Steam is connected and active, so load the stats and achievements
//if (status == OK && SteamUserStats() != NULL) {
// SteamUserStats()->RequestCurrentStats();
//}
SteamworksPy.cpp::~1066
// DEPRECATED: This is automatically handled in the Steam Client asynchronously
//SW_PY bool RequestCurrentStats() {
// if (SteamUser() == NULL) {
// return false;
// }
// return SteamUserStats()->RequestCurrentStats();
//}
Code in Python Steamworks steamworks/methods.py::~287: (just comment it out)
#'RequestCurrentStats': { # Deprecated: This is automatically handled in Steam Client asynchronously
# 'restype': bool
#},
Compile Steamworks DLL file using Visual Studio After these steps, compiling using the following steps has it work with SDK 1.61: (Based off this amazing video, but needs updating as well: https://www.youtube.com/watch?v=Ka9LIGYm_b0 )
-
Copy: steamworks/sdk/public/steam -> SteamworksPy-master/library/sdk/steam
-
Copy: steamworks/sdk/redistributable_bin/win64 -> library/sdk/redist/*
- steam_api64.dll
- steam_api64.lib
- start-> run-> x64 Native Tools Command Prompt for VS.2022 a) cd SteamworksPy-master\SteamworksPy-master b) build_win_64.bat 2022 success> 1 file moved c) File is in redist/windows/SteamworksPy64.dll
- Copy to steam game: redist/windows/SteamworksPy64.dll steamworks\sdk\redistributable_bin\win64*
- Copy entire SteamworksPy-master\steamworks folder to game
- Use pygame.display.set_mode() OPENGL with DOUBLEBUF instead of SCALED; Steamworks SDK is for OpenGL, figured this would be appropriate for best practices.