Commit Graph

69 Commits

Author SHA1 Message Date
fe0fb68460 ASSET-AUDIO-SKIP: allow skipping audio export
Add an opt-in assets-stage switch to skip audio extraction and conversion, preserve existing audio outputs, and account for the lower disk requirement. AI-assisted implementation; focused tests passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-12-01 12:49:31 -05:00
c6c8f5f5a3 scripts: build llvm-mc 23.1.5 by default, so the pipeline library translates (#1923)
* scripts, tools: build llvm-mc 23.1.5 by default, so the pipeline library translates

LLVM 21.1.8's gfx1013 decoder cannot decode 840 of the 2,684 compute
programs in the pipeline library of 1.0.2.1: their listings carry 79,490
undecodable words and 8,310 exp invalid_target_N lines, the translator
refuses all of them as "fall-through into undecodable words", and the
shaders stage keeps 1,844 of 2,684. LLVM 21 does translate all 26,503
shaders of shaders.rpf; the library is what it loses.

The same bytes under llvm-mc 23.1.5 have no rejected word in those 840,
and 839 of them translate and pass spirv-val (the last wants s_sethalt,
which the translator does not implement, under either version). The 1,844
that already translated were re-disassembled too: 1,674 listings change
and all 1,674 still translate, the other 170 are byte-identical, so the
stage goes from 1,844/2,684 to 2,683/2,684.

The build helper now builds 23.1.5 by default. The docs that name the
minimum version (README, docs/design.md, docs/testing.md, docs/linux.md)
and the three user-facing messages that still said 21+ (make_game.py's
preflight, shader_disasm.py's probe error, mc_command.py's install hint)
now say 23+, with the tests that assert those texts updated.

AI-assisted (DeepSeek Harness).
Written with an AI assistant.

* docs: LLVM 23 is what the shaders stage needs, and a test pins the script's default
2026-12-01 11:48:54 +01:00
91bab934d7 Merge pull request #835 from TheGeogeo/test/windows-known-folders-partial
tests: cover partial Windows known-folder results (TEST-WINDOWS-KNOWN-FOLDERS)
2026-11-29 15:27:11 +01:00
8bfd5ada37 Merge pull request #2550 from kirigayakazima/fix/ci-repo-url-rename
make_game, progress_dashboard: update default repository URL to ProjectLeonida/mandy (CI-REPO-URL-RENAME)
2026-11-29 04:36:47 +01:00
257191b8bb tests: compare the shell's known folders with the ones that exist (TEST-WINDOWS-KNOWN-FOLDERS)
The real-Windows check only asserted that known_folders() returned at most
three paths, so an empty or shortened result passed. Without
KF_FLAG_DONT_VERIFY the shell reports a known folder only where it exists,
so the expected result is the unverified paths (KF_FLAG_DONT_VERIFY) that
are directories, in KNOWN_FOLDERS order. A machine with a missing folder
still passes, and a known_folders() that drops an existing folder fails.
2026-11-29 02:52:27 +01:00
48a56aa93e Merge pull request #494 from bobcatchris/shader-index-recovery
SHADER-INDEX-RECOVERY: rebuild damaged translation indexes from shards
2026-11-28 11:56:25 +01:00
f05bf62eaa make_game, progress_dashboard: update default repository URL to ProjectLeonida/mandy (CI-REPO-URL-RENAME) 2026-11-28 09:55:01 +08:00
56d42dabe8 Test partial Windows known-folder results 2026-11-26 17:20:18 +01:00
d601736ced Merge pull request #723 from aslan2142/build2835-partial-version-match
OLD-7895: restore old upstream PR 7895 - make_game: an incomplete copy is named as a partial match of its version, with what is missing
2026-11-25 23:26:11 +01:00
8a5be5ce77 make_game: rebuild damaged translation indexes from shards
A truncated or malformed shaders/spirv/index.json could let the shaders stage report success and then leave the pipeline stage asking for another full translation. Treat a readable but malformed index as recoverable from completed shards, keep accepting a UTF-8 BOM index, and still reject a real empty merge. Also account for shaders/assets overlap in preflight free-space checks when both stages run.

Carried from the source patch in Sigtryggur-Mani-Gudmundsson's graphics-runtime-patches collection:
33ab48d3ea/README.md (recovering-a-damaged-shader-index)

AI-assisted.
2026-11-24 17:37:41 -06:00
6e15812e58 make_game: a probe file there with another size keeps the unsupported-version message (BUILD-2835 review)
A complete copy of another build has every file, with only the probe files at other sizes. That folder
cleared the half threshold and was told to finish a download that is complete. A download that stopped
early leaves files missing, while a probe there with another size (MicrosoftGame.Config above all) means
another package. So partial_version_message() now gives way to the "doesn't look like a supported version"
message, which lists the probe sizes, whenever a probe file is present with another size, even if other
files are missing too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 07:54:45 -05:00
6e673f5c7a make_game: a file whose metadata can't be read is not reported as missing (BUILD-2835 review)
manifest_presence() counted every OSError from os.stat() as a missing file, so a probe that raised
PermissionError could be listed as missing with "Finish the download". As in probe_mismatches(), only
FileNotFoundError and NotADirectoryError now count as missing; any other OSError is listed apart as
"cannot read <name> (<reason>)", with advice to make the file readable. "Incomplete copy" and "Finish the
download" appear only when a file is missing or has another size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 07:54:45 -05:00
bd9a092a7f make_game: an incomplete copy is named as a partial match of its version, with what is missing (BUILD-2835)
load_version() only looks at the three probe files, so a copy whose download stopped before one of them
was reported as "This doesn't look like a supported version of the game", the same as another game. When
no version matches its probes, the folder is now compared with each manifest by name and size; if it holds
at least half of one version's files with matching sizes, the error names that version, how many files
match, and lists the missing files (with their total size) and the ones with another size. A folder below
half keeps the old message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 07:54:45 -05:00
2c03f29783 make_game: parse quoted paths with spaces in tool_available 2026-11-24 11:09:18 +05:00
c07ec72c49 Merge pull request #227 from bhimio1/feat/linux-native-support
Linux: versioned llvm-mc, Build.sh/Mods.sh, case diagnostic, portable runtime tests, docs/linux.md
2026-11-23 22:36:28 -05:00
584b2679ae make_game, progress_dashboard: name this repository, not the private original
ensure_submodule() told a user with a ZIP download to
git clone https://github.com/ItsNotRexed/Leonida, which is private since
23 November 2026, and progress_dashboard.py --github read that repository by
default, so its pull-request, CI and coordination panels came back empty.

Both now name ubiquitarianism/leonida, as the README's clone command does.
Two tests tie the hint and DEFAULT_REPO to that README line, so a later move
fails a test instead of a user.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit a837d9a616)
2026-11-23 21:27:53 -05:00
b556acb19a fix(linux): name a version probe file whose name differs only in case
On a case-sensitive file system a package copied with its names changed
in case (microsoftgame.config) was reported as "Missing
MicrosoftGame.Config", with no hint why. The probe now names the
variant it found and says the build opens the package's files by their
exact names. It renames and case-folds nothing; on a case-insensitive
file system the exact name opens and the branch is never reached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:51:04 -05:00
28440e630d make_game: find a copy in a folder on a udisks-mounted drive on Linux (#6345)
Squash-merged after review of PR #6345 - make_game: find a copy in a folder on a udisks-mounted drive on Linux
2026-11-23 08:15:35 -06:00
2ee08d7dbf Round 44 test clashes: make_game's runtime gets work= (argparse), a bare {} index is translated again (dry run), and the exported-asset credit tests use #3974's 370 GiB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 04:27:52 -05:00
a1e44345ff Merge pull request #4661 from bobcatchris
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:16:56 -05:00
5bad061c20 Merge pull request #4320 from whattheflop
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:13:32 -05:00
3784a3a6e2 Merge pull request #3974 from tedin7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/i18n/es/quickstart.md
#	docs/i18n/pl-PL/quickstart.md
2026-11-22 23:10:05 -05:00
aa6d7d9ab1 make_game: find a copy under the usual mount points, not just /mnt and /media
macOS mounts drives and mount_smbfs shares under /Volumes, and Fedora and openSUSE put removable media in
/run/media, so a package on an external disk or on another machine's share never showed up in discovery and had
to be passed to --game. Both roots are now searched, the list moves into discovery_roots() so each platform's
answer is testable, and the --game help says that a share path goes there because it can't be listed.

AI-assisted.
2026-11-22 21:50:52 -06:00
be8570ace1 Merge remote-tracking branch 'origin/main' into triage-r43
# Conflicts:
#	docs/runtime_imports.md
#	runtime/CMakeLists.txt
#	runtime/shims/xgameruntime.cpp
#	runtime/test/xmem_test.cpp
#	tools/rdna2spirv.py
2026-11-22 22:12:50 -05:00
fd7494e134 make_game: no model/texture credit until the decoder checkout is ready (BUILD-1228)
A git checkout without third_party/rpf9-explorer/Core computes the same no-pin digest a source zip legitimately
holds, so records written from that digest matched in preflight; ensure_submodule() then fetches Core, the digest
changes, and assets() deletes those folders. submodule_ready() is now the predicate ensure_submodule() itself uses (a
non-empty Core), and assets_bytes_on_disk() credits no model or texture folder, and hashes nothing, while it is
false. A source zip with a non-empty Core is ready and unaffected (it has no git pin either way).

Tests: matching records with Core missing credit nothing and never hash; submodule_ready needs a non-empty Core;
the cache test now uses a cached stand-in that would match the records, so it fails when the credit calls the cached
decoder_digest(). Each test fails with its guard removed.

Tested: python -I tests/test_make_game_*.py (preflight 87 tests) on CPython 3.12.13, Windows. AI-assisted.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 11:55:27 +10:00
f84683af2d make_game: the preflight credit never caches the decoder digest (BUILD-1228)
preflight credits the exports before ensure_submodule() fetches third_party/rpf9-explorer, and decoder_digest() is
cached: a digest made from a missing checkout (no git pin yet) would be the one assets() compares afterwards, so
every folder would look stale and be exported again. The digest is now computed by compute_decoder_digest();
decoder_digest() is its cached wrapper that assets() uses, and assets_bytes_on_disk() calls the uncached one, only
when a folder has a decoder.sha256 (so the free-space fast path and a work folder without exports hash nothing). A
digest that cannot be computed (OSError) credits nothing; an unreadable or mismatching record already credits none.

Tests: the cache stays empty after the credit; an unhashable decoder credits nothing and preflight still answers; no
hashing with room to spare or without exports. The mixed 179/180 tests are unchanged.

Tested: python -I tests/test_make_game_*.py (preflight 85 tests) on CPython 3.12.13, Windows. AI-assisted.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 11:53:00 +10:00
38ff0f7d6c make_game: preflight credits what a resume keeps, not what it rewrites (BUILD-1228)
Review of #4320: dropping the whole-tree walk removed the credit for a stopped model/texture step that rpf9dump
resumes. assets() keeps a folder only when its decoder.sha256 matches the current decoder (else it deletes the folder
and exports again), and rpf9dump skips every output that already exists; Util.WriteAtomic leaves only complete files
under their final names and deletes a leftover *.partial. assets_bytes_on_disk now credits a model or texture folder,
finished or not, exactly when its fingerprint matches, once, without *.partial files. A folder with another or no
fingerprint is credited nothing, which also stops crediting a finished step that assets() would delete. Pools, audio
and the other steps are unchanged: only finished output counts, the conservative choice.

Mixed resume (96 GiB finished models + 54 GiB unfinished textures): 180 GiB is accepted, 179 refused (234 before).
Tests: the mixed 179/180 case, a mismatching fingerprint on the unfinished and on the finished step, and --wav;
sizes come from a faked os.scandir, nothing large is written.

Tested: python -I tests/test_make_game_*.py on CPython 3.12.13, Windows. AI-assisted.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 11:51:09 +10:00
0d17b7011d make_game: preflight credits finished asset output once when a build resumes
#4279 added a whole-tree credit (tree_bytes) next to the finished-step credit from d49b8e78 (assets_bytes_on_disk),
so output of finished steps lowered the estimate twice: 150 GB finished with 60 GB free passed although 180 GB is
needed. The finished-step credit already covers a stopped export and deliberately leaves out steps without a
manifest or marker, which the rerun writes again, and it only walks the folder when space is short. Drop tree_bytes
and its branch; the complete-assets (xma.done), shaders-reuse and --wav paths are unchanged.

Tests: the two #4279 tests that mocked or exercised tree_bytes are replaced by one that fails before this change.

Tested: python -I tests/test_make_game_preflight.py (78 tests) on CPython 3.12.13, Windows. AI-assisted.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 10:48:27 +10:00
53914e777b make_game: count assets already exported when a stopped build resumes
The preflight asked for all 300 GB of the assets stage free unless xma.done said the exports were finished, so a
build stopped part-way through the assets (279 GB written, 280 GB free) refused to resume. tree_bytes() sums what
is already under <work>/assets and the preflight subtracts it. Two tests: the subtraction and tree_bytes itself.

Tested: python3 -I tests/test_make_game_preflight.py (67 tests); a real resume on Fedora 43 that had been refused.
AI-assisted.
2026-11-23 00:27:54 +00:00
b96d8309d8 docs: assets stage needs about 370 GB (400 GB full build), update README, quickstarts and preflight (PROC-196) 2026-11-22 23:44:54 +01:00
3e7ca4a211 Merge pull request #3371 from CaravelaLabs 2026-11-22 17:01:43 -05:00
dac28e6b19 Fix what the round-42 merges broke (tests and docs)
- shader_disasm: prune stale listings against every input, not the --skip-existing remainder (a resumed run
  deleted every listing it had just reused).
- progress_dashboard: a drive-letter path is never inside the repository off Windows (it printed user names);
  its own read_text helper is read_utf8, so the encoding check does not take it for pathlib's.
- Translator tests follow this round's rules: desc_lookup's BroadcastFirst in the typed-load condition walker;
  resinfo sizes are 0 past the last level and a 2D depth word is 0 (SHADER-388); SHADER-315 constant folding in
  the perm and i16 tests; #2089's structured wave64 emulation.
- test_semantic_translator_use: 57 oracle-only files merged before it are DEBT; test_spirv_tools_required is
  allowed (CI meta-test).
- Test fixes: image_fuzz fake writes the programs, preflight follows c506d00c's loader hint rule, feature_scan
  reads the first line of a pytest-decorated message, w64_graphics wording.
- docs: rows merged again in design.md, README.md, d3d12_vulkan.md; GameInput table rebuilt from #3172's rows;
  orphan rows in models.md and embedded_shaders.md; repeated bullets; anchors; a flag not on main.
- Repo rules: stdout guard on 14 programs; LF writes; csv lineterminator in bink_play.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:14:54 -05:00
62b32ff9bd make_game: separate messages for no Git, ZIP download and failed submodule fetch
Reviewers on #3371 (paratustra, Maraco91) pointed out that with Git
installed the old text still said "Install Git", and that a failed
'git submodule update' in a real clone (offline, proxy) was reported as
a ZIP download. Each case now gets its own message, with tests.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:52:30 +01:00
e4142cb3d6 Merge pull request #3296 from Mulkku 2026-11-22 15:16:47 -05:00
c101665b9d make_game: name the real clone URL when rpf9-explorer is missing
A "Download ZIP" from GitHub leaves out the submodule, and the error
said "git clone --recursive <this repository's URL>" with a literal
placeholder, which left non-developers stuck (#3276).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:16:31 +01:00
a28c7e3c3f Merge pull request #3168 from Hanioe2 2026-11-22 15:15:22 -05:00
561286028f Merge pull request #3112 from bobcatchris 2026-11-22 15:14:53 -05:00
7b7971b5d8 Merge pull request #2790 from Leonardo Guimaraes 2026-11-22 15:12:00 -05:00
c506d00cde Only suggest the loader build when it fits 2026-11-22 21:53:27 +02:00
b80e1f8717 make_game: credit only finished asset steps, never links or junctions
Review of #2790: the discount counted every regular file under <work>/assets,
so unrelated files or a step that stopped before its marker could let a short
drive through, and an NTFS junction (is_dir(follow_symlinks=False) is true for
one) was walked and counted.

assets_bytes_on_disk() now counts only the output of steps assets() skips on a
rerun: an archive's models/textures folder with its manifest.json, a texture
pool whose manifest ttpf_manifest() accepts, the audio banks once
audio_manifest.json exists, and audio/ogg or audio/xma once their .done marker
is there. Symbolic links and junctions are skipped, including <work>/assets
itself.

On a real stopped export the credit drops from 319.0 to 294.6 GiB; the
difference is the audio bank step that stopped before its manifest.
2026-11-22 16:51:46 -03:00
f847748cc7 Merge origin/main (7 pull requests merged on GitHub)
# Conflicts:
#	docs/design.md
#	tools/psin_data.py
2026-11-22 14:46:26 -05:00
553ac7e3d7 BUILD-881: defer submodule initialization until preflight passes 2026-11-23 03:33:55 +08:00
009dceb13e docs: correct the low-disk README lines and pin the --wav preflight branch
#2857's paragraph claimed deleting the .s files alone leaves the stage with
zero shaders, but the translated spirv/index.json is what makes the stage
reusable first; only deleting both (or an empty folder matching vacuously)
gets there. The symlinked-disasm refusal happens when the stage clears the
folder, not on every run, and --overlay belongs to gta6rt, not make_game.py.

Add the missing preflight test: with --wav, exported assets are still counted
because the decode writes again, so 250 GB free fails with the run-only hint;
without --wav the same work folder passes.

Found by @tupacfan04.
2026-11-22 13:25:10 -06:00
81e0392f97 docs: document the low-disk run-only build and hint it in preflight 2026-11-22 18:32:05 +00:00
d49b8e78e6 make_game: preflight counts an asset export that stopped part-way
#905 leaves the assets stage's 300 GB out of the space check only when the
export finished (xma.done). A run stopped after the models, textures and most
texture pools still asked for the full 330 GB, so a drive that already held
270 GB of that export and had 205 GB free refused to resume, although the
stage skips every finished step.

When the free space is short and the assets stage is selected, preflight now
subtracts the whole GB already under <work>/assets (capped at the 300 GB
estimate) and logs it. assets_bytes_on_disk() is one os.scandir walk that
does not follow links; it runs only in that short-on-space case. A fresh
folder still needs the full amount, and --wav still counts the whole
estimate, as in #905.
2026-11-22 15:17:11 -03:00
0ddeddc611 Merge pull request #2585 from Marco Luzzaro 2026-11-22 13:16:21 -05:00
bf6c37182f BUILD-667: validate completed disassembly inventory
Keep the expected output set through interrupted repairs and preserve valid listings.
2026-11-22 18:30:56 +01:00
1c8122056e Merge pull request #2055 from FreddyxS 2026-11-22 11:41:17 -05:00
19335442f0 test(build): cover an extensionless LLVM_MC path with spaces 2026-11-22 16:45:35 +01:00
c7408a1f7e Keep stale shader files out of resumed builds
Select each stage's inputs from its producer index and refresh downstream
stages when a saved cache contains obsolete shader names.
2026-11-22 23:35:45 +08:00