Hacking on GDPatch
GDPatch is written in the Rust programming language. The specific Rust nightly toolchain will be automatically installed from the rust-toolchain.toml.
Building
Section titled “Building”When working on GDPatch, you likely want to build gdpatch-loader:
cargo build -p gdpatch-loaderCopy the output file into your game install like a normal installation.
If you’re building on Linux for use under Wine, you can use the x86_64-pc-windows-gnu target.
Project structure
Section titled “Project structure”GDPatch is split into multiple crates:
gdpatchcontains mod loading, the patcher API, configs, and other mod loader related things.gdpatch-loaderis responsible for loading GDPatch into the game process. This is built as a dynamic (shared) library.gdpatch-godotcontains Godot-specific parsers and other goodies.filesillycontains our filesystem detours for making the game read our virtual packs.
Style guidelines
Section titled “Style guidelines”Please make sure your commits pass rustfmt and Clippy:
cargo fmtcargo clippy --fixPublishing a release
Section titled “Publishing a release”- Run
cargo fmtandcargo clippyfirst! - Edit the crate version in
Cargo.toml, and build to make sureCargo.lockgets updated as well. - Commit a version bump:
git commit -s -m "vX.Y.Z", andgit push. - Wait for CI to pass. If you don’t do this you will make Jules cry. You wouldn’t want to make Jules cry, would you Katie?
- Create an annotated tag:
git tag -s -a vX.Y.Z, and write a tag description in Markdown like so:- The first line should always be the version number!
- If you’re a jj freak like Jules, don’t forget to
jj new mainbefore andjj git importafter.
vX.Y.Z
- Added some stuff- Did some other things- Achieved world dominationgit push --tags- Wait through a very tense 5 minutes and hope you didn’t fuck something up.
- Profit(?)