-
Notifications
You must be signed in to change notification settings - Fork 150
Tools
Most helper scripts are located in /tools. Some are downloaded automatically by ninja (through download_tool.py), and these will appear in /build/tools.
| Command | Result |
|---|---|
ninja |
Build Matching objects and link the main.elf
|
ninja all_source |
Build Matching and NonMatching objects without linking |
ninja diff |
If the DOL checksum is invalid, prints a diff of the mismatch |
ninja baseline |
Sets the current state of function progress for later use with changes or changes_all. Stored in build/GALE01/baseline.json
|
ninja changes |
Prints all functions that have been broken since the baseline. A broken function was 100% and is now less. |
ninja changes_all |
Prints all functions whose progress has gone down since the baseline. |
ninja -t clean |
Cleans (deletes) all files produced by Ninja. Generally it is preferably to delete build/GALE01 instead. |
Several of our tools are built in Rust using the Cargo workspaces feature. To compile and run one of these tools, ensure Cargo is installed and then run:
cargo run -rpq <package-name> -- [args]
The flags are -r (release, not debug), -p (package, from the workspace), and -q (quiet, suppress output from cargo itself). Refer to the Cargo documentation for further information. These tools can also be compiled into userspace binaries using Cargo install.
To rename a symbol project-wide, run:
cargo run -rpq melee-replace-symbols -- [args]
This tool takes a series of replacements in the form of FROM:TO. You can pass the path of a text file to receive input from, or "-" (or leave it empty) to receive from stdin.
echo 'fn_DEADBEEF:myNamedFunction lbl_12345678:someCallback' | cargo run -rqp melee-replace-symbols -- -cat <<EOF | cargo run -rqp melee-replace-symbols -- -
fn_DEADBEEF:myNamedFunction
lbl_12345678:someCallback
EOFcargo run -rqp melee-replace-symbols -- build/replacements.txtreplacements.txt:
fn_DEADBEEF:myNamedFunction
lbl_12345678:someCallback