fix(build): step 2 asks each drive for what the build takes there, not a first build's 60 GB on the game's #263

Open
Mone wants to merge 1 commit from Mone/LongshotLauncher:fix/rebuild-space into main
First-time contributor

Step 2 holds every build to 60 GB free on the game folder's drive, a first build's figure. Rebuilding a version already on that drive, with the build files on another one, was refused for space it would not take: here, 18 GB free on C: for a 31.2 GB version whose build files are on E:.

What changed

Core/BuildSpace.cs says what each drive needs, and step 2 asks that instead of Disk.BuildBytes:

  • A first build, or another .nup: the whole 60 GB, as before. make_game.py reads the new copy beside the old one before it takes its place (read_assets).
  • A build that keeps its game files (BuildSpace.ReadSkipped): an update (--update), or a .nup whose .longshot_romfs stamp the folder already has (make_game.py's main skips the read then). Its romfs and kept exefs are checked, not written; the game's drive needs the rest of the folder (program files written beside the old ones and swapped in, shader caches) and a 5 GB margin, never more than a first build. The folder is measured on a pool thread (BuildSpace.Measure: ~187,000 files); until then the first build's figure stands.
  • Build files on another drive (Advanced): their share, 10 GB, is asked of that drive and not of the game's. That drive was not checked at all before; when it is short, the footer says so and where to change it.
  • Needs are shown in whole GB rounded up.
  • BuildRegistry.Unpacked is public: the stamp check is the one SameGameFiles already uses.

The two figures are estimates: 10 GB for the build files (docs/user/common-issues.md says ~4 GB once done; compiling and a new translation's copy add to it) and the 5 GB margin. A first build's 60 GB is unchanged, and so is step 1's requirements card, which only advises.

Related: #212 (explaining the build's sizes).

Testing

Tested

  • dotnet build LongshotLauncher.slnx -c Release: 0 warnings, 0 errors; the app tests (tests/launcher_app) pass.
  • tests/launcher_core/BuildSpaceChecks.cs (new): the first build's 60 GB on one drive; the build files' share moved to their drive; a kept folder's rest and margin; never more than a first build; the margin at least; the stamp rules (no stamp, same .nup, another .nup by size, --update, romfs and exefs folders); Measure counting the folder and its game files apart.
  • In the installed launcher (Windows 11; game folder on C: with 18 GB free; build files on E:): step 2 for a rebuild of the same .nup said "Needs 60 GB, only 18 GB free on C:" and refused before; now "Needs 12 GB, 18 GB free on C:" with Rebuild enabled (screenshot). Not started.

Still to test

  • A rebuild run through on a nearly full drive, to check the 5 GB margin and the 10 GB share against what the build really takes.
  • A build with the build files on the game's drive, and an update (--update) of a kept folder.
  • Linux and the Steam Deck.
  • On this Windows PC the core suite stops at SavesChecks, and scripts/translations.py reports catalog texts left over: both on main as it is too (clean checkout of 6887d57), not from this change.

Screenshots follow in a comment.

Step 2 holds every build to 60 GB free on the game folder's drive, a first build's figure. Rebuilding a version already on that drive, with the build files on another one, was refused for space it would not take: here, 18 GB free on C: for a 31.2 GB version whose build files are on E:. ## What changed `Core/BuildSpace.cs` says what each drive needs, and step 2 asks that instead of `Disk.BuildBytes`: - **A first build, or another .nup**: the whole 60 GB, as before. make_game.py reads the new copy beside the old one before it takes its place (`read_assets`). - **A build that keeps its game files** (`BuildSpace.ReadSkipped`): an update (`--update`), or a .nup whose `.longshot_romfs` stamp the folder already has (make_game.py's main skips the read then). Its romfs and kept exefs are checked, not written; the game's drive needs **the rest of the folder** (program files written beside the old ones and swapped in, shader caches) **and a 5 GB margin**, never more than a first build. The folder is measured on a pool thread (`BuildSpace.Measure`: ~187,000 files); until then the first build's figure stands. - **Build files on another drive** (Advanced): their share, 10 GB, is asked of that drive and not of the game's. That drive was not checked at all before; when it is short, the footer says so and where to change it. - Needs are shown in whole GB rounded up. - `BuildRegistry.Unpacked` is public: the stamp check is the one `SameGameFiles` already uses. The two figures are estimates: 10 GB for the build files (docs/user/common-issues.md says ~4 GB once done; compiling and a new translation's copy add to it) and the 5 GB margin. A first build's 60 GB is unchanged, and so is step 1's requirements card, which only advises. Related: #212 (explaining the build's sizes). ## Testing **Tested** - `dotnet build LongshotLauncher.slnx -c Release`: 0 warnings, 0 errors; the app tests (`tests/launcher_app`) pass. - `tests/launcher_core/BuildSpaceChecks.cs` (new): the first build's 60 GB on one drive; the build files' share moved to their drive; a kept folder's rest and margin; never more than a first build; the margin at least; the stamp rules (no stamp, same .nup, another .nup by size, `--update`, romfs and exefs folders); `Measure` counting the folder and its game files apart. - In the installed launcher (Windows 11; game folder on C: with 18 GB free; build files on E:): step 2 for a rebuild of the same .nup said "Needs 60 GB, only 18 GB free on C:" and refused before; now "Needs 12 GB, 18 GB free on C:" with Rebuild enabled (screenshot). Not started. **Still to test** - A rebuild run through on a nearly full drive, to check the 5 GB margin and the 10 GB share against what the build really takes. - A build with the build files on the game's drive, and an update (`--update`) of a kept folder. - Linux and the Steam Deck. - On this Windows PC the core suite stops at `SavesChecks`, and `scripts/translations.py` reports catalog texts left over: both on `main` as it is too (clean checkout of 6887d57), not from this change. Screenshots follow in a comment.
fix(build): step 2 asks each drive for what the build takes there, not a first build's 60 GB on the game's
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
9f31e81eaf
Step 2 held every build to 60 GB free on the game folder's drive. A rebuild or an update whose folder holds the game files
make_game.py will not read again (the same .nup's .longshot_romfs stamp, or --update) writes only the rest of that folder
again; and build files on another drive take nothing on the game's. On a PC with the build files on E: and 18 GB free on
C:, rebuilding a 31.2 GB version on C: (24.5 GB of it game files) was refused; it now asks 12 GB there and 10 GB on E:.

A first build, or another .nup, still asks the whole 60 GB: the new copy is read beside the old one. The build files'
drive, when another, is now checked too, with its own message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
First-time contributor

Screenshots (Windows 11, launcher in Italian): step 2 for a rebuild of a 31.2 GB version on C: (18 GB free), build files on E:. Paths are blanked out.

Before: 60 GB asked on C:, Rebuild off.

Before

After: 12 GB asked on C:, Rebuild on.

After

Screenshots (Windows 11, launcher in Italian): step 2 for a rebuild of a 31.2 GB version on C: (18 GB free), build files on E:. Paths are blanked out. Before: 60 GB asked on C:, Rebuild off. ![Before](https://git.magicbean.dev/attachments/d0b59c97-236e-46e5-9bed-afab06f12885) After: 12 GB asked on C:, Rebuild on. ![After](https://git.magicbean.dev/attachments/af6ddf3a-87e5-4cb1-a513-67224207765c)
Author
First-time contributor

A full rebuild run through, started from the gear (#262) and allowed by the space check (#263): Nightly 763, upscalers turned off (DLSS, FSR 4, XeSS were on), Windows 11, game folder on C: with 18 GB free, build files on E:.

  • Done in about 3 minutes; the game folder is ready and listed as before.
  • make_game.py's own times (build_times.json): read 0.6 s (the .nup not read again: same stamp), lift 5.3 s (translation reused), compile 99 s (2 of 591 modules compiled; most of it planning and linking), finish 51 s, 157 s in all. Shader preparation then ran for ~20 s: the driver's pipelines were there already (longshot_programs.bin and longshot_prepared.bin written again, longshot_vk_pipelines.bin untouched).
  • Space: C: went from 18.1 to 16.9 GB free (~1.2 GB written: program files and shader caches, well under the 12 GB #263 asked). The build files on E: are back to 3.34 GB after the finish's clean-up, as before the rebuild.
  • With DLSS off, its runtimes and the ngx folder went from the game folder. FSR 4's and XeSS's DLLs stay (~110 MB): make_game.py removes FSR's mark only, and keeps XeSS's library by design; not this PR's to change.
A full rebuild run through, started from the gear (#262) and allowed by the space check (#263): Nightly 763, upscalers turned off (DLSS, FSR 4, XeSS were on), Windows 11, game folder on C: with 18 GB free, build files on E:. - **Done in about 3 minutes**; the game folder is ready and listed as before. - make_game.py's own times (`build_times.json`): read 0.6 s (the .nup not read again: same stamp), lift 5.3 s (translation reused), compile 99 s (**2 of 591 modules** compiled; most of it planning and linking), finish 51 s, 157 s in all. Shader preparation then ran for ~20 s: the driver's pipelines were there already (`longshot_programs.bin` and `longshot_prepared.bin` written again, `longshot_vk_pipelines.bin` untouched). - **Space**: C: went from 18.1 to 16.9 GB free (~1.2 GB written: program files and shader caches, well under the 12 GB #263 asked). The build files on E: are back to 3.34 GB after the finish's clean-up, as before the rebuild. - With DLSS off, its runtimes and the `ngx` folder went from the game folder. FSR 4's and XeSS's DLLs stay (~110 MB): make_game.py removes FSR's mark only, and keeps XeSS's library by design; not this PR's to change.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/rebuild-space:Mone-fix/rebuild-space'
git switch 'Mone-fix/rebuild-space'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!263
No description provided.