Skip to content

Conversation

@Akarinnnnn
Copy link
Contributor

@Akarinnnnn Akarinnnnn commented Jun 10, 2025

This PR resolves #699 . In this PR, to allow this library able to choose which Steam DLL to use, standalone version of class NativeMethods becomes a wrapper of real PInvoke importers(class NativeMethodsUnderlying and class NativeMethodsUnderlyingWin64). These changes are limited to .NET Standard standalone build. Unity and .NET Framework builds will keep unchanged: still use preprocessor symbol to determine pack size and Steam DLL name.

I added STEAMWORKS_STANDALONE_ANYCPU in addition to original supported platforms. But Any CPU version won't build if define this only, they need Any CPU version of class NativeMethods.

As of 2025.6.10, Any CPU version is only tested about Steamworks initialization. Callbacks and struct interloping are not tested yet.

1. Add Any CPU preprocessor symbols
2. Edit hand written files(Packsize.cs etc.)
In current state, user code references Any CPU dll is able to initialize Steam API. Not sure is there any other interop problems exist.

1. Fix platform tests by add AnyCPU specific check code
2. Make pack sizes of RemoteStorageEnumerateUserSubscribedFilesResult_t correct
@Akarinnnnn Akarinnnnn marked this pull request as ready for review June 14, 2025 11:42
Codegen is not tested, commiter don't have environment at commit time!
@Akarinnnnn
Copy link
Contributor Author

Commit 79a5a58 is tested, codegen product remains unchanges.

@Akarinnnnn
Copy link
Contributor Author

#738 superseded this change.

@Akarinnnnn Akarinnnnn closed this Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trying to build a .NET Standard Steamworks.NET.dll that targets Any CPU

1 participant