Skip to content
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

Update to newest version #4

Open
wants to merge 81 commits into
base: feature/update_20.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
5375850
Don't copy Steamworks.NET.txt on OSX - Fixes #397
rlabrecque May 29, 2021
9416761
Run dos2unix on CodeGen/steam for consistency
rlabrecque May 30, 2021
1f60545
SteamNetworkingMessage_t: Implement a Release function which takes an…
rlabrecque Jun 5, 2021
353de9d
SteamNetworkingMessage_t: Convert p_pfnFreeData from internal to public
rlabrecque Jun 5, 2021
42aebda
Merge pull request #425 from rlabrecque/steamnetworkingmessage-release
rlabrecque Jun 6, 2021
b4dbd7f
Update .gitignore
rlabrecque May 30, 2021
956d303
Fixup entrypoints for some SteamNetworkingSockets functions (Fixes #430)
rlabrecque Jul 12, 2021
8446a22
Add if statement to SteamParamStringArray deconstructor
theace0296 Aug 18, 2021
248c663
Merge pull request #440 from theace0296/TheAce0296/SteamParamStringAr…
rlabrecque Aug 19, 2021
9ab9230
Fix ISteamNetworkingUtils_GetConfigValue parameter from out -> ref (#…
rlabrecque Aug 31, 2021
e8db6e2
Merge pull request #443 from rlabrecque/fix-get-config-value
rlabrecque Sep 12, 2021
83b0d36
Update to Steamworks SDK 1.52
rlabrecque Oct 8, 2021
f5c8f33
Merge pull request #452 from rlabrecque/v1.52
rlabrecque Oct 10, 2021
ff36f26
Cleaned metadata
JamesMcGhee Oct 10, 2021
ea7d0bb
Merge pull request #455 from JamesMcGhee/Heathen-Steamworks.NET
rlabrecque Oct 10, 2021
ec8e556
Update Copyright
rlabrecque Nov 7, 2021
96da919
CodeGen: Generate directly into com.rlabrecque.steamworks.net/Runtime
rlabrecque Nov 7, 2021
fec45d6
CodeGen: Remove output_dummy_files.py
rlabrecque Nov 7, 2021
ef90d16
CodeGen: Clean up the directory and README a bit
rlabrecque Nov 7, 2021
8dc3a97
CodeGen: Move CustomTypes to templates/custom_types
rlabrecque Nov 7, 2021
4dafa26
Bump version to 20.0.0
rlabrecque Nov 8, 2021
deb9eb3
Remove unused SteamUnifiedMessages.meta (Fixes #464)
rlabrecque Dec 12, 2021
0461aa7
CodeGen: Remove extra "import sys"
rlabrecque Dec 12, 2021
27b1a15
Update to Steamworks SDK 1.53
rlabrecque Dec 23, 2021
6cbf1c2
Remove old Steam dlls in the root of the project
rlabrecque Jan 24, 2022
21f8427
Added a nuspec for all-in-one package
Akarinnnnn Jan 25, 2022
5c57195
Merge pull request #481 from Akarinnnnn/nuget2
rlabrecque Jan 26, 2022
81acd1c
Remove old Unity Package Manager instructions from the README
rlabrecque Feb 6, 2022
a265d4e
Merge pull request #479 from rlabrecque/clear-old-dlls
rlabrecque Feb 6, 2022
8569c8f
Added STEAMWORKS_NET define
JamesMcGhee Nov 19, 2021
69a81da
Merge pull request #484 from rlabrecque/add-steamworks-define
rlabrecque Feb 6, 2022
3e77be7
Bump copyright to 2022
rlabrecque Feb 6, 2022
53d1718
Bump Unity Package version to 20.1.0
rlabrecque Feb 6, 2022
4d3e125
Update Standalone\Steamworks.NET.csproj to automatically grab all fil…
rlabrecque Feb 15, 2022
c0d7c5f
Update RedistInstall.cs
AW1534 Apr 11, 2022
de22589
Add UNITY_EDITOR_LINUX check in Packsize
tilderain May 11, 2022
cea16ef
Merge pull request #508 from tilderain/master
rlabrecque May 11, 2022
8e5c46a
Update to Steamworks SDK 1.54
rlabrecque Oct 30, 2022
6c169a9
Update to Steamworks SDK 1.55
rlabrecque Nov 21, 2022
0936aa8
Updated headers and binaries from SteamSDK 1.57
TwoPoint-AndyChappell May 16, 2023
a71a187
Mark EControllerHapticLocation as a flag
TwoPoint-AndyChappell May 16, 2023
00e98bc
Updated autogenerated source for SDK to 1.57
TwoPoint-AndyChappell May 16, 2023
1181f35
Updated version information and filesizes including Mac OS bundle ver…
TwoPoint-AndyChappell May 16, 2023
1213998
Updated SteamworksParser to version which can parse 1.57 headers
TwoPoint-AndyChappell May 18, 2023
1fd501e
Merge pull request #553 from TwoPoint-AndyChappell/1.57
rlabrecque May 19, 2023
49ff8f9
Update Version in README to 1.57
rlabrecque Jun 3, 2023
a3fe809
Bump version to 20.2.0
rlabrecque Jun 3, 2023
c918592
Merge pull request #500 from AW1534/patch-1
rlabrecque Feb 24, 2024
b6ab9ab
Fixed ISteamNetworkingSockets::ConfigureConnectionLanes parameters to…
rlabrecque Feb 27, 2024
d9ac268
Convert ISteamNetworkingSockets.SendMessages pMessages parameter from…
rlabrecque Mar 9, 2024
6879a84
Convert m_reserved in SteamNetworkingIdentity from a uint[] to 32 ind…
rlabrecque Mar 9, 2024
37df82e
Merge pull request #601 from rlabrecque/rlabrecque/fix-steam-networki…
rlabrecque Mar 9, 2024
14bc00c
Update RedistInstall.cs
MarcinZboralski Mar 16, 2024
a5222ef
Update to Steamworks SDK 1.58a
rlabrecque Jun 17, 2024
ac8d019
Merge pull request #613 from rlabrecque/rlabrecque/update-to-1.58a
rlabrecque Jun 17, 2024
078ed3c
Update to Steamworks SDK 1.59
rlabrecque Jun 17, 2024
d52ef7b
Merge pull request #614 from rlabrecque/rlabrecque/update-to-1.59
rlabrecque Jun 17, 2024
b067f3f
Merge branch 'rlabrecque:master' into master
MarcinZboralski Jun 22, 2024
7e5ab18
Update to Steamworks SDK 1.60
rlabrecque Jul 1, 2024
7085de4
Merge pull request #623 from rlabrecque/rlabrecque/update-to-1.60
rlabrecque Jul 2, 2024
9d8ea8c
Add missing isteamtimeline.cs.meta for Unity
rlabrecque Jul 2, 2024
78cdcd2
Merge pull request #625 from rlabrecque/rlabrecque/isteamtimeline
rlabrecque Jul 2, 2024
2c15a66
Improve overriding arg attributes
rlabrecque Jul 5, 2024
4c8c590
Add STEAM_OUT_ARRAY_COUNT to SteamNetworkingSockets/Messages function…
rlabrecque Jul 5, 2024
f4bb99a
Add STEAM_OUT_ARRAY_COUNT to ISteamUGC_GetQueryUGCContentDescriptors …
rlabrecque Jul 5, 2024
70d1d35
Merge pull request #627 from rlabrecque/rlabrecque/fix-getqueryugccon…
rlabrecque Jul 5, 2024
22139ad
Remove STEAMNETWORKINGSOCKETS_ENABLE_SDR define since it seems to no …
rlabrecque Jul 5, 2024
226a7fd
Update SteamworksParser expose generate a GameServer version of IStea…
rlabrecque Jul 5, 2024
a366e03
Merge pull request #628 from rlabrecque/rlabrecque/networking-fixes
rlabrecque Jul 5, 2024
f03f230
Add missing isteamgameservernetworkingmessages.cs.meta
rlabrecque Jul 5, 2024
4a54dc7
Merge pull request #629 from rlabrecque/rlabrecque/networking-fixes
rlabrecque Jul 5, 2024
be86f6e
Merge branch 'rlabrecque:master' into master
MarcinZboralski Jul 22, 2024
3db2bfa
Fix initializing on GameServers and added InitEx for them (Fixes #632…
rlabrecque Jul 29, 2024
09abc34
Merge pull request #634 from rlabrecque/rlabrecque/gameserverinit
rlabrecque Jul 29, 2024
a2fc889
Bump Version to 2024.8.0
rlabrecque Aug 17, 2024
a8b574b
Merge branch 'rlabrecque:master' into master
MarcinZboralski Aug 21, 2024
25d8e85
Merge pull request #602 from MarcinZboralski/master
rlabrecque Nov 23, 2024
1bde629
Update RedistInstall.cs
JamesMcGhee Nov 25, 2024
19ccaa9
Merge pull request #655 from JamesMcGhee/master
rlabrecque Nov 26, 2024
fe940be
Fix unsafe threaded access to callback registry
Equinox- Dec 13, 2024
2ceddb2
Merge pull request #666 from Equinox-/patch-1
rlabrecque Dec 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/Standalone/bin
/Standalone/obj
/Standalone/.vs
/.vs
bin/
obj/
.vs/
__pycache__/
/CodeGen/steam/lib/
4 changes: 0 additions & 4 deletions CodeGen/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion CodeGen/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013-2019 Riley Labrecque
Copyright (c) 2013-2022 Riley Labrecque

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 12 additions & 3 deletions CodeGen/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
Steamworks.NET
=======
Steamworks.NET CodeGen
======================

The special sauce that generates the autogen/ folder of [Steamworks.NET](https://github.com/rlabrecque/Steamworks.NET)
This is special sauce that generates the autogen/ and types/ directories.

It uses [SteamworksParser](https://github.com/rlabrecque/SteamworksParser) to parse the Steamworks C++ header files, then converts them to C#.

Usage
-----

1. If necessary update the files in `steam/`
2. Open a command prompt to the CodeGen directory. (The script must be run from this directory or the relative paths will be broken.)
3. Run `python3 Steamworks.NET_CodeGen.py`, preferably on a linux based OS to generate proper line endings. (I use WSL for this.)
24 changes: 7 additions & 17 deletions CodeGen/Steamworks.NET_CodeGen.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
import sys
from SteamworksParser import steamworksparser
import interfaces
import constants
import enums
import structs
import typedefs
import output_dummy_files
from src import interfaces
from src import constants
from src import enums
from src import structs
from src import typedefs

def main():
if len(sys.argv) == 2:
path = sys.argv[1]
elif len(sys.argv) == 1:
path = "steam"
else:
print("Usage: Steamworks.NET_CodeGen.py [path/to/sdk/public/steam]")
print(" If a path is not included then a steam/ folder must exist within the cwd.")
return
steam_path = "steam/"

steamworksparser.Settings.fake_gameserver_interfaces = True
___parser = steamworksparser.parse(path)
___parser = steamworksparser.parse(steam_path)

interfaces.main(___parser)
constants.main(___parser)
enums.main(___parser)
structs.main(___parser)
typedefs.main(___parser)
output_dummy_files.main()

if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion CodeGen/SteamworksParser
29 changes: 0 additions & 29 deletions CodeGen/output_dummy_files.py

This file was deleted.

Empty file added CodeGen/src/__init__.py
Empty file.
29 changes: 11 additions & 18 deletions CodeGen/constants.py → CodeGen/src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def __init__(self, name, value, type_, precomments, comment, spacing):
g_TypeDict = {
# Not a bug... But, it's a giant hack.
# The issue is that most of these are used as the MarshalAs SizeConst in C# amongst other things and C# wont auto convert them.
"uint16": "ushort",

"uint32": "int",
"unsigned int": "int",

Expand Down Expand Up @@ -48,7 +50,6 @@ def __init__(self, name, value, type_, precomments, comment, spacing):
"k_steamIDLanModeGS",
"k_steamIDNotInitYetGS",
"k_steamIDNonSteamGS",
"BREAKPAD_INVALID_HANDLE",
"STEAM_PS3_PATH_MAX",
"STEAM_PS3_SERVICE_ID_MAX",
"STEAM_PS3_COMMUNICATION_ID_MAX",
Expand All @@ -63,6 +64,7 @@ def __init__(self, name, value, type_, precomments, comment, spacing):
"POSIX",
"STEAM_PRIVATE_API(",
"STEAMNETWORKINGSOCKETS_INTERFACE",
"S_OVERRIDE",

# We just create multiple versions of this struct, Valve renamed them.
"ControllerAnalogActionData_t",
Expand Down Expand Up @@ -101,35 +103,25 @@ def __init__(self, name, value, type_, precomments, comment, spacing):
"k_HAuthTicketInvalid",

# SteamTypes
"k_JobIDNil",
"k_uBundleIdInvalid",
"k_uAppIdInvalid",
"k_uDepotIdInvalid",
"k_uAPICallInvalid",
"k_uManifestIdInvalid",
"k_ulSiteIdInvalid",
"k_uAccountIdInvalid",

# steamnetworkingtypes.h
"k_HSteamNetConnection_Invalid",
"k_HSteamListenSocket_Invalid",
"k_HSteamNetPollGroup_Invalid",
"k_SteamDatagramPOPID_dev",

#TODO: Skip all these once we have typedef autogen hooked up.
#public const ulong k_GIDNil = 0xffffffffffffffffull;
#public const ulong k_TxnIDNil = k_GIDNil;
#public const ulong k_TxnIDUnknown = 0;
#public const int k_uPackageIdFreeSub = 0x0;
#public const int k_uPackageIdInvalid = 0xFFFFFFFF;
#public const ulong k_ulAssetClassIdInvalid = 0x0;
#public const int k_uPhysicalItemIdInvalid = 0x0;
#public const int k_uCellIDInvalid = 0xFFFFFFFF;
#public const int k_uPartnerIdInvalid = 0;
# steam_gameserver.h
"MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE",
)

g_SkippedTypedefs = (
"uint8",
"int8",
"uint16",
"int32",
"uint32",
"int64",
Expand All @@ -138,7 +130,6 @@ def __init__(self, name, value, type_, precomments, comment, spacing):

g_CustomDefines = {
# "Name": ("Type", "Value"),
"MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE": ("ushort", "0xFFFF"),
"k_nMaxLobbyKeyLength": ("byte", None),
"STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS": ("ulong", "0xFFFFFFFFFFFFFFFF"),
"STEAM_CONTROLLER_MIN_ANALOG_ACTION_DATA": ("float", "-1.0f"),
Expand All @@ -150,7 +141,7 @@ def __init__(self, name, value, type_, precomments, comment, spacing):

def main(parser):
try:
os.makedirs("autogen/")
os.makedirs("../com.rlabrecque.steamworks.net/Runtime/autogen/")
except OSError:
pass

Expand All @@ -161,7 +152,7 @@ def main(parser):
lines.append("//" + precomment)
lines.append("public const " + constant.type + " " + constant.name + constant.spacing + "= " + constant.value + ";" + constant.comment)

with open("autogen/SteamConstants.cs", "wb") as out:
with open("../com.rlabrecque.steamworks.net/Runtime/autogen/SteamConstants.cs", "wb") as out:
with open("templates/header.txt", "r") as f:
out.write(bytes(f.read(), "utf-8"))
out.write(bytes("namespace Steamworks {\n", "utf-8"))
Expand Down Expand Up @@ -234,6 +225,8 @@ def parse_constants(parser):
constantvalue = "-1"
elif constantvalue == "0xffffffffffffffffull":
constantvalue = constantvalue[:-3]
elif constantvalue.endswith(".f"):
constantvalue = constantvalue[:-1] + "0f"

out_constants.append(InternalConstant(constant.name, constantvalue, constanttype, constant.c.precomments, comment, " "))

Expand Down
15 changes: 9 additions & 6 deletions CodeGen/enums.py → CodeGen/src/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#ISteamHTMLSurface
"EHTMLKeyModifiers",

#ISteamInput
"EControllerHapticLocation",

#ISteamInventory
"ESteamItemFlags",

Expand All @@ -23,11 +26,9 @@
"EItemState",

# SteamClientPublic
"EAppOwnershipFlags",
"EAppType",
"EChatSteamIDInstanceFlags",
"EMarketingMessageFlags",
"EMarketNotAllowedReasonFlags",
"EBetaBranchFlags",
)

g_SkippedEnums = {
Expand All @@ -37,7 +38,6 @@
# Valve redefined these twice, and ifdef decided which one to use. :(
# We use the newer ones from isteaminput.h and skip the ones in
# isteamcontroller.h because it is deprecated.
"ESteamControllerPad": "isteamcontroller.h",
"EXboxOrigin": "isteamcontroller.h",
"ESteamInputType": "isteamcontroller.h",
}
Expand All @@ -46,11 +46,14 @@
"0xffffffff": "-1",
"0x80000000": "-2147483647",
"k_unSteamAccountInstanceMask": "Constants.k_unSteamAccountInstanceMask",
"( 1 << k_ESteamControllerPad_Left )": "( 1 << ESteamControllerPad.k_ESteamControllerPad_Left )",
"( 1 << k_ESteamControllerPad_Right )": "( 1 << ESteamControllerPad.k_ESteamControllerPad_Right )",
"( 1 << k_ESteamControllerPad_Left | 1 << k_ESteamControllerPad_Right )": "( 1 << ESteamControllerPad.k_ESteamControllerPad_Left | 1 << ESteamControllerPad.k_ESteamControllerPad_Right )",
}

def main(parser):
try:
os.makedirs("autogen/")
os.makedirs("../com.rlabrecque.steamworks.net/Runtime/autogen/")
except OSError:
pass

Expand Down Expand Up @@ -106,7 +109,7 @@ def main(parser):
lines.append("\t}")
lines.append("")

with open("autogen/SteamEnums.cs", "wb") as out:
with open("../com.rlabrecque.steamworks.net/Runtime/autogen/SteamEnums.cs", "wb") as out:
with open("templates/header.txt", "r") as f:
out.write(bytes(f.read(), "utf-8"))
out.write(bytes("using Flags = System.FlagsAttribute;\n\n", "utf-8"))
Expand Down
Loading