steam-multiplayer-peer
steam-multiplayer-peer copied to clipboard
Add contribution and build instructions for collaboration efforts
In order to help out with the progression of this project, consider allowing other collaborators to push updates. Please document the process for building the plugin for development.
Perfect, I'll start riding this Saturday
is there any upate on this matter? it is still quite difficult to build theproject locally or to understand which package to copy over between the different branches. For instance, the bin folder in the main branch is empty.
Here's my attempt to document the build process for this extension. Please let me know if you have any feedback. I'd like to maybe open a PR to get this into the wiki. @garbagemule
Resources
The following can be used to track how the project is built in Github. This information can be helpful to identify which Steamworks version and libraries were used, build commands, or to track down changes in the build process, etc:
- https://github.com/expressobits/steam-multiplayer-peer/blob/main/.github/workflows/builds.yml
- https://github.com/expressobits/steam-multiplayer-peer/actions
Understanding the gdextension file:
- https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_file.html
Prerequisites
Open up the associated "Compiling for XYZ" Godot docs page where XYZ represents which operating system you work on. Most of what you need is listed there
- macOS: https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_macos.html
- Windows: https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_windows.html
- Linux: https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_linuxbsd.html
MacOS Summary:
- Python 3.8+
- This should come standard on your mac
- SCons 4.0+
- Use Homebrew (or however you install apps) to install this:
brew install scons
- Xcode (macOS)
- You can download this from the App Store. This wasn't used directly, but it may come with some "developer tools" that the build process requires.
- Vulkan
- The "Compiling" instructions above want you to use a script to install this, however, it was not pulled down as part of the
godot-cppsubmodule. To access this script, downloadgodotengineeither through a clone or with these instructions:- https://docs.godotengine.org/en/stable/contributing/development/compiling/getting_source.html#downloading-the-godot-source-code
- Once you have it downloaded/cloned, from the top level of the
godotenginefolder, run the following script:misc/scripts/install_vulkan_sdk_macos.sh
- The "Compiling" instructions above want you to use a script to install this, however, it was not pulled down as part of the
Shared prereqs:
- Steamworks SDK
- Download the SDK, can stick with the latest or the one used in the Github build. This will be used below.
- https://partner.steamgames.com/downloads/list
- Clone
steam-multiplayer-peer- Make sure the submodule
godot-cppwas pulled down as part of the clone. If this folder is empty, you need to figure out how to pull down the linked submodule, or it will not build correctly.
- Make sure the submodule
Build Instructions
-
Copy
steamworks/publicandsteamworks/redistributable_binto<extension_top_level>/steam-multiplayer-peer/sdk- Just copy/paste those two folders into the
sdkfolder. They are used during compilation. - Yes, there's a nested
steam-multiplayer-peerfolder inside this extension, that's where thesdkfolder is.
- Just copy/paste those two folders into the
-
Build the extension. In a terminal window, go to the top level of the project and run:
scons target=template_debug platform=macos arch=universal precision=single
-
Build Notes:
- The built artifact will be placed in the
bindirectory under its respective operating system. - There are various targets/platforms/arch that can be set based on what you're trying to build for.
- For local testing on a mac, the above command works fine.
- On macOS, this will generate a "library" artifact like this:
libsteam-multiplayer-peer.macos.template_debug.universal.dylib
- Windows and Linux will have their respective artifacts:
.dlland.so
- The built artifact will be placed in the
The build process generates the extension's "library". This is what you download from the AssetLib directory when you install the plugin through the Godot Editor. Here we build it ourselves.
Usage
Make sure you have the extension already installed in your project, you can do this from the AssetLib directory. Once you have built the extension's "library" above, to test your changes in a Godot project, copy the build artifact over to the plugin's respective OS folder. Consider creating a back up of the library you are testing, to make it easier when you want to revert back.
Put the artifact here: <TOP_LEVEL_PROJECT>/addons/steam-multiplayer-peer/<respective_os_folder>
These changes seem to take effect immediately the next time you run the project.
Thanks @BatteryAcid for the update, everything is ok! Can we introduce this in the README or in some wiki?
Thanks @BatteryAcid for the update, everything is ok! Can we introduce this in the README or in some wiki?
I would be happy to add this to a wiki page, and update the Readme to point to it. I can create a PR for the Readme, but I'm not sure how to edit the wiki. I'm guessing I need some permission. Let me know and I'll get started! Thank you!
@BatteryAcid I left the wiki free for editing, test it and tell me if you can edit it correctly.
I'm able to edit, thank you! I'll try to update this in the next day or so! thanks!
@scriptsengineer I would like to push out changes to the Readme. Can you add me as a contributor or should I just make a PR from my own repo clone?
I created a new build page in the wiki and also moved the "contributing" page to the "Home" page:
- https://github.com/expressobits/steam-multiplayer-peer/wiki
- https://github.com/expressobits/steam-multiplayer-peer/wiki/Building-Steam-Multiplayer-Peer
HIi @BatteryAcid
Sorry for the delay, I've added you as a contributor to the repository, this makes it easier for you to contribute if necessary.
I really appreciate your contribution, I just don't have time for this extremely useful work for the community.
Great, thank you! @scriptsengineer I just created a pull request that updates just the README with links to the Wiki (along with some minor formatting changes), please merge, or mark approved and I'll take care of it.
https://github.com/expressobits/steam-multiplayer-peer/pull/45 Thanks
Wiki has been updated with build instructions:
- https://github.com/expressobits/steam-multiplayer-peer/wiki