feat(build): the build tools start downloading as soon as the update check answers, and step 1 joins that download #61
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/ui
area/updates
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!61
Loading…
Reference in a new issue
No description provided.
Delete branch "madebyjordan/LongshotLauncher:feat/tools-early"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A first build waited in step 1 for the builder tools, ~500 MB on Windows: a minute or more on a good connection, about 7 minutes on a slow day. The launcher could have fetched them while the player was still finding their game file. Now the download starts as soon as the update check answers, and step 1 joins it.
What changed
Core/ToolsPrefetch.cs(new):Get), and anyone can watch a fetch (Watch: the last progress at once, then each one after);Get;Likely()picks the version to fetch early. With no builds yet, it's the newest on the channel new builds start on (a first build). Otherwise it's the default build's update. It returns null when that's already on this PC;LONGSHOT_LAUNCHER_NO_PREFETCH=1turns the early start off.App/LauncherService.cs:PrefetchLikely()after a successful update check.PruneTools()waits while a fetch runs, because pruning deleted its<tag>.partstaging folder and downloads, and it keeps the versions fetched this session.App/ViewModels/WizardViewModel.cs: step 1 joinsService.Prefetch.Get(version)instead of starting its ownToolsSource.EnsureAsync. Leaving the wizard stops watching the download, not the download itself, so the next build finds it done. Retry starts a failed one again.README.md: theLONGSHOT_LAUNCHER_NO_PREFETCHrow.tests/launcher_core/PrefetchChecks.cs:BusyandTags;Likely()'s choice: first build, the default build's update, already installed, none;Behaviour change to weigh
When an update or a first version is available, the launcher now downloads its tools, ~500 MB, in the background at start, before the player asks to build:
LONGSHOT_LAUNCHER_NO_PREFETCH=1turns it off. A setting in the UI would be the friendlier switch if reviewers want one.Testing
tests/test_launcher_core.pyon Windows (.NET 10.0.404), rebased on main @9b3d202. Every check up toSavesCheckspasses,PrefetchChecksamong them (Requirethrows on the first failure).ReleaseChecks: the signed release fixtures, checked out with Windows line endings;SavesChecks, which makes a symbolic link, and this Windows user has no right to (no Developer Mode).PrefetchCheckscovers, throughToolsPrefetchitself.99cf5a162f20521448bcView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.