diff options
| author | bobcatchris <83428450+bobcatchris@users.noreply.github.com> | 2026-11-23 12:05:09 -0600 |
|---|---|---|
| committer | bobcatchris <83428450+bobcatchris@users.noreply.github.com> | 2026-11-23 23:17:22 -0600 |
| commit | 49c81019c75fc59da5a35d57977337ab7320c01a (patch) | |
| tree | f80a62710dca2f8836a816928e78d6d4ffe8ba01 /runtime/opus_decoder/leonida_opus_decoder.h | |
| parent | 8f481cf16f261c7f37458aeb45e8f4e19994146d (diff) | |
exe_sha: one command that says whether your copy is the file the notes were written against
Contributors run the tools in `tools/` against their own copy of the game, and nothing checks that the copies are the
same file. A truncated or patched image still reports as "Executable found", and every RVA a note quotes is quietly
measured on something else (#8041).
`tools/exe_sha.py` prints the size and SHA-256 of the image it is given and compares them with the numbers the package
manifest records (`expected_exe_size`, `expected_exe_sha256`, both optional, read from the `game/*.json` whose
`expected_exe` names the file), or with `--expect SHA256` when a hash is quoted directly. It exits 1 on a mismatch and
0 when the numbers match or nothing is recorded, checks the size before hashing so a truncated 120 MB copy is reported
without reading it all, and `--print-keys` emits the two manifest lines for the file in hand. `--json` gives a script
the same numbers. `docs/design.md`'s "Day one" list now starts with it.
Measured on the retail Xbox 1.0.2.1 package: 120,181,760 bytes and sha256 e95020b2fa4a721db3df59fdecf75621730ac559d8835252f6c3b658d5a08993, the same pair #7123 records for the build preflight; that PR and this one are
the two halves of #8041.
Tests: `python -I tests/test_exe_sha.py` 11 OK (match, wrong hash, wrong size, manifest without the keys, `--expect`
both ways, a non-hash `--expect`, `--json`, `--print-keys`, a missing file, and the repository's own manifest).
`tests/test_docs_cli_flags.py` and `tests/test_docs_links.py` each have one failure that is already on `main`
(`docs/embedded_shaders.md`'s pass flags, `docs/dev-tools.md`'s `../runtime/README` link); the lists are identical
before and after this change. No game files or game-derived bytes in the diff.
AI-assisted.
Diffstat (limited to 'runtime/opus_decoder/leonida_opus_decoder.h')
0 files changed, 0 insertions, 0 deletions