mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
merge: 同步官方 main 并解决多语言资源冲突
This commit is contained in:
commit
35b85952cf
521 files changed
+37780
-3666
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Added games
|
||||
|
||||
Windows games the user adds to DroidDeck's Games tab, each a non-Steam shortcut in the
|
||||
Windows games the user adds to DroidDeck's Library, each a non-Steam shortcut in the
|
||||
Steam client that runs under `droiddeck-proton-arm64`. They show with the Custom chip.
|
||||
|
||||
## Adding
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# Native arm64 Steam client: channel and runtime
|
||||
|
||||
The default client is Valve's arm64 Linux build (`steamrtarm64/steam`). Valve does not support it, but
|
||||
publishes it on the Steam Deck client channels. `droiddeck-steam-install` installs it and
|
||||
`droiddeck-session` starts it with `STEAM_RUNTIME=1`.
|
||||
|
||||
## Channel
|
||||
|
||||
- The default is `steamdeck_publicbeta` (manifest `steam_client_steamdeck_publicbeta_linuxarm64`).
|
||||
Valve also publishes `steam_client_steamdeck_stable_linuxarm64`.
|
||||
- `droiddeck-steam-install --channel` prints the channel in use. The session passes that value as
|
||||
`-clientbeta` and writes it to `package/beta`. The two must match, or the client loops on rc 42.
|
||||
- Setting: `BL_STEAM_CHANNEL`, otherwise `~/.config/droiddeck/steam-channel`, set to `beta` or
|
||||
`stable`. A set channel never changes on its own.
|
||||
- With no setting, the client falls back to `steamdeck_stable` automatically. It stays on stable
|
||||
(`package/droiddeck-channel`) until a setting says otherwise. The fallback happens:
|
||||
- when the client was started two more times without being shown after the start-failure repair
|
||||
(`package/droiddeck-unconfirmed`: two unconfirmed starts trigger a repair, which writes
|
||||
`repaired`; two more unconfirmed starts trigger the fallback);
|
||||
- when the beta manifest has no `*_linuxarm64_linuxarm64` component. The install log then lists the
|
||||
manifest's block names, so a renamed or removed arm64 build can be seen.
|
||||
- The x86-64 client keeps `steamdeck_publicbeta` (see [x86-64-steam-client.md](x86-64-steam-client.md)).
|
||||
|
||||
## Steam Runtime container
|
||||
|
||||
Valve's 2026-10-15 beta made the x86 Linux client 64-bit and put it in a Steam Runtime container
|
||||
(pressure-vessel). The container needs unprivileged user and mount namespaces and a D-Bus session bus,
|
||||
which an Android app does not have. The x86-64 path already works around this. The arm64 client gets the
|
||||
same treatment if Valve containerizes it too:
|
||||
|
||||
- `STEAM_STEAMRT_RECURSION_GUARD=1` is exported for both clients. It tells the client that it is
|
||||
already inside its container, so after an update it does not re-execute itself through
|
||||
`pressure-vessel-wrap` (bwrap).
|
||||
- `droiddeck-steamrt-shim <client dir> <shim dir>` builds the shim when the client carries
|
||||
`pv-runtime/steam-runtime-steamrt` or a `steam-runtime-check-requirements` probe:
|
||||
- Valve's runtime is linked file by file;
|
||||
- the probe is replaced with `exit 0`;
|
||||
- its own `steam-runtime-launch-client` runs commands directly.
|
||||
|
||||
For the arm64 client the session then starts it with `STEAM_RUNTIME_STEAMRT` and `PATH` pointing
|
||||
at `~/.droiddeck-steamrt-shim` and logs "Valve containerized the arm64 Steam client". Without those
|
||||
files the shim is not built and the start is unchanged.
|
||||
|
||||
## What Valve's manifests carry (checked 2026-10-22)
|
||||
|
||||
- `steam_client_steamdeck_publicbeta_linuxarm64` (1792626604) and `steam_client_steamdeck_stable_linuxarm64`
|
||||
(1792618285) have the same blocks. Three platforms share them:
|
||||
- `*_linuxarm64_linuxarm64`: the native client (`steamrtarm64/`, `linuxarm64/`). No pressure-vessel, no
|
||||
`steam-runtime-check-requirements`. These are the only platform blocks the installer keeps.
|
||||
- `*_steamrt_linuxarm64`: Valve's x86-64 SteamRT 3c client (`steamrt64/steam` is an x86-64 ELF) with
|
||||
`steamrt64/pv-runtime/steam-runtime-steamrt` (pressure-vessel, `steam-runtime-check-requirements`,
|
||||
`steam-runtime-launch-client`). This is the containerized client the 2026-10-15 beta made the default on
|
||||
x86. Valve ships it to arm64 hosts as well, presumably to run under FEX. The installer skips it.
|
||||
- `bins_androidarm64_linuxarm64`: `androidarm64/libsteamclient.so`, `steamservice.so` and friends.
|
||||
- `steam_client_steamdeck_publicbeta_ubuntu12` has stopped at 1792108788, while stable `ubuntu12` follows
|
||||
stable (1792618285). On beta the 32-bit `ubuntu12` client no longer gets updates.
|
||||
- If a future manifest drops `*_linuxarm64_linuxarm64`, the installer logs the block list and moves to
|
||||
stable. If stable drops it too, the remaining option is the x86-64 client under FEX
|
||||
([x86-64-steam-client.md](x86-64-steam-client.md)).
|
||||
@@ -0,0 +1,38 @@
|
||||
# DD-FG flow resources
|
||||
|
||||
DD-FG keeps seven luminance pyramid levels for both input frames. Its performance
|
||||
preset chooses the finest level at which optical flow is solved:
|
||||
|
||||
| Preset | Finest solved level | Allocated flow levels |
|
||||
|---|---:|---|
|
||||
| 0 | 1 | 1 through 6 |
|
||||
| 1 | 2 | 2 through 6 |
|
||||
| 2 (the app default) | 3 | 3 through 6 |
|
||||
|
||||
Only those solved levels need RGBA16F flow images, flow UBOs and flow descriptor
|
||||
sets. The vectors keep their original level indices; unused entries are null.
|
||||
The full luminance pyramids, full-resolution expanded flow images, regularization
|
||||
and synthesis are unchanged.
|
||||
|
||||
At the default preset this avoids three flow images, three uniform buffers and
|
||||
three descriptor sets. The removed image payload is
|
||||
`8 * (width * height + (width >> 1) * (height >> 1) + (width >> 2) * (height >> 2))`
|
||||
bytes for dimensions at least four pixels:
|
||||
|
||||
| Input size | Removed image payload |
|
||||
|---|---:|
|
||||
| 1280 x 720 | 9,676,800 bytes |
|
||||
| 1920 x 1080 | 21,772,800 bytes |
|
||||
| 2560 x 1440 | 38,707,200 bytes |
|
||||
|
||||
These are pixel payloads, not driver allocation sizes or measured FPS gains.
|
||||
|
||||
## Validation
|
||||
|
||||
Run `python3 -m unittest discover -s tools/tests -p 'test_ddfg_flow_levels.py'`.
|
||||
The host test needs a C++17 compiler and system Vulkan headers or an Android NDK
|
||||
selected through the usual SDK/NDK environment variables. It compiles the actual
|
||||
DD-FG chain against a mock Vulkan dispatch table and checks resource counts,
|
||||
dispatch order and sizes, valid descriptor bindings, both models, every preset,
|
||||
2x/3x/4x generation, small/odd extents, resize and live preset changes.
|
||||
It does not execute shaders on a GPU or replace on-device validation.
|
||||
@@ -116,6 +116,10 @@ Numbers in brackets refer to the spec's list of unknowns.
|
||||
several native threads.
|
||||
19. **Network window** is the speed tier's value clamped to 1–128; the per-host cap is
|
||||
`max(6, ceil(window / hosts))`.
|
||||
20. **Pause keeps half-written files**: a stopped run keeps each unfinished stage file as a `.part`
|
||||
file named after the file's path, hash and size, with a `.part.list` of the parts already
|
||||
written. The next run writes only the other parts and hashes the whole file when it is complete;
|
||||
that SHA-1 check still decides whether the file is kept, so files without one start over.
|
||||
|
||||
**Kept at parity (known weak spots)**
|
||||
|
||||
@@ -131,7 +135,7 @@ Numbers in brackets refer to the spec's list of unknowns.
|
||||
- `AdditionalCommandLine` is one argument, frozen at install [11].
|
||||
- Shop search, an unused "wants an exchange code" helper and per-game uninstall work are not
|
||||
ported; DLC stay hidden and are never installed separately; optional (non-language) install tags
|
||||
are never selected; resume restarts a partially written file from zero [15–18].
|
||||
are never selected [15–18].
|
||||
- Library details are fetched one game at a time, as before.
|
||||
|
||||
## What needs device testing
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Focus transitions
|
||||
|
||||
Focusable app controls participate in the shared focus glide. Nearby moves stretch
|
||||
the outline; jumps over 360 dp collapse it into a ball before expanding at the
|
||||
destination. Rapid repeats keep the faster outline movement. Disabling animations
|
||||
places the outline directly at the focused control.
|
||||
|
||||
`DroidDeckTheme` supplies the host for standalone Compose interfaces. Custom
|
||||
controls use `glideBorder` with their focus interaction state. Material controls
|
||||
use `Modifier.focusGlide(shape)` before their focus target. Match the control's
|
||||
shape, and keep existing selection borders separate from the focus outline.
|
||||
Filled primary buttons use `hotFillAlpha = 0f` to preserve label contrast.
|
||||
|
||||
Use `GlideDialog`, `GlideAlertDialog`, `GlidePopup`, and `GlideDropdownMenu` for app
|
||||
windows. Android dialogs and popups have separate views and coordinate spaces;
|
||||
they need their own host. The wrappers preserve the underlying Material layouts
|
||||
and keep all controls in each window on the same animation. Dropdown hosts also
|
||||
handle recreation of the popup view after closing.
|
||||
|
||||
Touch dismiss backdrops and controller shortcut hints should have
|
||||
`canFocus = false`. Controls with a larger touch target can register the visible
|
||||
shape separately, as the toggle switch and pause/resume orb do. Web content,
|
||||
Android system UI, and native game input surfaces retain their own focus behavior.
|
||||
|
||||
`FocusGlideWindowsTest` checks Material controls, Xbox menu entries, dialog focus
|
||||
handoffs, and dropdown reopening. `FocusGlideRenderingTest` checks the large-jump
|
||||
ball animation and outline-only rendering with animations disabled.
|
||||
@@ -52,6 +52,12 @@ environment entries and is intentionally narrower than **Reset game profile**.
|
||||
Values are literal strings, with no shell expansion; quotes are only needed when
|
||||
the consuming program expects them.
|
||||
|
||||
A Unity game under FEX (`UnityPlayer.dll` for Windows builds under Proton,
|
||||
`UnityPlayer.so` or `GameAssembly.so` for native Linux builds started by
|
||||
**Linux x86 (FEX)**) keeps FEX's TSO on when the Default profile's FEX preset
|
||||
turns it off: without TSO such games can deadlock or crash (seen with Megabonk
|
||||
and Crab Game). A FEX preset chosen for the game itself still applies.
|
||||
|
||||
## Defaults and available suggestions
|
||||
|
||||
The initial configuration enables Mesa shader caching with
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# itch.io browsing
|
||||
|
||||
The itch Store tab opens on the front page shelves. A row of chips above them (`ui/ItchBrowseBar.kt`)
|
||||
sets an order (Popular, New, Top rated, Top sellers) and a price (Any, Free, On sale). Leave both at
|
||||
their defaults and the shelves stay; pick anything else and the tab shows that query's games as a grid
|
||||
that loads the next page as it scrolls into view.
|
||||
|
||||
## Data
|
||||
|
||||
`ItchBrowse` (`stores/itch/ItchBrowse.kt`) turns a `BrowseQuery` into itch's listing feed:
|
||||
|
||||
```
|
||||
https://itch.io/games[/<sort>][/<price>][/platform-<name>...][/tag-<slug>...].xml[?page=N]
|
||||
```
|
||||
|
||||
`BrowseQuery` already carries platforms and tags, so the URL builder is complete; the controls for them
|
||||
come in a later change. The path pieces are itch's own, copied from its links: sorts `new-and-popular`, `top-sellers`, `top-rated`,
|
||||
`newest` (Popular has none); prices `free`, `on-sale`, `store` (Paid), `5-dollars-or-less`,
|
||||
`15-dollars-or-less`; platforms `platform-windows`, `-osx`, `-linux`, `-android`, `-ios`, `-web`,
|
||||
`-mobile-web`; a tag is `tag-` and its lowercase name with hyphens. `ItchBrowse.path()` builds the page
|
||||
address, `url()` adds `.xml` and `?page=N`. Every request is logged
|
||||
(`itch.io browse: <url> answered <code> with <n> games`).
|
||||
|
||||
Requests go out one at a time, at least 1.2 s apart. A 429 waits 8 s and tries once more; if that fails
|
||||
the games already on screen stay. Each page is kept under the app cache for three hours, so going back to
|
||||
a query does not ask itch again. Results are parsed by `ItchShelves.parse`, the same reader the shelves
|
||||
use, so a game looks the same wherever it appears.
|
||||
|
||||
`ItchBrowseState` holds the query, the games loaded so far and whether more can be asked for. A newer
|
||||
query bumps a generation counter, so a slow answer for an older one is dropped. A game already in the
|
||||
library replaces its browse copy on the grid, so Install and the owned markers are right; the detail page
|
||||
looks browse results up through `StoresState.detailItem`.
|
||||
|
||||
## When a page fails
|
||||
|
||||
A fetch that throws or answers with a non-2xx status marks the list as failed but leaves it open. The end of the list then shows a Retry button that asks for the same page again. Scrolling does not retry on its own, so a failing page cannot loop. Only a successful page with no new games ends the list.
|
||||
|
||||
## Platform and tag
|
||||
|
||||
The platform and tag rows take several choices, and the address lists them as itch does (`platform-windows/platform-linux/tag-pixel-art/tag-2d`, platforms in the order of the chip row). A typed tag becomes its slug (`Pixel Art` is `pixel-art`) and the address gets `tag-<slug>`.
|
||||
@@ -0,0 +1,21 @@
|
||||
# itch.io install and version picker
|
||||
|
||||
Installing an itch.io game opens a version picker first. It lists the game's uploads from `/games/{id}/uploads`, with the platform, size and date of each.
|
||||
|
||||
- Windows builds install. A game with a single Windows build skips the picker and installs at once.
|
||||
- Other builds (macOS, Android, web) open the game's page on itch.io.
|
||||
- Linux builds are listed but cannot be installed yet.
|
||||
|
||||
## Free games
|
||||
|
||||
A free game does not need to be in the library. The game's number is read from the `itch:path` meta tag of its page (`games/<id>`), and both the upload list and the download work with the API key alone and no download key. This was checked against a live free game: the upload list answered 200 and a one-byte range request on the download answered 206.
|
||||
|
||||
A game that costs money and has no download key in the library is still refused.
|
||||
|
||||
## Pieces
|
||||
|
||||
`ItchGame` finds the game number and turns the upload list into builds. `ItchUploads.platforms` reads the platform from the upload's flags or `p_*` traits, and treats an upload with none as Windows. `ItchBuildPicker` is the pop-up. The chosen upload is carried in the item's `extra` as `uploadId`, and `ItchInstaller` downloads that upload.
|
||||
|
||||
If the upload the user chose is no longer in the game's list when the install starts, the install fails with "No Windows download for this game" and does not pick another build. Only an install with no chosen upload falls back to the newest Windows build. The saved queue keeps whether a game is free, so an interrupted free-game install resumes after a restart.
|
||||
|
||||
Before an install extracts, a leftover partial install of the same game (a folder whose marker said "installing" with this game's ID when the install started) is emptied, so a different build chosen after an interruption never mixes with files from the first. A finished or updating install, or another game's unfinished folder that happens to share the folder name, is never emptied.
|
||||
@@ -314,3 +314,93 @@ it needs `patches/0014`, enabled with `PROOT_FASTPATH=1`.
|
||||
and `PROOT_FP_STATS` hit rates for steam, steamwebhelper, wine and wineserver.
|
||||
- **FEX**, inside Proton as a DLL, translates x86 path syscalls through glibc's `syscall()`, not the
|
||||
wrappers, so they still trap. A `syscall()` hook could route `openat` and `newfstatat` there too.
|
||||
|
||||
## Finding the next fast path
|
||||
|
||||
The prototype notes above describe the original experiments. Main now includes the fast path,
|
||||
expanded wrappers, FEX raw-open routing ([#1283](https://github.com/Droid-Deck/DroidDeck/pull/1283)),
|
||||
and SD-library bind-name resolution ([#1331](https://github.com/Droid-Deck/DroidDeck/pull/1331)).
|
||||
Those fixes show why wrapper hit rates alone are insufficient: a caller can bypass the wrappers,
|
||||
or repeatedly hit a path the wrappers cannot resolve.
|
||||
|
||||
### Opt-in tracer profiling
|
||||
|
||||
With **Setup > Diagnostics > Debugging tools** enabled, queue profiling for one session:
|
||||
|
||||
```sh
|
||||
tools/droiddeckctl proot-profile enable --slow-us 1000
|
||||
tools/droiddeckctl start steam --wait
|
||||
# Reproduce the startup, game load, or streaming workload.
|
||||
tools/droiddeckctl stop
|
||||
tools/droiddeckctl logs latest ./profile-run
|
||||
tools/droiddeckctl proot-profile report ./profile-run/session.log --sort wall
|
||||
# Also inspect --sort cpu and --sort calls.
|
||||
```
|
||||
|
||||
`PROOT_PROFILE=1` is forwarded from the session environment to the host tracer. Patch 0018 records
|
||||
entry/exit **handler visits**, including PRoot's chained calls, by portable syscall name. It emits
|
||||
`proot-profile` JSON lines to the existing `session.log`: cumulative totals every five seconds while
|
||||
handling calls, totals at normal exit, and up to 32 slow-handler samples per five-second window exceeding `PROOT_PROFILE_SLOW_US`
|
||||
(default 1,000 microseconds). The report uses each counter's last snapshot rather than adding
|
||||
snapshots together and retains the most recent 128 slow samples. Logs can be pulled and reported while the session is running; final totals can
|
||||
be lost if the tracer is killed. An empty report (`hasCounters: false`) is not evidence of zero
|
||||
PRoot cost: check for the `start` record and that the installed PRoot pack contains patch 0018.
|
||||
|
||||
**What the clocks mean:** handler wall time includes PRoot's path translation, filesystem waits
|
||||
inside the tracer, and time the tracer is descheduled inside the handler. Thread CPU time measures
|
||||
CPU used by that handler. Neither clock includes the tracee's subsequent kernel syscall, the
|
||||
wake-up/queue delay before handler entry, or work outside `translate_syscall` (such as standalone
|
||||
SIGSYS emulation, signal delivery, and process-event handling). Fast-path calls that avoid PRoot
|
||||
are absent. Counts are handler visits, not a count of all guest syscalls. No extra ptrace stops or
|
||||
syscall-exit interception are enabled for profiling. Profiling still costs clock reads, counters,
|
||||
and log output; turn it off for final performance measurements.
|
||||
|
||||
Rank cumulative time and frequency before chasing individual outliers. High handler CPU suggests
|
||||
translation work; high handler wall with low CPU suggests filesystem or scheduling waits. Neither
|
||||
proves how much a new fast path would save. Reproduce with the same app/PRoot/library build,
|
||||
workload, storage, CPU policy, and cache state, then alternate A/B runs and measure the real load
|
||||
milestone without profiling too. Keep `PROOT_FP_OFF=1` runs for correctness comparisons.
|
||||
|
||||
For path context, the existing `PROOT_FP_LOG=/tmp/fastpath-misses.log` logs wrapper fallbacks and
|
||||
`PROOT_FP_STATS=1` prints per-process hit/miss counts at normal exit. These are separate opt-ins:
|
||||
miss logging writes on every fallback, may contain personal paths, and cannot see callers that
|
||||
bypass the wrappers. Capture it separately from the session artifact folder. The new profiler
|
||||
records syscall names, numeric IDs, and timings without paths or arguments.
|
||||
|
||||
### Test a replacement library without rebuilding the APK
|
||||
|
||||
Build a **glibc ARM64** library using the same toolchain as the shipped fast path:
|
||||
|
||||
```sh
|
||||
docker run --rm --platform linux/amd64 --user "$(id -u):$(id -g)" \
|
||||
-v "$PWD:/src" -w /src droiddeck-local-cross:24.04-v3 \
|
||||
aarch64-linux-gnu-gcc -shared -fPIC -O2 -Wall -pthread \
|
||||
-o /src/libblfastpath.so tools/proot/fastpath/fastpath.c -ldl
|
||||
|
||||
tools/droiddeckctl stop
|
||||
tools/droiddeckctl override libblfastpath.so ./libblfastpath.so
|
||||
tools/droiddeckctl proot-profile enable
|
||||
tools/droiddeckctl start steam --wait
|
||||
```
|
||||
|
||||
The existing override bridge now recognizes `libblfastpath.so`: it checks ELF class, endianness,
|
||||
type, and machine, reports SHA-256, and selects that file in `/etc/ld.so.preload` for one session.
|
||||
It rejects installation while a session is active. This is an architecture check, not validation
|
||||
of libc compatibility or the library's behavior. The fast path still requires its normal enabled
|
||||
setting and the patched PRoot pack. Its basename stays `libblfastpath.so`, so `libblsession`'s FEX
|
||||
routing finds it. Guest-command restaging retains the active selection. After stopping, the next
|
||||
session stages the bundled preload again; `env clear all` cancels queued overrides.
|
||||
|
||||
This replaces a library **for a fresh session**. It does not rebind already-resolved symbols in
|
||||
running Wine/FEX processes, unload old code, or load arbitrary plug-ins through a new ABI. True
|
||||
in-process patching would need an explicit dispatch API and synchronization across every process.
|
||||
[The dynamic loader](https://man7.org/linux/man-pages/man3/dlopen.3.html) resolves symbols within each process.
|
||||
For now, restarting the session avoids those lifetime and binding problems while removing APK
|
||||
build/install time from a fast-path iteration. Changes to the trampoline/filter contract still
|
||||
require a matching PRoot build, not just a library swap. The profiler itself also needs a new
|
||||
PRoot pack; CI builds and pins that pack alongside the APK.
|
||||
|
||||
The next useful extensions are bounded path sampling tied to handler time, separate process/signal
|
||||
stop counters, and scenario reports that compare the same game-load milestone across builds.
|
||||
Keep candidate fast paths behind equivalence tests: a slow symlink, `/proc` lookup, unsupported
|
||||
flag, or ambiguous bind must retain PRoot's semantics.
|
||||
@@ -227,7 +227,7 @@ flag for an experiment.
|
||||
|
||||
Device check (Thor): Alan Wake's American Nightmare with its 1280x720 Game Resolution runs on `:1`
|
||||
at 1280x720 with no `--force-windows-fullscreen` in the session, 2 frame-size changes, no crash
|
||||
in logcat. The Games tab and the drawer render without the switch.
|
||||
in logcat. The Library and the drawer render without the switch.
|
||||
|
||||
## Steam picture position
|
||||
|
||||
|
||||
@@ -48,6 +48,15 @@ inherit those routes. Managed shortcuts are replaced; user-created shortcuts and
|
||||
unreadable shortcut files are preserved. Both routes use the existing ARM64 Proton
|
||||
registration.
|
||||
|
||||
## Launcher artwork
|
||||
|
||||
The installed Steam game scan lists each game's `appcache/librarycache/<appid>`
|
||||
directory once for its cover, background, icon and logo. Filename preference is
|
||||
checked before directory preference: the app folder, then hash folders sorted by
|
||||
name. Hash-named fallback icons are still taken only from the app folder in its
|
||||
listing order. The directory snapshot is not kept between scans, so the next
|
||||
scan sees new artwork folders.
|
||||
|
||||
## Validation
|
||||
|
||||
Run `python3 -m unittest discover -s tools/tests -p 'test_*.py'` and Android unit tests.
|
||||
|
||||
+47
-14
@@ -3,6 +3,21 @@
|
||||
How the Stores section (`app/src/main/java/com/droiddeck/launcher/stores/`, `ui/Stores*.kt`) fits
|
||||
the rest of the app, and the on-disk contract that makes a store game an ordinary added game.
|
||||
|
||||
## Library and Stores
|
||||
|
||||
The rail's Library (`ui/LibraryPage.kt`, rail key `games`) lists every owned game: installed ones
|
||||
from the scanned library (`FrontEndState.steamGames`: Steam, added folders, store installs), then,
|
||||
under Not installed, each signed-in store's `StoresState.library` products that are not. An
|
||||
installed game claims its product by `"<source>:<storeId>" == CatalogItem.key`, so nothing shows
|
||||
twice. Stores is only for getting games: a store opens on its storefront (search, then the shelves)
|
||||
under a profile strip whose "Owned games in Library" opens the Library filtered to that store. The
|
||||
Epic Games Launcher (open, settings, uninstall, install) lives in Epic's profile strip.
|
||||
|
||||
Every game opens one page (`ui/GameDetail.kt`) from either place: the hero and its actions by state
|
||||
(installed, downloading, failed, unfinished, owned, not owned), then tabs LB/RB cycle through:
|
||||
About, Achievements, Launch, Saves & cloud and Install, each hidden when it has nothing to show.
|
||||
Library pages are `app:<appId>` for an installed game and `app:<store>:<id>` for a store product.
|
||||
|
||||
## Where a store game lives
|
||||
|
||||
```
|
||||
@@ -14,9 +29,11 @@ the rest of the app, and the on-disk contract that makes a store game an ordinar
|
||||
```
|
||||
|
||||
The default root is the app's internal storage - the runtime's tree, `/root/Games/Stores`, no bind
|
||||
needed - whatever the session's Game storage setting says. When a card the app may write is in the
|
||||
device (`GameStorage.options`), Install asks "Install to" (internal / the card, free space shown;
|
||||
the last pick is only the dialog's default). A card's root is `<card app folder>/Games`; when the
|
||||
needed - whatever the session's Game storage setting says. **Setup > Storage > Default storage**
|
||||
can send new installs straight to internal storage or the first external target; with **Ask every
|
||||
time**, Install asks "Install to" when more than one target exists (internal / the card, free space
|
||||
shown; the last pick is only the dialog's default). An existing install is always resumed in place,
|
||||
and changing the default does not move it. A card's root is `<card app folder>/Games`; when the
|
||||
card is the Steam library the library's bind (`/mnt/droiddeck-sd`) already covers it, otherwise
|
||||
`SessionService` binds the root at `/mnt/droiddeck-stores/<volume uuid>`, so a shortcut's guest
|
||||
path - and its appid - is the same from one session to the next. Every root is
|
||||
@@ -85,18 +102,22 @@ installed record (`StoreInstalls.complete`). Resume, update and repair are the s
|
||||
no cache (needs only the net peak); when even that does not fit the install is refused before any
|
||||
chunk request, naming the storage, the need, the free space and the shortfall.
|
||||
- **Progress**: the bar counts pending-file bytes written (not compressed chunk bytes), at most every
|
||||
50 ms plus once per finished file. The run logs `epic: plan …` and `epic: summary mode=adaptive|narrow
|
||||
50 ms plus once per finished file. A resumed run starts the bar at what earlier runs kept; on a
|
||||
fresh install that includes the files already complete, so the bar carries on from the pause. The run logs `epic: plan …` and `epic: summary mode=adaptive|narrow
|
||||
files=… bytes_written=… avg_mbps=… fetches=… refetches=… peak_cache_mib=… hosts=…`.
|
||||
- **Cancel / pause / failure**: the cancel flag is forwarded within 250 ms; the run stops its
|
||||
requests, joins its threads, removes every unfinished stage file and `.part` cache entry, and only
|
||||
then returns. Swapped files stay; unswapped destinations keep their old content; the chunk cache
|
||||
requests, joins its threads, removes every `.part` cache entry, and only then returns. On a cancel
|
||||
or a download error each unfinished stage file is kept in the staging folder as
|
||||
`<path id>-<sha1>-<size>.part`, with the written parts' offsets in `<same>.part.list`; the next run
|
||||
fetches only the other parts and hashes the whole file once it is complete (a partial that no
|
||||
longer matches the manifest, or whose file has no SHA-1 in it, is deleted). Any other failure removes the unfinished stage files. Swapped files stay; unswapped destinations keep their old content; the chunk cache
|
||||
stays for the next run. Success removes the cache and the staging folder (when only its marker is
|
||||
left).
|
||||
|
||||
The staging folder is recognised by its `owner` marker (`DroidDeck Epic staging v1` + LF). Before
|
||||
the delta pass the run checks that the folder is a real directory at the expected canonical path,
|
||||
that the marker matches and that every other entry is a plain `.stage` file directly inside it; only
|
||||
then are those orphans deleted. Anything unexpected fails the run without deleting. A manifest path
|
||||
that the marker matches and that every other entry is a plain `.stage`, `.part` or `.part.list` file
|
||||
directly inside it; only then are the `.stage` orphans deleted. Anything unexpected fails the run without deleting. A manifest path
|
||||
naming the staging folder, an absolute path or a `..` segment is refused. `.stage` / `.part` files
|
||||
elsewhere in the game folder are never touched.
|
||||
|
||||
@@ -176,8 +197,8 @@ The appid Steam derives (CRC32 of the quoted exe plus the name, high bit set) is
|
||||
listing carries, so the live add and the writer never disagree. Uninstall removes the folder and the
|
||||
listing drops the entry; the live client is asked to remove it too.
|
||||
|
||||
`Library.SteamGame.source` is `steam`, `gog`, `epic`, `amazon` or `added`; the Games tab shows it as
|
||||
a chip on every row and in the hero.
|
||||
`Library.SteamGame.source` is `steam`, `gog`, `epic`, `amazon` or `added`; the Library shows it as
|
||||
a chip on every tile and in the hero, and filters by it.
|
||||
|
||||
## Launch
|
||||
|
||||
@@ -190,7 +211,7 @@ game that needs arguments or environment gets `.droiddeck-launch.bat` (`StoreLau
|
||||
the variable it read the code into is cleared on that same line, so nothing of it is left in the
|
||||
game's environment. A launcher from an earlier build is rewritten before the next Epic launch.
|
||||
|
||||
The code is minted for every launch, wherever it starts. The Games tab and Stores call
|
||||
The code is minted for every launch, wherever it starts. The game page calls
|
||||
`StoreLaunch.prepare` before they launch; the compat tool (`droiddeck-proton`,
|
||||
`droiddeck-proton-wrap`) runs `droiddeck-store-launch` before Proton on every real launch, the Steam
|
||||
client's Play button included. It finds the store launcher among Steam's arguments, reads the
|
||||
@@ -198,7 +219,7 @@ sidecar beside it, and for an Epic game asks the app through `<session>/stores/r
|
||||
(`StoreLaunchRequests` → `StoreLaunch.epicCode`), waiting up to 5 s; the app writes the code into
|
||||
the game's folder itself. Each attempt logs `epic launch id=… code=yes|no reason=…`, never the code.
|
||||
|
||||
An Epic game's launch choices are the Epic card in the Games tab's launch settings - "Epic sign-in
|
||||
An Epic game's launch choices are the Epic card in its page's Launch tab - "Epic sign-in
|
||||
(EOS)" (on) and "Launch offline" (off), stored in the sidecar's `epic` block so both launch paths
|
||||
read the same thing - and "Resolve Epic sign-in", which opens Epic's account page behind its
|
||||
sign-in in Android's browser.
|
||||
@@ -249,7 +270,20 @@ the prefix's user folder appears, within a minute. Every path logs
|
||||
`CloudSaveFolder`, e.g. `{AppData}/Game/Saved/SaveGames`. `CloudSavePaths` expands it inside the
|
||||
game's prefix (`compatdata/<shortcut appid>/pfx/drive_c/users/steamuser`) or its install folder,
|
||||
case-insensitively, and refuses a path that leaves its boundary. A game whose store gives none
|
||||
has no cloud saves.
|
||||
has no cloud saves; a cached none is retried after a day.
|
||||
- **Galaxy SDK saves:** `cloudStorage.enabled` with an empty `locations` list is Galaxy SDK
|
||||
IStorage, whose objects live under a location named `__default` in
|
||||
`%LocalAppData%/GOG.com/Galaxy/Applications/<clientId>/Storage/Shared/Files`. It goes through the
|
||||
same location-qualified handling below. GET peels gzip when `Content-Encoding` is gzip, or when
|
||||
the object round-trips as GOG's PUT gzip (deflate 6, mtime 0); a gzip-format save is left intact.
|
||||
- **GOG names are location-qualified:** the cloud API lists `saves/user1.dat`, where `saves` is the
|
||||
`name` of the selected `cloudStorage.locations` entry and the folder is that entry's `location`
|
||||
(`.../Hollow Knight Silksong/default`). `GogCloud` strips the location segment for the local path
|
||||
and puts it back for `HEAD`/`GET`/`PUT`; files from other locations are ignored. Builds before
|
||||
this wrote `<location>/...` one folder too deep (`default/saves/user1.dat`); `migrateGogNested`
|
||||
moves those copies up, deletes byte-identical leftovers and rewrites their baseline keys. The
|
||||
migration runs once per game (`cloud_layout_<id>`), so a game that legitimately keeps a folder
|
||||
named like the location is not relocated again; a non-prefixed listing is left unchanged.
|
||||
- **The services:** GOG `cloudstorage.gog.com/v1/<user>/<client>` with a token issued to the game's
|
||||
own client (the client secret is kept at install; the Galaxy token is the fallback); Epic's
|
||||
savesync data storage with signed read and write links (`EpicCloud` → `EpicSaveSync` → the Rust
|
||||
@@ -289,7 +323,6 @@ report "the store engine is not available".
|
||||
| Setting | Pref | Where |
|
||||
|---|---|---|
|
||||
| Show Stores in the rail | `SessionPrefs.gameStoresEnabled` (off) | Setup › Stores |
|
||||
| Open a store on: Library · Store | `SessionPrefs.storesOpenTab` (library) | the chip row's cog, Setup › Stores |
|
||||
| Download speed tier | `SessionPrefs.gameStoresSpeedTier` (fast) | the cog, Setup › Stores, Downloads |
|
||||
| Downloads at a time | `SessionPrefs.gameStoresParallel` (1) | Downloads |
|
||||
| Install to (last pick, dialog default only) | `SessionPrefs.storesInstallTarget` | the Install dialog |
|
||||
|
||||
@@ -23,3 +23,17 @@ Setup shows Primary and Secondary under the theme when Gradient is chosen, each
|
||||
square. It opens `ColorPickerDialog`: a wheel (hue and saturation, touch), hue / saturation /
|
||||
brightness sliders (they work with a controller) and a hex box, with the old and new colour side by
|
||||
side. OK applies it.
|
||||
|
||||
## Inner Gamer theme
|
||||
|
||||
`Themes.INNER_GAMER` is an RGB theme: the accent walks round the colour wheel. It sits just above
|
||||
Gradient in the list, and Setup shows a Speed slider (1 to 10, `SessionPrefs.rgbSpeed`) under the
|
||||
theme while it is chosen.
|
||||
|
||||
`Themes.innerGamer(hue)` builds the palette for one hue through `ThemeColors.palette`, so button text
|
||||
keeps the same contrast along the gradient at every hue. `DroidDeckTheme` runs one
|
||||
`rememberInfiniteTransition` while Inner Gamer is chosen, so the system's animation clock drives it.
|
||||
Compose applies Android's animator scale to it, and the colour holds still when animations are off
|
||||
in the app (`Motion.scale`) or in Android's own settings. The hue is written to `Themes.rgbHue` in 3° steps, which restyles the
|
||||
app only when the colour visibly moves; a slow cycle costs few recompositions.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Valve's x86-64 Linux Steam client, run unchanged under FEX beside the default arm64 client. It is
|
||||
opt-in: Steam settings, **Steam client: x86-64** (`steamClientArch`, passed to the
|
||||
session as `BL_STEAM_CLIENT_ARCH=x86_64`, applies from the next session), or the desktop menu entry
|
||||
**Steam x86-64 (FEX, experimental)**. The Games tab lists the active client's games and tags its
|
||||
**Steam x86-64 (FEX, experimental)**. The Library lists the active client's games and tags its
|
||||
header "x86-64" while that client's list is shown. This page records why each workaround exists and what was seen
|
||||
on devices. The timeline is in `docs/progress-log.md`.
|
||||
|
||||
@@ -53,7 +53,8 @@ arm64 client down first.
|
||||
("Steam now requires user namespaces") when `steam-runtime-check-requirements`' bwrap probe cannot
|
||||
create a user namespace, which no Android app can. `STEAM_RUNTIME_STEAMRT` points at
|
||||
`steamrt-shim`: Valve's runtime linked file by file with only the probe replaced (`exit 0`). proot
|
||||
is the container, as for the arm64 client.
|
||||
is the container, as for the arm64 client. `droiddeck-steamrt-shim` builds it, and builds the same
|
||||
shim for the arm64 client if that one is containerized too ([arm64-steam-client.md](arm64-steam-client.md)).
|
||||
- **Re-exec after an update.** The client re-executes itself inside the SteamRT container through
|
||||
`pressure-vessel-wrap` (bwrap). `STEAM_STEAMRT_RECURSION_GUARD=1` says it is already inside one; the
|
||||
FEX rootfs with the client's `steamrt64` libraries is that container.
|
||||
@@ -290,13 +291,29 @@ alone would then read as an installed client.
|
||||
|
||||
## Libraries, SD card and sharing between clients
|
||||
|
||||
- **Separate libraries.** With folders shared, each client could update, verify or switch the
|
||||
other's games. A title with a Linux build runs as that in the x86 client and as the Windows build in
|
||||
the arm64 one, so opening it in the other client switched the files and the first client downloaded
|
||||
its version again (Left 4 Dead 2, 8.6 GB). Hard links do not help: switching platform makes Steam
|
||||
download depot 551 anyway. A game wanted in both clients is installed in both. Folders an earlier
|
||||
version shared are taken out of the x86 client's lists (written only while no x86 client runs); the
|
||||
games stay in the arm64 library.
|
||||
- **Shared games.** Before either client starts, `droiddeck-steam-share` gives it a view of the games
|
||||
the other client installed: `~/.droiddeck-x64/shared/arm64` for the x86 client ("ARM64 client
|
||||
games") and `shared/x86-64` for the arm64 one ("x86-64 client games"). A view holds a copy of each
|
||||
finished game's manifest and links to its `common` folder and `compatdata`, so the game shows as
|
||||
installed in both clients, runs from the same files and keeps one prefix and one set of saves.
|
||||
Runtimes, Proton and FEX are not shared. Device: the x86 client listed the 14 arm64 games as
|
||||
installed (13 ready to launch, Valheim fetching its shader cache) and started Stardew Valley from the
|
||||
arm64 files with no game data downloaded; the arm64 client listed Spacewar installed only in the x86
|
||||
client.
|
||||
- **Same build in both.** A title with a Linux build ran as that in the x86 client and as the Windows
|
||||
build in the arm64 one, so opening it in the other client switched the files and the first client
|
||||
downloaded its version again (Left 4 Dead 2, 8.6 GB; hard links do not help, switching platform makes
|
||||
Steam download depot 551 anyway). A shared game gets the tool its own client uses: `droiddeck-fex`
|
||||
there becomes `droiddeck-direct` here and the other way round, a Proton build keeps its Proton. Only
|
||||
an automatic choice that would switch the build is replaced; any other choice, including another
|
||||
Proton, stays.
|
||||
- **Updates and uninstall.** The newer manifest wins: an update made through a view is written back to
|
||||
the client that owns the game. Uninstalling a shared game removes it from that client only; its files
|
||||
stay with the client that installed it (Steam does not delete through the link) and it stays hidden
|
||||
there until that client updates or reinstalls it. A game installed in both clients is each client's
|
||||
own and is not shared. A view with nothing in it is not offered as an install location. Views are
|
||||
written only while no client runs. Shader pre-caching stays each client's own: the x86 client may
|
||||
fetch a shared game's shader cache into its own folder (Valheim, 1.8 GB).
|
||||
- **SD card.** The x86 client's card library is a folder inside the arm64 one (`/mnt/droiddeck-sd/x86-64`,
|
||||
`GameStorage.X64_CARD_DIR`, passed as `BL_X64_STEAM_LIBRARIES`), so the install dialog offers Internal
|
||||
Storage and SD card. compatdata, shadercache and runtime tools stay private, as in the arm64 card
|
||||
@@ -333,9 +350,11 @@ alone would then read as an installed client.
|
||||
redactor learns account names from both clients. The startup movie is staged into the x86 client's
|
||||
config only once its first start has created it; `--prepare` links the arm64 `config/uioverrides`
|
||||
and copies the `StartupMovie` choice.
|
||||
- **Storage page.** It lists both clients' games, the x86 ones labelled; a game can be installed in
|
||||
both and an id left over in several libraries. `steam://uninstall` reaches only the session's client,
|
||||
so the other client's copy is uninstalled after switching clients. Tools in the x86 client's
|
||||
- **Storage page.** It lists both clients' games, the x86 ones labelled, each where its files are, so a
|
||||
shared game is counted once; a game can be installed in both and an id left over in several
|
||||
libraries. The Games page of each client lists the games shared with it. `steam://uninstall`
|
||||
reaches only the session's client, so the other client's own copy is uninstalled after switching
|
||||
clients. Tools in the x86 client's
|
||||
libraries are shown as required (it runs its Linux games with Valve's runtimes). Proton tool files
|
||||
live only in the arm64 root; the x86 client has wrappers. An x86 client without `config.vdf` has
|
||||
never mapped a game.
|
||||
|
||||
Reference in new issue
Block a user