Stores: an install that stops is an unfinished install, not a Custom game

A half-installed Epic game on the card (files up to a 0-byte one, 9.1 GB
of .chunks, no sidecar) showed in Games as a Custom folder: the sidecar
was only written at the very end, the queue's row lives in memory, and
the scan took any sidecar-less folder under a store root for a hand-added
game.

The sidecar is now written when an install starts, in state installing,
and rewritten finished at its end; a finished install being repaired
keeps its record. Folders still installing, or with no sidecar, are never
scanned as games; the Stores card and page offer Resume install, which
reuses the folder (and an Epic .chunks beside it) instead of a fresh one.
Writing the launcher or the finished record fails the download with its
message; the art and the Steam side stay best-effort.

The Epic cache holds whole chunk windows shared with files this device
does not install, so it outgrows the game; the free-space check now runs
after the delta pass and counts the missing chunks and files on their own
volumes.

The Install-to dialog is a 440 dp card with two tiles that are the
action, one line of caption and Cancel in the title row; the cog popup
is capped at the same width.
This commit is contained in:
The412Banner committed 2026-10-08 19:52:28 -04:00
1 parent 33caa8a57c
commit b6903db58c
19 files changed
+220 -50

No files matched your search

+13
View File
@@ -29,6 +29,10 @@ An Epic install on a card keeps its in-flight chunks in `cacheDir/stores/epic/<i
writes the files from it and drops each chunk after its last use, then the folder), and of the
manager's own loops when the engine is not there; `""` keeps the cache beside the game, as an
internal install has it. The scratch folder is removed on cancel-with-delete and on uninstall.
The cache holds whole ~1 MiB chunk windows, shared with files this device does not install, so it
is often larger than the game (Metalstorm: 9.1 GB of chunks for 4.4 GB of files); the free-space
check, made after the delta pass, counts the missing chunks and the missing files on their own
volumes. A successful run removes the cache.
## The sidecar
@@ -49,6 +53,15 @@ internal install has it. The scratch folder is removed on cancel-with-delete and
}
```
An install writes the sidecar at its start with `"state": "installing"` (store, id, title, no exe)
and rewrites it finished at its end (exe, launcher, no state field = installed). A folder under a
store root whose sidecar says `installing`, or that has no sidecar at all, is an unfinished
install: `AddedGames.scan` leaves it out (it is neither a game nor a Custom folder), and the Stores
card and page offer **Resume install**, which reuses that folder - and an Epic `.chunks` beside it -
instead of starting a fresh one (`StoreInstallRoot.existingFolder`). A finished install being
repaired keeps its finished sidecar. The launcher and the finished sidecar are written before the
art and the Steam registration; a failure writing them fails the download with its message.
`StoreGameSidecar.parse` refuses anything whose `exe` or `launcher` would point outside the folder.
Every store install is a Steam shortcut; an `addToSteam` field in a sidecar from an earlier build is
read past and ignored.
+16
View File
@@ -115,6 +115,22 @@ without it and Setup says "Stores engine not built").
`chunkCacheDir` (fetch and the new `nativeAssemble`, which drops each chunk after its last use)
and the manager's own loops read the same path; internal installs pass `""` as before. Cleaned on
cancel-with-delete and uninstall.
- **Half-installed Epic game shown as Custom (device, Metalstorm on the SD card).** The folder had
2.85 of 4.4 GB of files, a 0-byte file where the assembly stopped (19:15:10, four minutes after it
began), 9.1 GB of `.chunks`, and no sidecar. The run stopped inside the assembly loop - before the
`.chunks` removal and the sidecar, both of which only ran at the very end; the events log does
not reach back far enough to say whether the process died or the loop threw. Either way three
things made it silent: the sidecar was only written last, the queue lives in memory (a process
death drops the row), and `AddedGames.scan` listed any sidecar-less folder under a store root as
a Custom game. Now: the sidecar is written at the start in state `installing` and finished at the
end; unfinished folders (installing, or no sidecar) are never scanned as games; the Stores card
reads **Resume install**, which reuses the folder and its `.chunks`; launcher/sidecar write
failures fail the download, art and Steam registration are best-effort. The 9.1 GB cache is
whole 1 MiB chunk windows shared with files outside this device's install tags - the free-space
check now counts cache and files; a successful run removes the cache (Kotlin loop and
`nativeAssemble` both).
- **Install-to dialog compacted** (440 dp, two tiles that are the action, one-line caption, Cancel
in the title row); the cog popup is capped at 440 dp too.
- **Device-proven on the AYANEO Pocket FIT, 2026-10-08 (GOG):** sign-in, the library (33 owned),
DOOM I Enhanced installed through the GOG engine to the SD Games root, shown in Games with the
GOG chip and real art, registered as a non-Steam game in the Steam client (grid art present), and