fix(builder): a portable launcher's games keep their files in the portable folder #3090
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3090
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/portable-paths"
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?
Summary
Under a portable launcher, Longshot still wrote into the player's own folders: a player saw
AppData\Roaming\Longshot,AppData\Local\Longshot, andAMDandIntelfolders appear after starting the game. This PR moves what is Longshot's intothe portable folder:
profile's
user/, not%APPDATA%\Longshotor~/.local/share/longshot. What that shared folder already held of theplayer's is copied there once, and kept.
sandbox\in the portable data folder.sandbox-revokereads thatrecord and the old per-user one.
driver-cache/of the portable cache, and the unused~/.local/share/longshot/nfcis no longer made when tags live elsewhere.The builder knows it is portable from
LONGSHOT_PORTABLE_DATA(set by the launcher; real environment only), else from theversions/folder it runs in. Start withbuilder/crates/build-core/src/portable.rs, thenuser_folder.rs.Windows still creates
Packages\longshot.gamefor the AppContainer, and the drivers keep their own caches; neither can bemoved. The docs now say so. Launcher side: MagicBeanDev/LongshotLauncher#412. See MagicBeanDev/LongshotLauncher#266
Testing
Tested: Linux, game-free only. Not run in the game.
cargo fmt, clippy with warnings as errors onbuild-core,build-driver,longshot-builder,modtool, and onbuild-coreforx86_64-pc-windows-gnullvm.cargo test -p build-core -p build-driver -p longshot-builder: all pass. One run hadcursor_clip::the_watch_runs_while_a_clip_is_held_and_ends_after(untouched here) fail; it passed on the rerun.cargo test -p modtoolin full before the last Linux changes, itsstate::tests after them.tests/test_sandbox_linux.py,test_sandbox_windows.py,test_sandbox_profile.py,test_doc_anchors.py,test_doc_commands.py.Still to test:
Roaming\LongshotorLocal\Longshot, files underLongshot\data\profiles\<id>\userandLongshot\data\sandbox, and the sandbox on (by hand).AMDorIntelfolder appears, and the driver'sown cache fills (by hand).
driver-cache/filling (by hand).Measurements
Not measured: where files go changes, no per-frame code does. Linux portable players start with an empty driver cache once.
Risks
userfolder from now on; the old ones stay.made, as before.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (Not run; only the checks above.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here. (The new tests pass here; not run againstmain.)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Linked the launcher's half, LongshotLauncher#412.
WIP: fix(builder): a portable launcher's games keep their files in the portable folderto fix(builder): a portable launcher's games keep their files in the portable folder