Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
557d0e8a62
|
||
|
|
81e95c5a72 | ||
|
|
babd500ec3 | ||
|
|
df113c0888 | ||
|
|
1070cd303f | ||
|
|
f8ecc19371 | ||
|
|
57a428846e | ||
|
|
4ae563c97e | ||
|
|
3e9028c139 |
No files matched your search
+93
-1
@@ -28,6 +28,97 @@ numeric core and does not move; the heading is the full version — corrected 20
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.1.0-beta.21] - 2026-10-13
|
||||
|
||||
**The twenty-first pre-release: an anti-cheat kept beside a game's executable found before anything is injected, four
|
||||
itch.io downloads that carry malware, documents that scroll further and smoothly, and Play.** The same unsigned
|
||||
installer: verify its hash against `SHA256SUMS.txt`, then *More info → Run anyway*.
|
||||
|
||||
**Updating from `0.1.0-beta.20`:** Help ▸ Check for updates, then *Restart to update* with no game running. The Privacy
|
||||
Policy (2.10) is shown once for you to accept. Every game is read and checked for anti-cheat once more (detection rules
|
||||
`2026.10.4`): Wuthering Waves, and any game that keeps an anti-cheat beside its executable, has its hooking turned off.
|
||||
If you installed HELLO, HELLO WORLD!, A Doll's Locket - Remake, City of Bones or Träumerei Chapter 2 from itch.io, read
|
||||
*Security* below first.
|
||||
|
||||
### Added
|
||||
|
||||
- **Play, on a game's page and on each game in the library.** Through the store that installed the game — Steam or the
|
||||
Epic Games Launcher starts it, GOG GALAXY runs it, the itch app asks which copy to launch — or started directly by
|
||||
FrameLedger, recorded from its first frame: **Settings ▸ Games ▸ Play button** switches between the two. A game no
|
||||
store installed, and a GOG game without GOG GALAXY, is started directly. FrameLedger never starts a game as
|
||||
administrator: *Start directly* does not start one that asks for it, and while FrameLedger itself runs as
|
||||
administrator, Play starts every game directly so that the game does not. A game whose recording is off is started
|
||||
only through its store. The Epic Games Launcher's link is the one its own shortcuts carry and has not been tried on a
|
||||
real Epic game yet (`docs/08_UI.md` §Games).
|
||||
- **The Privacy Policy (version 2.10)** names the store records Play and the library import read — the lists of installed
|
||||
games the Steam, GOG GALAXY, Epic Games and itch apps keep on your disk, and where GOG GALAXY is installed; the import
|
||||
read the Epic and itch lists before and the policy did not say so — and that Play hands a game to its store's app,
|
||||
which may connect to its store while FrameLedger itself connects to nothing. It is shown once for you to accept.
|
||||
|
||||
### Changed
|
||||
|
||||
- **The documents in the app scroll further and smoothly** — the user guide, Help ▸ Limitations, About's documents, the
|
||||
Legal Gate and the update notes. A wheel notch moved them a fixed short step whatever the wheel or touchpad sent;
|
||||
it now moves the number of lines Windows is set to scroll (a screen if it is set to that), about twice as far by
|
||||
default, in proportion for a touchpad, and glides there unless Windows' animations are off. At the end of the update
|
||||
notes the wheel scrolls the window instead; Ctrl+wheel still zooms. A page is drawn once when it is opened, not two or
|
||||
three times, and going back to a page you have read in the same window is immediate.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **An anti-cheat kept beside a game's executable is found before anything is injected.** The safety check looked three folder
|
||||
levels into a game's install folder and no further, so an anti-cheat beside an executable that is itself three levels down
|
||||
was never seen: Wuthering Waves keeps Tencent's Anti-Cheat Expert in `Client\Binaries\Win64\AntiCheatExpert\`, its
|
||||
page read clean, and a session with hooking turned on was hooked for 37 seconds before the check that runs every 30 seconds
|
||||
met the anti-cheat's driver — and because a driver counts for the whole PC, the game's hooking stayed on. The check now also
|
||||
looks in the executable's own folder, on the game's page and before every injection. Wuthering Waves is also named by its
|
||||
Steam id (owner decision D58), and ACE's files, its second driver, its driver's service and its module are named (detection
|
||||
rules `2026.10.4`). Every game is checked for anti-cheat once more after the update; one found this way has its hooking
|
||||
turned off, as any finding does (`docs/19_SAFETY_AND_ANTICHEAT.md` §Pre-injection checks, item 4).
|
||||
- **A game's Supports card said *Not scanned yet* for a game the agent had read** whenever the game ships none of the
|
||||
upscaler, frame-generation or Vulkan files the rules name — beside a Details card the same read had filled. It says
|
||||
so now only until the agent has read the game, then *None found*.
|
||||
|
||||
### Security
|
||||
|
||||
- **Four itch.io downloads this project's documentation used as examples carry malware.** HELLO, HELLO WORLD!, A Doll's
|
||||
Locket - Remake, City of Bones and Träumerei Chapter 2 put the same 213 MB program in front of their RPG Maker game.
|
||||
Read without running it, it ships a registry file that switches off Windows' script scanning (AMSI) and adds
|
||||
Microsoft Defender exclusions, carries an encrypted payload, and checks for virtual machines and debuggers before it
|
||||
starts the game. The documentation called it a launcher and, for A Doll's Locket, said to measure it with the agent
|
||||
running as administrator: that advice is withdrawn. If you installed one of them, remove it and scan your PC.
|
||||
FrameLedger itself does not change: it reads a game's files to find its engine and anti-cheat, and does not judge
|
||||
whether a game is safe (`docs/spike-notes.md` §20).
|
||||
|
||||
## [0.1.0-beta.20] - 2026-10-12
|
||||
|
||||
**The twentieth pre-release: the engine version of Ren'Py games.** The same unsigned installer: verify its hash against
|
||||
`SHA256SUMS.txt`, then *More info → Run anyway*.
|
||||
|
||||
**Updating from `0.1.0-beta.19`:** Help ▸ Check for updates, then *Restart to update* with no game running. The Privacy
|
||||
Policy (2.9) is shown once for you to accept. Every game is read once more for its engine (detection rules `2026.10.3`).
|
||||
|
||||
### Added
|
||||
|
||||
- **The engine version of Ren'Py games**, as Unity's, Godot's and RPG Maker's have been shown since beta.19 — on the game's
|
||||
page with what it was read from, the engine's own `renpy/vc_version.py`: *Ren'Py 8.5.0*. A game whose engine names no
|
||||
version there reads as not found. Every game is read once more after the update (detection rules `2026.10.3`;
|
||||
`docs/05_DETECTION.md` §Engine version — Ren'Py).
|
||||
- **The Privacy Policy (version 2.9)** names that file among the version marks it reads; it is shown once for you to
|
||||
accept.
|
||||
|
||||
## [0.1.0-beta.19] - 2026-10-12
|
||||
|
||||
**The nineteenth pre-release: an imported game that is its own runtime and not a helper, Change executable… in the game's
|
||||
folder, the engine version of Unity, Godot and RPG Maker games, and games you uninstalled leaving the library by
|
||||
themselves.** The same unsigned installer: verify its hash against `SHA256SUMS.txt`, then *More info → Run anyway*.
|
||||
|
||||
**Updating from `0.1.0-beta.18`:** Help ▸ Check for updates, then *Restart to update* with no game running. The Privacy
|
||||
Policy (2.8) is shown once for you to accept. Every game is read once more for its engine (detection rules `2026.10.2`).
|
||||
The agent removes the entries of games you uninstalled that have no sessions, about ten minutes after it sees them gone —
|
||||
turn **Settings ▸ Data ▸ Remove uninstalled games** off first if you want them kept. An entry an earlier import made for a
|
||||
helper is not changed: re-point it with *Change executable…*.
|
||||
|
||||
### Added
|
||||
|
||||
- **The engine version of Unity, Godot and RPG Maker games**, as Unreal Engine's has been shown since beta.10 — on the game's
|
||||
@@ -61,7 +152,8 @@ numeric core and does not move; the heading is the full version — corrected 20
|
||||
deeper) and the import took it as the game. A helper named by the store is skipped now and the executable is guessed —
|
||||
the import list says so — and the guess takes the executable beside NW.js's `nw.dll` and `package.json`, the process
|
||||
that draws (`css\Game.exe` there; its launcher asks for administrator, so it is measured with *Run the agent as
|
||||
administrator* on). The import also no longer offers a store's game again when the library has it at another
|
||||
administrator* on — *withdrawn 2026-10-13: that launcher is malware, do not run it; [0.1.0-beta.21]'s Security*). The
|
||||
import also no longer offers a store's game again when the library has it at another
|
||||
executable: an entry already there is re-pointed with *Change executable…* (`docs/05_DETECTION.md` §Library import).
|
||||
- **The Games page shows its newest read of the library.** When two reads overlapped — a session ending while an import
|
||||
added games — the one that started first could finish last and be shown, an older list until the next read.
|
||||
|
||||
@@ -16,7 +16,7 @@ A C++ DLL (`FrameLedger.Overlay.dll`) is injected into games the user explicitly
|
||||
> **Amended 2026-09-22 (owner decision): the override of 2026-09-21 is withdrawn, and the sentence above is the rule again.** For one day (releases `0.1.0-beta.3` and `beta.4`) a per-game override existed. The owner withdrew it: no entry point, no message, no column (schema 0008 drops 0007's five), no string. Do not add one in any form.
|
||||
>
|
||||
> **A finding turns the game's hooking off** (`19_SAFETY` §What a finding does to the game). An anti-cheat named in the game itself — its process, its title lists, its folder — is written to the row exactly as the pre-scan always wrote it (`hook_enabled = 0`, `hook_blocked_reason`, `hook_prescan_state = 'blocked'`), and since 2026-09-22 also when the guard finds it at a session's start or at the 30 s re-scan (`AntiCheatVerdict.IsFindingAboutTheGame`). A machine-wide driver or service refuses that session only. The notice, the game's page, the session's notes and the Agent's log all say it happened. Nothing clears the block, as before.
|
||||
> **Amended 2026-09-26 (owner decision D33): one narrow, evidence-bound exception.** Asked with the 2026-09-22 withdrawal and this rule quoted back, the owner chose a per-game exception for anti-cheat that is **user-mode throughout** — a Settings option off by default, then the user ticks each eligible game through a versioned disclosure (bans are possible and can arrive days later). Eligible only when every finding about the game is `BlockedModule` / `AntiCheatFile` / `AntiCheatDirectory` of ONE family whose floor-and-file footprint has no driver, service or `.sys` (`fl::guard::FamilyIsUserModeOnly` — the GUARD decides, from a family NAME the caller passes), no `.sys` is anywhere in the install tree, no title list names the game, and the ledger holds ≥ 2 successful Tier-1 sessions of it. Drivers, services, title lists, the `.sys` rule, the fuzzy tier, scan failures, `TargetUnreadable`, 32-bit, the kill switch and Vulkan are never excepted. The guard runs every check and keeps scanning past the tolerated family (`kAllowedUserModeException`, reason 28); the Overlay learns the family from `Local\FrameLedger.Tolerate.<pid>` before its loader detour exists. A new finding, a crash / safety unhook / floor stop under it, or an executable change ends it; the block is never cleared. **No other form of override is to be added** (`19_SAFETY` §The user-mode exception).
|
||||
> **Amended 2026-09-26 (owner decision D33): one narrow, evidence-bound exception.** Asked with the 2026-09-22 withdrawal and this rule quoted back, the owner chose a per-game exception for anti-cheat that is **user-mode throughout** — a Settings option off by default, then the user ticks each eligible game through a versioned disclosure (bans are possible and can arrive days later). Eligible only when every finding about the game is `BlockedModule` / `AntiCheatFile` / `AntiCheatDirectory` of ONE family whose floor-and-file footprint has no driver, service or `.sys` (`fl::guard::FamilyIsUserModeOnly` — the GUARD decides, from a family NAME the caller passes), no `.sys` is anywhere in the install tree *(within check 4's reach: three levels under the install root and, since 2026-10-13, under the executable's own folder)*, no title list names the game, and the ledger holds ≥ 2 successful Tier-1 sessions of it. Drivers, services, title lists, the `.sys` rule, the fuzzy tier, scan failures, `TargetUnreadable`, 32-bit, the kill switch and Vulkan are never excepted. The guard runs every check and keeps scanning past the tolerated family (`kAllowedUserModeException`, reason 28); the Overlay learns the family from `Local\FrameLedger.Tolerate.<pid>` before its loader detour exists. A new finding, a crash / safety unhook / floor stop under it, or an executable change ends it; the block is never cleared. **No other form of override is to be added** (`19_SAFETY` §The user-mode exception).
|
||||
> **Amended 2026-10-03 (owner decision D38): the evidence moved from before the grant to its trial.** "≥ 2 successful Tier-1 sessions" above could never be met by a game blocked at add time — since beta.8 that is every blocked game — nor after a ledger reset. Asked with that, the owner chose: a grant needs no session; the first two hooked sessions under it are a trial, and any end during the trial (a crash, a safety unhook, a floor stop, a new finding, or a stored hooked session with no frames or an abnormal exit) ends the exception **for good** (`games.ac_exception_trial_failed_at`, schema 0017, never cleared). Every other condition above is unchanged, and so is the last sentence.
|
||||
3. **Never implement evasion.** No manual mapping, no PE header erasure, no thread hiding, no signature obfuscation, no unlinking from the PEB module list. Injection uses documented `LoadLibraryW`. The DLL keeps its real name, real exports, and version info. A performance tool must be *visible* to anti-cheat, not hidden from it. Any PR that makes FrameLedger harder to detect is rejected on principle.
|
||||
4. **Never read or write game memory outside our own hooks.** We read arguments passed to APIs we hooked and COM/handle objects we legitimately own. No pattern scanning for game internals, no reading player/entity state, no writing to game memory. Ever.
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
<ItemGroup Label="Analyzers (build-time only)">
|
||||
<PackageVersion Include="Roslynator.Analyzers" Version="5.0.1" />
|
||||
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.294" />
|
||||
<PackageVersion Include="Meziantou.Analyzer" Version="3.0.299" />
|
||||
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="18.7.23" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
+18
-3
@@ -5,7 +5,7 @@ hooking on for — and reading the graphics calls the game makes. That is why it
|
||||
resolution, the upscaler, frame generation and ray tracing apart. It is also where its limits come from. This
|
||||
page lists them in plain words; each item links to the document that has the details.
|
||||
|
||||
*Beta software: this page describes version 0.1.0-beta.18.*
|
||||
*Beta software: this page describes version 0.1.0-beta.21.*
|
||||
|
||||
## Games it will not measure
|
||||
|
||||
@@ -21,7 +21,8 @@ page lists them in plain words; each item links to the document that has the det
|
||||
- **32-bit games and Direct3D 9 games.** Only 64-bit Direct3D 11, Direct3D 12 and OpenGL games are measured
|
||||
from their own calls; a 32-bit or Direct3D 9 game is recorded without measurement.
|
||||
- **Vulkan games, unless FrameLedger starts them.** A Vulkan game is measured only when FrameLedger launches it
|
||||
with its Vulkan layer switched on; one started another way is not observed by the layer.
|
||||
with its Vulkan layer switched on — **Play** set to *Start directly* does; one started another way is not observed by
|
||||
the layer.
|
||||
- **Games that run as administrator,** unless you turn on *Run the agent as administrator* in Settings
|
||||
(off by default; Windows asks every time the agent starts). **A process Windows protects** stays closed
|
||||
either way.
|
||||
@@ -122,7 +123,9 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
|
||||
Unity's player library or data file, Godot's data pack, RPG Maker's core script or the runtime library its `Game.ini`
|
||||
names. A Unity game whose data file is encrypted shows the version without its release letter (`2019.4.40`, not
|
||||
`2019.4.40f1`); an XP, VX or VX Ace game shows its runtime library's number, which is not the editor's.
|
||||
**RPG Maker 2000 and 2003 are not recognised.** Other engines show a version only where their files state one.
|
||||
**RPG Maker 2000 and 2003 are not recognised.**
|
||||
- Since beta.20 also **Ren'Py**: from the engine's own version file (`renpy/vc_version.py`); a Ren'Py game whose engine
|
||||
names no version there shows none. Other engines show a version only where their files state one.
|
||||
([Detection](docs/05_DETECTION.md))
|
||||
|
||||
## Sensors
|
||||
@@ -161,6 +164,18 @@ you accept the prompt. Turn it on only if you trust everything that runs under y
|
||||
GeForce RTX 5080 with an Intel Core i7-14700KF on Windows 11); other hardware is untested.
|
||||
- **No real Vulkan or OpenGL game has been measured yet** — only FrameLedger's own test program.
|
||||
- There is **no in-game overlay**; everything is shown in the FrameLedger window.
|
||||
- **FrameLedger does not tell whether a game is safe to run.** It reads a game's files to find its engine and its
|
||||
anti-cheat, never to judge it, and recording or measuring a game vouches for nothing. Four itch.io downloads this
|
||||
project once used as examples turned out to carry malware ([details](docs/spike-notes.md)).
|
||||
|
||||
## Play
|
||||
|
||||
- **Through GOG GALAXY or itch, you finish in their app.** GOG GALAXY runs the game as its own shortcuts do, and the
|
||||
itch app asks which copy to launch. The Epic Games Launcher's link is the one its own shortcuts carry, and has not
|
||||
been tried on a real Epic game yet.
|
||||
- **FrameLedger never starts a game as administrator.** *Start directly* does not start a game that asks for it — start
|
||||
that one from its store or its own shortcut — nor a game whose recording is off: FrameLedger starts only what it
|
||||
records. While FrameLedger itself runs as administrator, Play starts every game directly, with your standard rights.
|
||||
|
||||
## Your data
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ guide, Help ▸ Limitations), and on the project's [wiki](https://github.com/pol
|
||||
pages.
|
||||
|
||||
<!-- accuracy-block:begin -->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.18`** (2026-10-07), an unsigned installer built from that tag with its
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-13.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.21`** (2026-10-13), an unsigned installer built from that tag with its
|
||||
> checksums published beside it. The source holds the desktop app
|
||||
> (library, store import, charts, settings) and the background Agent, which records a session when a
|
||||
> game in the library runs (unless you switched its recording off), injects only into games you enabled
|
||||
@@ -21,8 +21,9 @@ pages.
|
||||
>
|
||||
> - **Frame times and output resolution:** measured from the present call for Direct3D 11/12 and
|
||||
> OpenGL titles FrameLedger injects into. Vulkan titles are measured only when FrameLedger itself
|
||||
> starts the game with its Vulkan layer enabled, which today only the Agent's command-line launch
|
||||
> does. A Vulkan title started any other way is not observed by the layer; FrameLedger injects its
|
||||
> starts the game with its Vulkan layer enabled, which the Play button set to *Start directly* (since
|
||||
> beta.21) and the Agent's command-line launch do. A Vulkan title started any other way is not
|
||||
> observed by the layer; FrameLedger injects its
|
||||
> Direct3D component into it instead, and what that records on a Vulkan title has not been
|
||||
> verified. Direct3D 9 and every 32-bit title are not measured.
|
||||
> - **Which upscaler is running:** measured from the API a Direct3D title calls — DLSS or NIS through
|
||||
@@ -66,8 +67,8 @@ pages.
|
||||
> labelled with what it rests on; `N/A` where the executable names none. Since beta.19 also Unity's (from its
|
||||
> player library or its data file — without the release letter where only the library's number is readable),
|
||||
> Godot's (from its data pack) and RPG Maker's maker and version (MV and MZ from their core script; XP, VX and VX
|
||||
> Ace by their runtime library's version, which is not the editor's). RPG Maker 2000/2003 is not detected. Other
|
||||
> engines show what their own files state.
|
||||
> Ace by their runtime library's version, which is not the editor's). RPG Maker 2000/2003 is not detected. Since
|
||||
> beta.20 also Ren'Py's (from its engine's version file). Other engines show what their own files state.
|
||||
> - **The game's own memory (since beta.12):** its dedicated and shared GPU memory and its private
|
||||
> working set — the numbers Task Manager's Details tab shows — with its working set and commit, read
|
||||
> once a second from Windows' own counters, from outside the game, in every session: a game
|
||||
@@ -166,7 +167,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
|
||||
|
||||
## Install
|
||||
|
||||
> **The latest pre-release is `v0.1.0-beta.18` (2026-10-07); before it `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read `CHANGELOG.md`'s section for the one you install — what it measures, what it does not yet, and how to update — before installing. A source build is `docs/12_BUILD.md`.
|
||||
> **The latest pre-release is `v0.1.0-beta.21` (2026-10-13); before it `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read `CHANGELOG.md`'s section for the one you install — what it measures, what it does not yet, and how to update — before installing. A source build is `docs/12_BUILD.md`.
|
||||
|
||||
1. Download the latest `FrameLedger.App-win-Setup.exe` from [Releases](https://github.com/poli0981/frameledger/releases). It installs into `%LOCALAPPDATA%\FrameLedger.App`; your data stays in `%LOCALAPPDATA%\FrameLedger`, and uninstalling asks before touching it.
|
||||
2. SmartScreen may warn — releases are not code-signed (free, open-source project). Verify the SHA-256 checksum published with each release, then **More info → Run anyway**.
|
||||
@@ -215,4 +216,4 @@ GPU telemetry is layered so the project never depends on a proprietary vendor li
|
||||
|
||||
---
|
||||
|
||||
**Status:** pre-release (beta). Eighteen tagged pre-releases so far; see `CHANGELOG.md` for what each one changed and the accuracy block at the top of this file for what is and is not measured. It is not feature-complete, it certainly still has bugs, and `legal/DISCLAIMER.md` §0 says what that means for you.
|
||||
**Status:** pre-release (beta). Twenty-one tagged pre-releases so far; see `CHANGELOG.md` for what each one changed and the accuracy block at the top of this file for what is and is not measured. It is not feature-complete, it certainly still has bugs, and `legal/DISCLAIMER.md` §0 says what that means for you.
|
||||
+2
-1
@@ -12,6 +12,7 @@ Requirement IDs (`FR-x`, `NFR-x`) are referenced by other docs, commits, and tes
|
||||
- FR-1.5 "Supports" row shows shipped-capability hints (DLSS/FSR/XeSS/FG) — visually distinct from measured per-session values (`05_DETECTION` §Capability hints).
|
||||
- FR-1.7 Delete all sessions (beta.11, owner decision D40): of one game from its page, or of every game from Settings ▸ Data, after a confirmation that says how many — with their frame and sensor series and notes; the library, the settings and every consent stay. The Agent deletes them (the rows are its, `06_DATA_MODEL` §Writer ownership) and refuses while a session it would delete under is being recorded.
|
||||
- FR-1.8 Uninstalled games leave the library by themselves (beta.19, owner decision D55, amending D41): an entry whose executable has been gone for ten minutes — its drive connected and the folder it was installed in still there, so an unplugged or re-lettered drive never counts, and neither does a folder Windows will not list (`ExecutablePresenceProbeTests`) — and that has no session (stored, being recorded or waiting to be recovered) is removed by the Agent, behind Settings ▸ Data ▸ *Remove uninstalled games* (on by default). Never an entry carrying an anti-cheat block, an exception or a failed-trial mark (FR-2.2, rule 2). The App is told (`GameRemoved`).
|
||||
- FR-1.9 Play (beta.21, owner decision D59): a game's page and each library entry start the game — through the app of the store whose own records name its folder (Steam, the Epic Games Launcher, GOG GALAXY, itch), or by the agent's launch mode (FR-3.2), as Settings ▸ Games says; never as administrator, and never in a viewer (`08_UI` §Games).
|
||||
- FR-1.6 Recording switch per entry (2026-09-23, HANDOFF D29): off, the program is not watched at all — no session, no measurement, no injection — and a session of it that is running stops. On by default; entries an old import made for Steam's own tools start with it off. The library card says "Not recorded".
|
||||
|
||||
### FR-2 Hooking consent & control (new, safety-critical — see `19_SAFETY`)
|
||||
@@ -26,7 +27,7 @@ Requirement IDs (`FR-x`, `NFR-x`) are referenced by other docs, commits, and tes
|
||||
|
||||
### FR-3 Session capture
|
||||
- FR-3.1 Watcher detects tracked exe launches (1 Hz) and captures automatically at the highest permitted tier.
|
||||
- FR-3.2 Launch mode: start the game from FrameLedger for suspended-launch injection (catches startup-time upscaler init).
|
||||
- FR-3.2 Launch mode: start the game from FrameLedger for suspended-launch injection (catches startup-time upscaler init). *(The App reaches it since beta.21: Play set to Start directly sends `LaunchGame` — FR-1.9.)*
|
||||
- FR-3.3 Attach mode for games launched externally; sessions flagged `late_attach`.
|
||||
- FR-3.4 Track the process tree; capture the descendant that actually presents.
|
||||
- FR-3.5 Per-frame records for the whole session; telemetry at 1 Hz (configurable 0.5–2 s).
|
||||
|
||||
+1
-1
@@ -186,7 +186,7 @@ which makes the notification more important than it was, not less.
|
||||
|
||||
## Launch mode vs attach mode
|
||||
|
||||
**Launch mode (preferred).** User starts the game from FrameLedger ~~(or FrameLedger is set as the launch wrapper)~~ *(corrected 2026-10-04: no wrapper exists, and no App button sends `LaunchGame` yet — the pipe command has no caller; launch mode runs from the Agent's developer verb `--console launch --exe`)*: `CreateProcess(CREATE_SUSPENDED)` → guard → inject → `ResumeThread`. Catches swapchain creation and upscaler init, which attach mode can miss entirely — a game that creates its DLSS feature during startup will otherwise report `upscaler = unknown` for the whole session.
|
||||
**Launch mode (preferred).** User starts the game from FrameLedger ~~(or FrameLedger is set as the launch wrapper)~~ *(corrected 2026-10-04: no wrapper exists, and no App button sends `LaunchGame` yet — the pipe command has no caller; launch mode runs from the Agent's developer verb `--console launch --exe`. Since beta.21 one does: **Play** set to *Start directly* — D59, `08_UI` §Games)*: `CreateProcess(CREATE_SUSPENDED)` → guard → inject → `ResumeThread`. Catches swapchain creation and upscaler init, which attach mode can miss entirely — a game that creates its DLSS feature during startup will otherwise report `upscaler = unknown` for the whole session.
|
||||
|
||||
> **An elevated Agent starts the game as a standard user (beta.10, the admin mode, D34).** `ProcessLauncher` checks its
|
||||
> own token: elevated, it starts the game with the desktop shell's token (`Infrastructure.Startup.UnelevatedProcess` —
|
||||
|
||||
+33
-6
@@ -277,7 +277,8 @@ the game's files* once the sweep has read a row of these engines and found none.
|
||||
**Where it is read.** Beside the row's executable first: `UnityPlayer.dll` (else the shallowest one the walk listed) and
|
||||
`<exe>_Data` (else a `*_Data` beside that player); `<exe>.pck`. RPG Maker's files are looked for beside the executable and
|
||||
up to two folders above it, as `RpgMakerTitle` already looked for a title — a launcher-fronted game keeps its runtime in
|
||||
a subfolder (A Doll's Locket's `css\`, HELLO, HELLO WORLD!'s `swiftshader\`); a `Library=` that points outside the ini's
|
||||
a subfolder (A Doll's Locket's `css\`, HELLO, HELLO WORLD!'s `swiftshader\` — *both "launchers" are malware, D57,
|
||||
`spike-notes.md` §20*); a `Library=` that points outside the ini's
|
||||
folder is named and not read. Version resources and at most a few kilobytes of any file; the whole detection of one entry
|
||||
measured 24 ms to 4.1 s on the owner's USB drive, nearly all of it the install's walk, once per executable and rules
|
||||
version. The Privacy Policy says so since 2.8 (§4).
|
||||
@@ -287,6 +288,26 @@ read by the VX Ace rule's reader unmeasured. A Unity build older than 2019 keeps
|
||||
`UnityPlayer.dll`): its data file's header is the only witness. Rules `2026.10.2` change the detection key, so every
|
||||
library entry is read again once; a Unity row keeps the old raw string only if none of its witnesses can be read now.
|
||||
|
||||
### Engine version — Ren'Py (beta.20, 2026-10-12, rules 2026.10.3)
|
||||
|
||||
The owner asked for the version of Ren'Py games once beta.19's were on screen. The `renpy` rule had no version extractor
|
||||
(`version: null`). Ren'Py ships its engine as Python beside the game's launcher, and `renpy/vc_version.py` names its
|
||||
release — `version = '8.5.0.25111603'`, beside `branch`, `nightly`, `official` and `version_name`. Measured 2026-10-12 on
|
||||
the owner's one Ren'Py install, Bound Between Desks (Steam): 109 bytes, and the game's own `log.txt` printed
|
||||
`Ren'Py 8.5.0.25111603` at its last start; the launcher carries no version resource (`spike-notes` §18).
|
||||
|
||||
**What is read and how it is decided.** `renpy_build` (`RenPyBuildReader`): the first 4 KiB of `renpy/vc_version.py`
|
||||
beside the row's executable, its `version` line only (`version_name` is not it). `RenPyVersion.Decide` keeps
|
||||
MAJOR.MINOR.PATCH — Ren'Py names its releases by those three; the fourth is the build — and records `renpy_vc_version`.
|
||||
The page says *Ren'Py 8.5.0* and that it was read from the engine's version file; a Ren'Py row whose file names no
|
||||
version says *Not found in the game's files*. Through the shipped pipeline (`StaticGameDetector` over `GameFileProbe`)
|
||||
Bound Between Desks read `8.5.0` in 79 ms, and the Unity, Godot and RPG Maker installs read as before. The Privacy
|
||||
Policy names the file since 2.9 (§4). Rules `2026.10.3` change the detection key, so every library entry is read again
|
||||
once.
|
||||
|
||||
**What it is not.** Nothing else is guessed from: a Ren'Py game whose `vc_version.py` names no version, or that ships its
|
||||
engine compiled only, reads as not found. One Ren'Py install was measured.
|
||||
|
||||
### Platform signatures & metadata
|
||||
|
||||
| Platform | Signals | Metadata |
|
||||
@@ -339,7 +360,12 @@ library entry is read again once; a Unity row keeps the old raw string only if n
|
||||
> toast helper. The pick was **butler's verdict**, taken as is: butler stores a *filtered* verdict (the shallowest
|
||||
> candidates, minus those whose manifest asks for elevation) and does not rank what is left, and on that install the
|
||||
> 213 MB `DollsLocket.exe` launcher asks for administrator while the NW.js runtime sits a level deeper in `css\`, so the
|
||||
> helper was the whole verdict (read from the owner's `butler.db`, read-only). Three changes:
|
||||
> helper was the whole verdict (read from the owner's `butler.db`, read-only). *(Corrected 2026-10-13, owner decision
|
||||
> D57: that "launcher" — the same 213 MB program HELLO, HELLO WORLD!, City of Bones and Träumerei put in front of their
|
||||
> runtime — is malware: it ships a registry file that switches off Windows' script scanning and adds Microsoft Defender
|
||||
> exclusions (`spike-notes.md` §20). Do not run it. The admin-mode sentence below is withdrawn; the three changes stand
|
||||
> as rules about helpers and NW.js layouts, and the import still takes a store's own pick when it is not a helper.)*
|
||||
> Three changes:
|
||||
> **(1)** a verdict candidate whose whole name is a runtime helper (`ExecutableLocator.RuntimeHelperNames`:
|
||||
> `notification_helper`, `crashpad_handler`, `UnityCrashHandler64/32`, `CrashReportClient`, NW.js's `nwjc` and
|
||||
> `chromedriver`) or that sits in a Unity plugin folder is skipped, and with nothing left the locator guesses and the
|
||||
@@ -349,8 +375,9 @@ library entry is read again once; a Unity row keeps the old raw string only if n
|
||||
> rule's own signal — as an NW.js runtime (owner decision D56), below the Unity and Unreal layouts (an NW.js folder can
|
||||
> be a tool shipped beside such a game) and above a name match (the launcher in front of the runtime is named after the
|
||||
> install): the install's guess is `css\Game.exe`, the process that draws, as D28 pointed HELLO, HELLO WORLD!'s entry at
|
||||
> its runtime by hand. That runtime starts elevated (its launcher asks for administrator), so it is measured with the
|
||||
> admin mode on (D34). **(3)** Discovery matches a store title to an entry by **platform + store id** as well as by
|
||||
> its runtime by hand. ~~That runtime starts elevated (its launcher asks for administrator), so it is measured with the
|
||||
> admin mode on (D34).~~ *(Withdrawn 2026-10-13, D57: it starts elevated because the malware in front of it asks for
|
||||
> administrator.)* **(3)** Discovery matches a store title to an entry by **platform + store id** as well as by
|
||||
> path: the entry an earlier import made at another executable is "already in the library" (the log names its path),
|
||||
> so a corrected guess never adds the same game a second time — that entry is re-pointed with Change executable…, and
|
||||
> nothing rewrites it by itself (D25/D27). Tests: `ExecutableLocatorTests.AnNwjsRuntimeBeatsTheLauncherNamedAfterTheInstallAndItsHelpersAreDropped`,
|
||||
@@ -414,12 +441,12 @@ it does not claim who loaded it.
|
||||
|
||||
Before a game is ever launched with hooking enabled, the static scan checks for anti-cheat SDKs shipped alongside it (`EasyAntiCheat/` directory, BattlEye binaries, EOS anti-cheat components, etc.). A hit **disables the hooking toggle for that game entirely** in the UI, with an explanation — the user cannot enable it, so the guard never even has to fire at launch. Prevention beats interception.
|
||||
|
||||
**Implemented in the native guard, not here** (`fl_prescan.cpp`, exposed as ~~`FlStaticPreScan`~~ `FlStaticPreScanGame` since 2026-09-25, which takes the executable, resolves the install root itself and runs check 3 as well). It uses the same `MatchName` and the same rules file as the injection guard, matching directory names against the `anticheat.directories` group and file names against `anticheat.files`. Nothing managed matches a blocklist (§S15 item 1).
|
||||
**Implemented in the native guard, not here** (`fl_prescan.cpp`, exposed as ~~`FlStaticPreScan`~~ `FlStaticPreScanGame` since 2026-09-25, which takes the executable, resolves the install root itself and runs check 3 as well). It uses the same `MatchName` and the same rules file as the injection guard, matching directory names against the `anticheat.directories` group and file names against `anticheat.files`. Nothing managed matches a blocklist (§S15 item 1). **It walks two folders since 2026-10-13:** the install root and, when the executable lives below it, the executable's own folder — each three levels deep. The root alone missed Wuthering Waves' `Client\Binaries\Win64\AntiCheatExpert\`, which sits beside the executable and four levels under the root (`19_SAFETY` §Pre-injection checks, item 4; `spike-notes.md` §19).
|
||||
|
||||
Three things this section previously implied that are not true, and are worth stating:
|
||||
|
||||
- **The UI answer is advisory.** It decides whether the toggle is *offered*; it does not gate injection. The same scan runs a second time inside the guard's chokepoint against a directory derived from the target's own pid, so "prevention beats interception" is a convenience, not the enforcement.
|
||||
- **A hit disables the toggle; "could not scan" must not.** The scan is tri-state. `Reason::kPreScanFailed` — directory absent, unlistable, past a bound, or behind a reparse point — is *neither* a hit nor a pass. It must surface as "could not verify", distinct from "anti-cheat found": disabling the toggle on it would be a false refusal with no appeal, and clearing it would be a fail-open.
|
||||
- **A hit disables the toggle; "could not scan" must not.** The scan is tri-state. `Reason::kPreScanFailed` — directory absent, unlistable, past the entry bound, or behind a reparse point — is *neither* a hit nor a pass. *("Past a bound" until 2026-10-13: the depth bound is a reach, not a refusal — a folder at the last level is named and never opened, and the walk still reads as complete.)* It must surface as "could not verify", distinct from "anti-cheat found": disabling the toggle on it would be a false refusal with no appeal, and clearing it would be a fail-open.
|
||||
- **The token list is thin.** `directories` and `files` ~~carry three tokens today~~ *(corrected 2026-10-04: rules 2026.10.1 carry 9 directory families (12 names) and 18 file families (55 names), and since 2026-09-25 any `*.sys` in the install tree is a finding by code, not data)*. Widening needs verified names; a guessed token fails closed by never firing, which is a silent hole (`19_SAFETY` §Blocklist seed).
|
||||
|
||||
## Caching & privacy constraints
|
||||
|
||||
@@ -49,7 +49,8 @@ CREATE TABLE games (
|
||||
-- (schema 0015, ALTERed last) engine_version_source TEXT: where engine_version came from — a
|
||||
-- Domain.Detection.EngineVersionSource id (unreal_branch_file | unreal_branch | unreal_file_version; since beta.19
|
||||
-- unity_player | unity_data | unity_player_file | godot_pck | godot_pck_embedded | godot_exe | rpgmaker_mz_core |
|
||||
-- rpgmaker_mv_core | rgss1_library | rgss2_library | rgss3_library — the RPG Maker ids also name the maker; or the
|
||||
-- rpgmaker_mv_core | rgss1_library | rgss2_library | rgss3_library — the RPG Maker ids also name the maker; since
|
||||
-- beta.20 renpy_vc_version; or the
|
||||
-- rule's extractor type); NULL for a version the user typed. Written with the version only (05_DETECTION §Engine version)
|
||||
publisher TEXT, game_version TEXT,
|
||||
cover_path TEXT, notes TEXT,
|
||||
@@ -435,7 +436,8 @@ switch's rule); integers are invariant-culture within an inclusive range; choice
|
||||
| `ui.fps_decimals` | bool | `0` | | UI (beta.8, 2026-09-25): every FPS figure with two decimals ("62.40") instead of a whole number |
|
||||
| `ui.hide_scrollbars` | bool | `0` | | UI (beta.14, 2026-10-05): no scroll bar drawn anywhere; every scroller still scrolls with the wheel, the keyboard and touch (`App.Services.ScrollBarHiding`, `08_UI` §Settings) |
|
||||
| `ui.library_view` | choice `grid`\|`list` | `grid` | | UI (beta.11, 2026-10-03): the Games library as a grid of cards that fills the width, or as a list; written by the page's own switch, no Settings row (`08_UI` §Games) |
|
||||
| `capture.background` | bool | `1` | | ~~Agent~~ nobody *(corrected 2026-10-04: no Agent code ever read it, so the watcher recorded every tracked game whatever it said; beta.12 removed its switch from Settings and reserved the key — `SettingsRegistry.CaptureBackground`)* |
|
||||
| `ui.play_mode` | choice `store`\|`direct` | `store` | | UI (beta.21, owner decision D59): what Play does — `store` hands the game to the app of the store whose own records name its folder, and the agent starts it where none does; `direct` has the agent start it (`LaunchGame`, launch mode). Settings ▸ Games (`08_UI` §Games) |
|
||||
| `capture.background` | bool | `1` | | ~~Agent~~ nobody *(corrected 2026-10-04: no Agent code ever read it, so the watcher recorded every tracked game whatever it said; beta.12 removed its switch from Settings and reserved the key — `SettingsRegistry.CaptureBackground`. Since beta.21 the App can start a game (Play), and the key stays reserved: a game Play starts is recorded as any other start)* |
|
||||
| `hooking.kill_switch` | bool | `0` | | Agent (FR-2.4, since P2 PR-F) |
|
||||
| `hooking.usermode_ac_exceptions` | bool | `0` | | Agent, at every session start and command (FR-2.8, D33, 2026-09-26): off suspends every user-mode exception without deleting any; on, the user still grants each eligible game |
|
||||
| `capture.run_elevated` | bool | `0` | | The App when it starts the Agent, and an Agent the logon task started — both BEFORE the Agent exists, through `Infrastructure.Startup.RunElevatedSetting` (one row, `PRAGMA query_only`, no version gate, anything but `1` is off) (D34, beta.10): on, Windows is asked for administrator rights at every Agent start (`01_ARCHITECTURE` ADR-9) |
|
||||
|
||||
+1
-1
@@ -393,7 +393,7 @@ Unchanged in spirit from v1, bumped to `v2` for the new message set.
|
||||
| `Hello` | UI→A | `{ appVersion, protocol: 2 }` → `HelloAck { agentVersion, protocol, pid, elevated, overlayBuildId, vulkanLayerRegistered, telemetrySource /* composite, e.g. l1+lhm+nvapi */, cpuTempAvailable, disclosureVersion /* P3 PR-4, D14: the FR-2.1 text this Agent stamps against */, exceptionDisclosureVersion /* D33, 2026-09-26: the user-mode exception's disclosure this Agent grants against */, elevationOutcome /* beta.10, D34: the admin mode's answer at this start — granted, declined, other-account, failed — or null when nobody asked */, ~~etwAvailable~~ }` — `etwAvailable` struck 2026-09-13 with the tier it described (2026-08-28); `pid` added. ~~`vulkanLayerRegistered` is **false by construction** today (the layer is per-launch, never registered)~~ `vulkanLayerRegistered` is the HKCU implicit-layer registration as the Agent found it at start *(corrected 2026-10-04: since P3 PR-8b; true while `VkLayerReconciler` keeps the layer registered for a hook-enabled Vulkan game, P4 PR-2)* and `cpuTempAvailable` false unelevated; `telemetrySource` is the composite stood up once on the first `Hello` |
|
||||
| `GetStatus` | UI→A | → `StatusAck { state, activeSession?, tier? }` — and `activeSessions[]`, one `{ sessionGuid, gameId, gameName?, pid, tier, startedAt, hold? }` per running session. **`hold` added 2026-09-23, optional:** present on a session held unhooked (Tier 2), with the same words `SessionStarted.hold` carries; a session listed at tier 2 WITHOUT a `hold` has not attached yet — it is starting, not held. The App reads this list on every (re)connect (§Client behavior) |
|
||||
| `SetWatchlist` | UI→A | `{ entries: [{ gameId?, exePath }] }` — ~~full replace~~ **ensure, never remove** (built 2026-09-13, PR-1b): each entry's path is normalised by the Agent, its row ensured with hooking OFF when new, and the ack is `WatchlistAck { games: [{ gameId, exePath, name }], unreadable: [exePath] }`; `gameId` in a request is a hint and never trusted over the path. UI re-sends on connect. **Carries no hooking state** (see §The pipe is not a trust boundary). *Since the App writes `games` rows itself under `06_DATA_MODEL` §Writer ownership (HANDOFF §P3 D15), this is the pipe's way of adding a row, not the only one; the watcher reads the table at 1 Hz either way.* |
|
||||
| `LaunchGame` | UI→A | `{ gameId, arguments? }` → ~~suspended-launch~~ launch mode as built ("inject late", `04_CAPTURE` §Launch mode) → `LaunchAck { gameId, accepted, outcome, sessionGuid? }` — `outcome` is `Accepted` · `UnknownGame` · `SessionRunning` (one per game at a time) · `Unavailable` · `RecordingOff` (2026-09-23: the entry's recording switch is off, FR-1.6 — FrameLedger does not start what it will not record). *(Built 2026-09-13, PR-1b: `CaptureOrchestrator.LaunchAsync` over an `ILaunchRecorderFactory` the Agent composes with the Vulkan layer's environment — or none when FR-2.4's switch is on — and the launcher election runs after, as the console's `launch` does; the elected session is not addressable by the launch's guid.)* |
|
||||
| `LaunchGame` | UI→A *(the App sends it since beta.21: Play in its Start directly mode, and in the store mode where no store installed the game — `App.Services.GamePlayer`, D59)* | `{ gameId, arguments? }` → ~~suspended-launch~~ launch mode as built ("inject late", `04_CAPTURE` §Launch mode) → `LaunchAck { gameId, accepted, outcome, sessionGuid? }` — `outcome` is `Accepted` · `UnknownGame` · `SessionRunning` (one per game at a time) · `Unavailable` · `RecordingOff` (2026-09-23: the entry's recording switch is off, FR-1.6 — FrameLedger does not start what it will not record). *(Built 2026-09-13, PR-1b: `CaptureOrchestrator.LaunchAsync` over an `ILaunchRecorderFactory` the Agent composes with the Vulkan layer's environment — or none when FR-2.4's switch is on — and the launcher election runs after, as the console's `launch` does; the elected session is not addressable by the launch's guid.)* |
|
||||
| `SetHookEnabled` | UI→A | `{ gameId, enabled, disclosureVersion? }` — Agent re-runs the static AC pre-scan and may reply `Refused`. **The Agent stamps the consent timestamp itself.** *(Built 2026-09-13, PR-1b, as far as it can be: `enabled: false` → `RevokeAsync` → `HookEnabledAck { gameId, enabled: false, outcome }`; `enabled: true` → the pre-scan of the executable's directory, a refusal or a "could not verify" recorded through `RecordGuardBlockAsync` and answered `Refused { gameId, reason, family?, signal? }`; a clean scan → ~~**`Error DisclosureUnavailable`, nothing stamped** — the reviewed FR-2.1 text does not exist, and a client's `disclosureVersion` is a claim, not a disclosure shown. PR-4 replaces that last branch with the stamp~~ **since PR-4 (2026-09-13): the client's `disclosureVersion` compared with the Agent's own `SafetyDisclosure.Version`; equal → the stamp from the Agent's clock with `ConsentProvenance.ConsentDialog`, answered `HookEnabledAck { enabled, outcome, prescan: "clean" }`; anything else → `Error DisclosureVersionMismatch`, nothing written (D14). `DisclosureUnavailable` remains for a composition that wired no version, which `--serve` never is.)* **Since beta.8 (2026-09-25):** the pre-scan is of the executable (the guard resolves the install root, PR-2 of that train), and BEFORE it an executable known not to run as x64 is answered `Refused { gameId, reason: "ExecutableNotX64", signal: "x86" | "anycpu32" | "arm64" | "arm" }` with nothing scanned and nothing written — not a guard reason and not a block (`05_DETECTION` §What the files say about themselves). **Since D33 (2026-09-26):** for a blocked game whose user-mode exception is in force for the executable on disk (the option on, a grant made on these bytes, the block naming that family) the pre-scan NAMES the family, and a pass under it is stamped as ever and answered `prescan: "exception"`; a finding about the game under it also ends the exception. |
|
||||
| `SetAntiCheatException` | UI→A | **Added 2026-09-26 (D33).** `{ gameId, enabled, disclosureVersion? }` — grant or withdraw a game's user-mode anti-cheat exception (`19_SAFETY` §The user-mode exception). `enabled: false` → the exception ends (`Withdrawn`), hooking goes off while the block stands → `AntiCheatExceptionAck { gameId, granted: false, outcome, family? }`. `enabled: true` → `Error DisclosureVersionMismatch` unless `disclosureVersion` is the Agent's `AntiCheatExceptionDisclosure.Version`; `Error ExceptionsOff` while `hooking.usermode_ac_exceptions` is off; `Refused { reason: "BlockNotExceptionable" }` for a title list or an unreadable block; then the Agent's OWN facts — ~~the successful Tier-1 sessions (`Refused { reason: "TooFewSessions", signal: <count> }` under two)~~ *(D38, 2026-10-03: no session is needed)*; a game an exception of which ended during its trial is refused before anything is scanned (`Refused { reason: "TrialFailed", family, signal: <unix ms> }`); a tolerant pre-scan of the executable on disk naming the block's family (`Refused { reason, family, signal }` unless the guard let exactly that family through) — and the store writes the grant only over facts that make the game eligible, and never over a failed trial → `AntiCheatExceptionAck { granted, outcome, family }`. **A grant turns nothing on**: hooking is FR-2.1's `SetHookEnabled`, afterwards. Not answered (`UnknownType`) by an Agent composed without the exception. |
|
||||
| `PauseCapture` / `ResumeCapture` | UI→A | global → `PauseAck { paused }`; `StatusAck.paused` reports it. *(Built 2026-09-13, PR-1b: one in-memory flag, `CapturePause`, read by every session loop at its tick and told to the ring once per transition; supervision — the guard scan, the kill switch, the safety stop — never pauses. Not persisted: an Agent that restarts resumes.)* |
|
||||
|
||||
+27
-4
@@ -66,7 +66,14 @@ WPF + **WPF UI (Wpf.Ui, Fluent)**. Shell = `ui:FluentWindow` with custom `ui:Tit
|
||||
> off** — a tag is shown as the text it is; **no image is fetched** — its description stands in; a node the renderer
|
||||
> does not know is shown as its own source text, and `MarkdownRendererTests` proves for every embedded document that
|
||||
> no word of its plain text is lost and no table is left as `|---|` source. The GPL's `LICENSE` is not Markdown: it is
|
||||
> shown as written, monospace. Colours and the font are theme resources (`16_WPFUI_SYNTAX` §FlowDocument). Links
|
||||
> shown as written, monospace. Colours and the font are theme resources (`16_WPFUI_SYNTAX` §FlowDocument).
|
||||
> **The wheel and the render, beta.21 (owner request 2026-10-13: "scrolling the documents is slow"):** a notch moves
|
||||
> Windows' *lines to scroll* at a browser's line (100/3 DIP; three lines = 100 DIP, scaled by the zoom; a delta in
|
||||
> proportion, so a touchpad's small deltas move a little; Windows' *one screen at a time* a screen) and eases there in
|
||||
> about 120 ms unless Windows' animations are off — WPF moved a fixed 48 DIP per message, whatever its delta. At its ends
|
||||
> the view leaves the wheel to what holds it (the update notes' dialog), and Ctrl+wheel stays the zoom. A page is
|
||||
> rendered once (`MarkdownView.Show`; three bindings changing ask for one render, ahead of layout), and a view keeps the
|
||||
> last 16 documents it rendered, so going back to a page costs its layout only (`MarkdownViewTests`). Links
|
||||
> follow `Markdown/MarkdownLinks`: http, https and mailto through `IUrlOpener`; `#section` scrolls to the heading
|
||||
> (GitHub's anchors); a relative path resolves against the document's place in the repository and opens in the App
|
||||
> when the window holds that page, on GitHub otherwise — **at this build's own source** (`Services/RepositoryLinks`:
|
||||
@@ -294,7 +301,7 @@ All screens are `Page`s registered with the navigation page provider and navigat
|
||||
- **Game detail:**
|
||||
- Header: cover, name, publisher, version, platform, engine+version, API + Present Mode of last session, `FpsReadout` (lifetime avg), TriState chips, Edit button.
|
||||
- **Two clearly separated rows** (`05_DETECTION` §Capability hints — conflating these was the old design's core mistake):
|
||||
- **Supports** — greyed capability chips from files on disk ("Supports DLSS-G", "Supports XeSS"). Static inference.
|
||||
- **Supports** — greyed capability chips from files on disk ("Supports DLSS-G", "Supports XeSS"). Static inference. With none: *not scanned yet* until the Agent's sweep has read the executable, then *none found* (beta.21 — it read "not scanned yet" for every game that ships none of the files).
|
||||
- **Last session measured** — accent chips with real values ("DLSS Quality · 1440p → 2160p", "Frame Generation DLSS-G ×1.9", "Ray Tracing: Yes"). Measured.
|
||||
- **Hooking control** (`ui:CardControl` with `ToggleSwitch`): off by default. Turning it on opens the consent dialog (FR-2.1). When the static anti-cheat pre-scan blocked it, the switch is **disabled** with the reason shown inline and no way to force it. When auto-disabled after crashes, an `InfoBar` explains and offers manual re-enable.
|
||||
|
||||
@@ -388,8 +395,9 @@ All screens are `Page`s registered with the navigation page provider and navigat
|
||||
> is the newest session that read a driver profile, in the same words; no row where none did. Tests:
|
||||
> `NvidiaOverridesTests`, `GameDetailViewModelTests.TheDetailsCardNamesTheNvidiaAppsOverridesFromTheNewestSessionThatReadThem`.
|
||||
> **The *Engine* row carries the version, and an *Engine version* row says what it was read from** (beta.10 for Unreal;
|
||||
> beta.19 for Unity, Godot and RPG Maker — `05_DETECTION` §Engine version): the player library, the data file's header, a
|
||||
> data pack, a core script or the RGSS library `Game.ini` names, and *Not found in the game's files* once the Agent has
|
||||
> beta.19 for Unity, Godot and RPG Maker; beta.20 for Ren'Py — `05_DETECTION` §Engine version): the player library, the
|
||||
> data file's header, a data pack, a core script, the RGSS library `Game.ini` names or Ren'Py's `renpy/vc_version.py`, and
|
||||
> *Not found in the game's files* once the Agent has
|
||||
> read such a title and found none. RPG Maker's witness names the maker on the page, the subtitle and the library card
|
||||
> (*RPG Maker MZ 1.10.0*, *RPG Maker VX Ace (RGSS 3.0.1)*; `Formats.Engine(id, source)`). Tests:
|
||||
> `GameDetailViewModelTests.TheDetailsCardSaysWhatAUnityGodotOrRpgMakerVersionWasReadFrom`,
|
||||
@@ -495,6 +503,21 @@ All screens are `Page`s registered with the navigation page provider and navigat
|
||||
> rows rank nothing; the percentile axis is 0–100 again (`AutoScale` ran after `SetLimitsX` and undid it); exported
|
||||
> PNGs have an opaque background (`ChartTheme.SavePng`: the window's colour under the transparent figure).
|
||||
|
||||
> **Play, beta.21 (owner decision D59: "1: press Play → the platform opens → it runs; 3: it runs at once; let me switch
|
||||
> between the two").** A **Play** button heads a game's page (before Edit…, Primary) and sits on each library card's
|
||||
> corner — over the card, not inside it, so the card stays one button — and in the list's first column. **Settings ▸
|
||||
> Games ▸ Play button** (`ui.play_mode`): *Through the store* (the default) hands the game to the app of the store whose
|
||||
> own records name its folder — the records the import reads (`Application.Play.StoreRecords`; the row's `platform` is not
|
||||
> trusted, detection may have rewritten it while `store_id` stayed the importer's) — Steam `steam://rungameid/<id>`, the
|
||||
> Epic Games Launcher `com.epicgames.launcher://apps/<ns>%3A<item>%3A<app>?action=launch&silent=true`, GOG GALAXY
|
||||
> `GalaxyClient.exe /command=runGame /gameId=<id> /path="<folder>"`, the itch app `itch://install?game_id=<id>&launch`
|
||||
> (`StoreLaunches`: the forms the stores' own shortcuts and code use, measured on the owner's PC except Epic's; every id
|
||||
> checked against its store's shape before the shell gets it). No store, GOG without GALAXY, or the App itself running as
|
||||
> administrator: the agent starts the game instead, and the notice says why. *Start directly* sends `LaunchGame` (launch
|
||||
> mode): recorded from the first frame, never as administrator, refused for a recording-off entry. A viewer's (D52) Play is
|
||||
> off and its composition holds no `ShellStarter`. Tests: `StoreLaunchesTests`, `StoreRecordsTests`, `GamePlayerTests`,
|
||||
> `ViewerModeTests`.
|
||||
|
||||
### Session summary (secondary `FluentWindow`, also the post-session toast target)
|
||||
Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutter %, duration, **Display** — beta.10: the mode shown longest with its share and the window's size, both tiers; **VRAM (this game)** and **RAM (this game)** — beta.12: the median with the peak beneath, both tiers), **Statistics per series** (beta.12: every stored series' mean / median / minimum / peak), TriState chips, API/PresentMode/upscaler line, **the display line** (beta.10: every mode's share, the changes, the window on its monitor at its refresh rate, the back buffer and swap effect, and what the facts rested on — "the swap chain said whether it was exclusive" or "from the window alone: exclusive fullscreen cannot be told from borderless"; absent for a session recorded before), crash `InfoBar` (Severity=Error) when `crashed`, frametime chart, sensor strip, tags/notes editor, Export buttons.
|
||||
|
||||
|
||||
@@ -250,6 +250,11 @@ On startup and on `ApplicationThemeManager.Changed`: for every live plot set fig
|
||||
A `ContentDialog` whose content should not scroll as a whole sets `ScrollViewer.VerticalScrollBarVisibility="Disabled"`
|
||||
on the dialog: its content row then has the window's height, and a `*` row inside it can hold a list that scrolls alone
|
||||
(`ImportReviewPrompt`).
|
||||
- [ ] **A `ScrollViewer` moves a FIXED 48 DIP per wheel message, whatever its delta** (`ScrollViewer._mouseWheelDelta`,
|
||||
read from .NET 10.0.12; measured on a `FlowDocumentScrollViewer`: deltas of −1, −15, −120 and −360 each moved 48). It
|
||||
ignores Windows' *lines to scroll*, and a precision touchpad's small deltas each jump the whole step — a long document
|
||||
read as slow and jerky while its layout cost about a millisecond a step. `Controls/MarkdownView` handles
|
||||
`PreviewMouseWheel` itself (beta.21): the delta in proportion at Windows' lines, eased, unhandled at its ends.
|
||||
- [ ] **ScottPlot 5 zooms on every wheel and never marks it handled.** Without `Charts/ChartWheel` a wheel over a chart
|
||||
zoomed it and scrolled the page at once; a plain wheel is the page's, Ctrl+wheel the chart's, for every plot that
|
||||
`ChartTheme.Attach` registers.
|
||||
|
||||
@@ -267,13 +267,17 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
|
||||
> be read (a manifest that will not open, more than 4096 of them, a listing error) refuses as `PreScanFailed`. With
|
||||
> nothing listed, nothing is read. Epic has no reader: an Epic install carries no identity to this check.
|
||||
>
|
||||
> **What is listed, and why a title list at all:** 33 Steam app ids and 33 executable names across ten families —
|
||||
> **What is listed, and why a title list at all:** ~~33~~ 34 Steam app ids and 33 executable names across ten families —
|
||||
> Valve VAC (CS2, Dota 2, TF2, Deadlock and Valve's older VAC titles), Riot Vanguard, Roblox Hyperion, Blizzard's
|
||||
> online titles ("Blizzard Warden"), Call of Duty (Activision Ricochet), NetEase (Marvel Rivals, NARAKA, FragPunk,
|
||||
> Once Human), ACE (Delta Force, Arena Breakout: Infinite), HoYoverse and EA (Battlefield 2042/6, EA SPORTS FC 25/26),
|
||||
> and since 2026-10-03 (rules `2026.10.1`, owner's list) HyperTech's **CrackProof** (Umamusume: Pretty Derby
|
||||
> `3224770`, Heaven Burns Red `1973710`, Madoka Magica Magia Exedra `2987800` — Steam ids only: no executable name
|
||||
> was verified, and a guessed one is a false refusal waiting for an unrelated game).
|
||||
> was verified, and a guessed one is a false refusal waiting for an unrelated game). **Since 2026-10-13 (rules
|
||||
> `2026.10.4`, owner decision D58) Wuthering Waves `3513350`, under ACE**, by its Steam id alone (its executable,
|
||||
> `Client-Win64-Shipping.exe`, is a name Unreal games share): its ACE sits beside the executable, where check 4 did
|
||||
> not reach until the same rules (item 4 below), and a session was hooked for 37 s on 2026-10-12 before the 30 s
|
||||
> re-scan met the driver — a machine-wide finding, which turned nothing off (`spike-notes.md` §19).
|
||||
> These are the titles whose anti-cheat leaves nothing of the game's own for checks 1, 2 and 4 to find — VAC runs
|
||||
> inside Steam, Blizzard's scanner is built into the game — or whose kernel driver loads only after the checks run.
|
||||
> CrackProof is the second kind: a Proton log of Umamusume shows its driver loaded from `C:\Windows\System32` under a
|
||||
@@ -337,7 +341,8 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
|
||||
> `ResolveInstallRoot`, plus check 3 on the executable's name and the install's store identity.
|
||||
|
||||
> **Implemented, and stated narrowly.** `fl_prescan.cpp` walks the target's
|
||||
> own directory (derived from its pid, never from a caller-supplied path) to
|
||||
> install root and, since 2026-10-13, its executable's own folder (both derived from its pid, never from a
|
||||
> caller-supplied path — "Which directory" below) to
|
||||
> **depth 3** — raised from 2 on 2026-08-04 (§S22, `spike-notes.md` §13), because a
|
||||
> title shipping its own kernel driver two levels below the install root was
|
||||
> invisible from where the scan starts, so the blocklist row naming it could not
|
||||
@@ -382,6 +387,21 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
|
||||
> appeal. A nested executable outside a recognised store layout is therefore
|
||||
> still scanned narrowly; that residual is stated, not closed.
|
||||
>
|
||||
> **Amended 2026-10-13: the root AND the executable's folder.** The root replaced the executable's folder, and
|
||||
> that was half the answer. The walk reaches three levels below where it starts, and an Unreal executable is
|
||||
> already three below its root, so a folder **beside** the executable is four: MEASURED on Wuthering Waves, whose
|
||||
> Tencent ACE lives in `Client\Binaries\Win64\AntiCheatExpert\` (with `ACE-BASE.sys` and `ACE-CORE.sys` in it). The
|
||||
> walk from the root listed `Win64` and never opened it, so the library pre-scan read the game clean three times,
|
||||
> hooking stayed available, and the first session was hooked for 37 s until the 30 s re-scan met ACE's driver —
|
||||
> machine-wide, so nothing was turned off (`spike-notes.md` §19). Neverness To Everness keeps a second
|
||||
> `AntiCheatExpert\` beside its `HTGame.exe`, six levels down, that no walk had seen either. Check 4 now walks the
|
||||
> root and then, when the executable lives below it, the executable's own folder — same walk, same reach, its own
|
||||
> 4096-entry budget, the same matcher and the same D33 tolerance (`ScanGameFolders`). `ImageDirectory` names the
|
||||
> executable's folder and the checks resolve the root from it. Raising the reach instead was measured and rejected:
|
||||
> depth 4 still misses NTE's folder, and at depth 5 three installed titles overrun 4096 entries (Yu-Gi-Oh! Master
|
||||
> Duel: 41,251), which would refuse them. Measured across the owner's 83 Steam installs, the second walk costs at most
|
||||
> 103 entries and newly finds exactly those two folders.
|
||||
>
|
||||
> **What it does not cover.** Beyond the above, the residual is an anti-cheat
|
||||
> SDK sitting on disk whose service is not installed and whose module is not
|
||||
> loaded; checks 1, 2 and 2b already cover the rest. And today the `directories` + `files`
|
||||
@@ -393,9 +413,11 @@ Implemented in `FrameLedger.Injector` and reached from managed code through a th
|
||||
> closed by never firing, which is a silent hole.
|
||||
>
|
||||
> **Every uncertainty refuses**, with `Reason::kPreScanFailed` rather than a
|
||||
> hit: directory absent or unlistable, either bound exceeded, a name we could
|
||||
> hit: directory absent or unlistable, ~~either bound exceeded~~ the 4096-entry bound exceeded, a name we could
|
||||
> not convert, or a reparse point — which is never followed, because a
|
||||
> junction can hide an `EasyAntiCheat/` beneath it. **Unmeasured:** how often
|
||||
> junction can hide an `EasyAntiCheat/` beneath it. *(Corrected 2026-10-13: the DEPTH bound never refused. It is a
|
||||
> reach — a folder at the last level is named and not opened, and the walk still reads as complete — which is how
|
||||
> Wuthering Waves' ACE was missed; the paragraph above is what answers it.)* **Unmeasured:** how often
|
||||
> a legitimate library trips the reparse-point rule or the 4096-entry bound.
|
||||
> That needs a real game library, and it is a false-refusal path, so it is
|
||||
> recorded rather than assumed benign.
|
||||
@@ -544,7 +566,7 @@ says so, including that a ban can arrive days later and that FrameLedger cannot
|
||||
FredaikisAntiCheat and Roblox Hyperion *(Hyperion added 2026-10-04: its rows are one module and one file; its only title
|
||||
is on the executable list, so it is never excepted in practice)*; Easy Anti-Cheat, BattlEye, ACE, NetEase Anti-Cheat, mihoyo protect, Vanguard, Ricochet and every
|
||||
other family carry a driver or a service and are never excepted;
|
||||
- no `*.sys` anywhere in the install tree — the kernel-driver rule (D30) is never excepted, whichever family a driver
|
||||
- no `*.sys` anywhere in the install tree *(within check 4's reach: three levels under the install root and, since 2026-10-13, under the executable's own folder)* — the kernel-driver rule (D30) is never excepted, whichever family a driver
|
||||
belongs to (so *Aniimo*, which unpacks `NEPKernel.sys` beside `NEP2.dll` on its first run, stays blocked);
|
||||
- the game is on no title list (`BlockedExecutable`, `BlockedStoreId` — the notorious titles are there by design);
|
||||
- ~~the ledger holds **at least two successful Tier-1 sessions** of the game: hooked, frames recorded, `exit_status = normal`
|
||||
@@ -726,10 +748,13 @@ normative documentation. Write tokens here exactly as the data must hold them.
|
||||
| mihoyo protect | `services` | name | `mhyprot2`, `mhyprot3`, `HoYoKProtect` | 2026-09-25 |
|
||||
| mihoyo protect | `files` | name | `mhypbase.dll`, `mhyprot2.sys`, `mhyprot3.sys`, `HoYoKProtect.sys` | 2026-09-25 |
|
||||
| Anti-Cheat Expert | `modules` | prefix | `SGuard`, `AntiCheatExpert` | 2026-09-25 |
|
||||
| Anti-Cheat Expert | `modules` | exact | `ACE-Base64.dll` | 2026-10-13 |
|
||||
| Anti-Cheat Expert | `drivers` | exact | `ACE-BASE.sys`, `ACE-ADVT.sys`, `ACE-GAME.sys` — **machine-wide refusal** (check 2) | seed |
|
||||
| Anti-Cheat Expert | `drivers` | exact | `ACE-CORE.sys` — **machine-wide refusal** (check 2) | 2026-10-13 |
|
||||
| Anti-Cheat Expert | `directories` | name | `AntiCheatExpert`, `AceAntibotClient` | 2026-09-25 |
|
||||
| Anti-Cheat Expert | `services` | name | `AntiCheatExpert Protection`, `AntiCheatExpert Service` | seed |
|
||||
| Anti-Cheat Expert | `services` | name | `AntiCheatExpert Protection`, `AntiCheatExpert Service`, `ACE-BASE` | seed; `ACE-BASE` 2026-10-13 |
|
||||
| Anti-Cheat Expert | `files` | name | `PGameProtectDriver_X64.sys`, `SGuard64.exe`, `SGuardSvc64.exe` | seed; `SGuard64.exe`, `SGuardSvc64.exe` 2026-09-25 |
|
||||
| Anti-Cheat Expert | `files` | name | `ACE-BASE.sys`, `ACE-CORE.sys`, `ACE-Base64.dll`, `ACE-Service64.exe`, `ACE-Setup64.exe` (measured in Wuthering Waves' folder) | 2026-10-13 |
|
||||
| EA AntiCheat | `modules` | prefix | `EAAntiCheat` | 2026-09-25 |
|
||||
| EA AntiCheat | `drivers` | exact | `EAAntiCheat.sys` — **machine-wide refusal** (check 2) | 2026-09-25 |
|
||||
| EA AntiCheat | `files` | name | `EAAntiCheat.Installer.exe`, `EAAntiCheat.GameServiceLauncher.exe`, `EAAntiCheat.GameServiceLauncher.dll` | 2026-09-25 |
|
||||
|
||||
+183
-2
@@ -1494,7 +1494,8 @@ wrongly-named entry through `SessionRecorder`'s `EnsureAsync`); the running tabl
|
||||
launch election registers its session and defers to the watcher's. **What it costs:** a game whose FOLDER moved records
|
||||
nothing until *Change executable* — accepted, because the alternative is exactly what put HHW's sessions under Flower
|
||||
in Us. **D28 (owner, same day):** HHW itself is measured by pointing an entry at `swiftshader\Game.exe` (the NW.js
|
||||
runtime its .NET launcher starts); no launcher-following in beta.6.
|
||||
runtime its .NET launcher starts); no launcher-following in beta.6. *(Corrected 2026-10-13, D57: that ".NET launcher"
|
||||
is malware — `spike-notes.md` §20. Nothing here asks for it to be run.)*
|
||||
|
||||
**Decision (D26, owner: "the library still shows two entries side by side after the drive letter changed, with the
|
||||
data unchanged").** The Agent merges two entries for one executable under two drive letters by itself: the stale
|
||||
@@ -2084,7 +2085,7 @@ release.*
|
||||
|
||||
**Owner-only, added to the list below:** item 13.
|
||||
|
||||
## **START HERE** — 2026-10-07, 0.1.0-beta.18: page titles readable in the dark theme, notices in words, a clean build id
|
||||
## ~~**START HERE**~~ — 2026-10-07, 0.1.0-beta.18: page titles readable in the dark theme, notices in words, a clean build id *(struck 2026-10-12: the head is §beta.19 below)*
|
||||
|
||||
*Status is `CHANGELOG.md` `[0.1.0-beta.18]`; this is what no other file carries. The owner's report (2026-10-07, five
|
||||
screenshots of beta.17 in the dark theme): every page's title and section headings near-black on the dark window — and
|
||||
@@ -2123,6 +2124,159 @@ blends into the background in dark mode").
|
||||
|
||||
**Owner-only, added to the list below:** item 14.
|
||||
|
||||
## ~~**START HERE**~~ — 2026-10-12, 0.1.0-beta.19: the import's helper, the folder Change executable opens in, three engines' versions, uninstalled games *(struck 2026-10-12: the head is §beta.20 below)*
|
||||
|
||||
*Status is `CHANGELOG.md` `[0.1.0-beta.19]`; this is what no other file carries. The owner's list (2026-10-12, four items):
|
||||
*Change executable…* opens in the game's root folder; the version of RPG Maker, Unity and Godot games; A Doll's Locket -
|
||||
Remake imported as `notification_helper.exe`; whether the Agent removes games whose executable is gone, and if not, to
|
||||
remove them when no session was recorded. Four stacked PRs — #292 the import, #293 the folder, #294 the versions,
|
||||
#295 the removal — and two from #295's review, #297 one notice per check and #298 the probe's unreadable-folder tests —
|
||||
then the release.*
|
||||
|
||||
**Decisions (owner, 2026-10-12, asked before the plan — do not re-ask):**
|
||||
|
||||
- **D55 — a game you uninstalled leaves the library by itself when it has no session** (amends D41's "nothing is
|
||||
removed"): its executable gone at sweeps ten minutes apart (counted in the Agent's memory), its drive connected and the
|
||||
folder it was installed in still there, no session stored, recording or waiting to be recovered — behind Settings ▸
|
||||
Data ▸ *Remove uninstalled games*, on by default (`02_SPEC` FR-1.8). **Never an entry carrying an anti-cheat block, an
|
||||
exception's grant or a failed trial**: that part follows from rule 2 and D38 and was not asked (`19_SAFETY` §What a
|
||||
finding does to the game).
|
||||
- **D56 — an NW.js runtime is the import's game**: an executable beside `nw.dll` + `package.json` ranks as the engine's
|
||||
own layout, below Unity's and Unreal's and above a name match, so a launcher-fronted RPG Maker MV/MZ install is pointed
|
||||
at the process that draws. D28 did that by hand for HELLO, HELLO WORLD!; ~~the locator now picks the same file~~
|
||||
*(corrected 2026-10-13: the locator does, and an import never asks it there — itch's own pick names the program in
|
||||
front, which is not a helper, so the import takes it; and that program is malware, D57 — §beta.21)*.
|
||||
- **The owner's existing A Doll's Locket entry is not rewritten** (D25/D27): *Change executable…* re-points it, and the
|
||||
import no longer offers a twin of the same store title.
|
||||
- **The train (owner, 2026-10-12, after the PRs were up):** "commit, push và release luôn" — each PR squash-merged by the
|
||||
session as its CI went green, then the signed tag and the release, without asking again. Then, of the review's two
|
||||
follow-ups the session had offered as separate tasks: "2 pr riêng, rồi merge, push và release" — #297 and #298, in this
|
||||
release.
|
||||
|
||||
**Traps met on the way:**
|
||||
|
||||
- **A store's own pick can be a helper.** itch's butler saves a *filtered* verdict — the shallowest candidates, minus
|
||||
those whose manifest asks for elevation — and ranks nothing, so A Doll's Locket's whole verdict was
|
||||
`notification_helper.exe`. Its database lives in the WAL (a 4 KB main file): a read with `immutable=1` sees no tables;
|
||||
open it `mode=ro` with the itch app closed, or copy the `-wal` beside it as `ItchLibrarySource` does.
|
||||
- **The locator's helper fragments are substrings** (`node` is inside *Nodebuster*): good enough for a guess, never to
|
||||
overrule a store — `ExecutableLocator.RuntimeHelperNames` holds whole names for that.
|
||||
- **Godot's version string sits 57–78 MB into an export**, past the rules' 8 MiB strings scan; the data pack's header
|
||||
has it in 20 bytes. **Unity's FileVersion string is not the editor version** (`2022.3.39.5118735`); the ProductVersion
|
||||
is (`2022.3.39f1 (hash)`), except on 2019.4 players, whose data file's header carries it.
|
||||
- **`File.Exists` and `Directory.Exists` answer false for a path they may not look at**: before removing anything, the
|
||||
parent's listing is asked whether the child is there (`ExecutablePresenceProbe`).
|
||||
- **The signing key was locked when the session began**, and ten pinentry prompts went unanswered; the code went on and
|
||||
the commits waited. Probe first: `echo x | gpg --batch --pinentry-mode error --local-user <key> --clearsign`.
|
||||
- **Mechanical, again:** the Write tool writes LF (convert after it); a Bash heredoc halves `\\` (patch scripts are
|
||||
files); a WPF project has no implicit `System.IO` using; MA0051 (60 lines) hit `ItchLibrarySource.ReadDatabaseAsync`,
|
||||
`DetectionSweep.SweepOnceAsync` and `AgentServices.AddDetection`; CA1716 rejects an interface member named `Of`.
|
||||
- **A review of the PR that deletes data, after its gates were green and before it merged, found three defects no gate
|
||||
could:** a cross-reference to a `19_SAFETY` section that does not exist; a presence probe that listed every drive for
|
||||
every entry and asked a dead share whether it was ready (`VolumeRoots.IsReady` reads the type first); and an entry
|
||||
the delete refused that was never asked again (`UninstalledEntryPrune.RetryAfter`, an hour). The `vi`/`ja` switch text
|
||||
also named the pill in English where those languages show their own word. Review such a PR before the merge. The two
|
||||
it left for later landed in the same release: one check's removals arrive as one event each, and WPF UI 4.3.0's
|
||||
`SnackbarService` keeps ONE snackbar and shows every message in it at once (`Show(true)`, read from the assembly), so
|
||||
only the last name stayed on screen (#297: the page waits `GamesViewModel.RemovalSettle` and says them once); and the
|
||||
probe's two *Unknown* branches had no test (#298: real folders the test user is denied, each test measured red with its
|
||||
branch broken).
|
||||
- **Loop a test class you touched before the merge.** `GamesViewModelTests` run 165 times failed once: two overlapping
|
||||
reads of the library, the older finishing last and shown — a removed game's card came back. #297 shows only the newest
|
||||
read. The first version of its test hung: which read reached the held check first was itself a race (wait for the
|
||||
first to be held before starting the second, and bound every wait).
|
||||
- **A test run reseeds `%LOCALAPPDATA%\FrameLedger\rules`** with rules `2026.10.2`, whose extractor types the installed
|
||||
beta.18 cannot parse: its detection sweep says "rules unusable" until it restarts or beta.19 is installed (beta.10's
|
||||
trap, met again; the guard is unaffected). For beta.20 PR-1 (rules `2026.10.3`, which the installed beta.19 cannot
|
||||
parse) the session copied the owner's `detection-rules.json` and `.seeded` aside before testing and back after,
|
||||
byte for byte, so the owner's running Agent kept its own.
|
||||
|
||||
**Owner-only, added to the list below:** item 15 — **passed 2026-10-12**.
|
||||
|
||||
**After the release (owner, 2026-10-12):** "tiếp tục với 1 pr kèm với detect version game dùng ren'py" — beta.20 PR-1 reads
|
||||
a Ren'Py game's engine version from `renpy/vc_version.py` (rules `2026.10.3`, Privacy Policy 2.9 — the Legal Gate shows it
|
||||
once at the next update; `05_DETECTION` §Engine version — Ren'Py) and strikes item 15. Merged for the next pre-release;
|
||||
no release was asked for.
|
||||
|
||||
## ~~**START HERE**~~ — 2026-10-12, 0.1.0-beta.20: the engine version of Ren'Py games *(struck 2026-10-13: the head is §beta.21 below)*
|
||||
|
||||
*Status is `CHANGELOG.md` `[0.1.0-beta.20]`; this is what no other file carries.* The owner, the same evening as beta.19 and
|
||||
after confirming it on real hardware: "tiếp tục với 1 pr kèm với detect version game dùng ren'py", then "tung bản beta20
|
||||
rồi đóng phiên hẳn". One PR — #299, a Ren'Py game's version from the engine's own `renpy/vc_version.py` (rules
|
||||
`2026.10.3`, Privacy Policy 2.9, item 15 struck) — then the release.
|
||||
|
||||
**Decisions:** none new. The Privacy Policy 2.9 wording — one item added to §4's list, "the version file of a Ren'Py
|
||||
game's engine" — was shown to the owner with #299 and released on their word.
|
||||
|
||||
**Traps met on the way:**
|
||||
|
||||
- **`keyboxd` can fail with "Input/output error" while the key is unlocked**: `gpgconf --kill keyboxd` alone brings it
|
||||
back on the next use; killing `gpg-agent` would drop the cached passphrase and wait on a pinentry.
|
||||
- **A test run still seeds the owner's live rules** (§beta.19's trap): rules `2026.10.3` cannot be parsed by an installed
|
||||
beta.19, so the owner's `detection-rules.json` and `.seeded` were copied aside before each local gate and back after.
|
||||
- **Loop a test class you touched before the merge** (§beta.19): `GamesViewModelTests` then ran 340 times green after #297.
|
||||
|
||||
**Owner-only, added to the list below:** item 16.
|
||||
|
||||
## **START HERE** — 2026-10-13, 0.1.0-beta.21: an anti-cheat beside the executable, four itch downloads that are malware, documents that scroll, Play
|
||||
|
||||
*Status is `CHANGELOG.md` `[0.1.0-beta.21]`; this is what no other file carries. The owner's list (2026-10-13, four items,
|
||||
with screenshots of two game pages): HELLO, HELLO WORLD!'s RPG Maker path is wrong; no anti-cheat is found for Wuthering
|
||||
Waves; the documents in the app scroll slowly; and, if possible, a Play button on a game's page or in the library that
|
||||
points to the platform. Then: once the plan is approved, commit → push → CI → auto-fix → merge → bump the version →
|
||||
release, in one go. Four stacked PRs — #301 check 4 also walks the executable's folder (rules `2026.10.4`), #302 the four
|
||||
itch "launchers" are malware and the Supports card, #303 the documents' wheel and one render per page, #304 Play and the
|
||||
Privacy Policy 2.10 — then the release.*
|
||||
|
||||
**Decisions (owner, 2026-10-13, asked with the plan — do not re-ask):**
|
||||
|
||||
- **D57 — the four itch "launchers" are malware: the documentation is corrected, the import is not changed.** The
|
||||
"wrong path" of HELLO, HELLO WORLD! is itch's own pick: the 213 MB .NET program in front of the RPG Maker runtime,
|
||||
which is not a helper, so the import takes it (D56). Read without running it, that program — the same in A Doll's
|
||||
Locket - Remake, City of Bones and Träumerei Chapter 2 — is malware (`spike-notes.md` §20). D28, D56, item 15(a), the
|
||||
beta.19 entry and `05_DETECTION` are corrected in place, and no document advises running one. The repository records
|
||||
what the files are, never the state of a PC that ran one.
|
||||
- **D58 — Wuthering Waves is on the title list** (Steam `3513350`, Anti-Cheat Expert), beside the fix that finds ACE's
|
||||
folder beside the game's executable.
|
||||
- **D59 — Play, in two modes switched in Settings:** "1: press Play → the platform opens → it runs; 3: it runs at once;
|
||||
let me switch between the two". `ui.play_mode` is `store` (the default) or `direct`; the store is the one whose own
|
||||
records name the game's folder, never the row's `platform`; an App running as administrator never starts a store's
|
||||
app (`08_UI` §Games).
|
||||
- **The train (owner, with the plan):** "Làm trọn mạch ngay" — each PR squash-merged as its CI went green, then the
|
||||
signed tag and the release, without asking again. The Privacy Policy 2.10 wording and the Wuthering Waves row of
|
||||
`LIST_GAME_TESTED.md` (D35) were approved with the plan.
|
||||
|
||||
**Traps met on the way:**
|
||||
|
||||
- **The pre-scan's depth limit is a reach, not a refusal.** A folder at the third level is named and never opened, and
|
||||
the walk reports a complete, clean tree; only the 4096-entry budget refuses. An anti-cheat deeper than three levels
|
||||
under both the install root and the executable's folder is still invisible to check 4 — the 30 s re-check meets it
|
||||
only once its driver is loaded, and a driver is a machine-wide finding that turns nothing off (`spike-notes.md` §19).
|
||||
- **A rules note over 300 characters fails `rules-validate` with a message about something else** ("Value is null …
|
||||
`/engines/4/version`"): `Test-Json` names a branch of the schema, not the long `notes` (`freeText`, maxLength 300).
|
||||
Bisect the edit, not the message.
|
||||
- **The owner's live rules, older than the repository's, make parallel test hosts race**: each reseeds
|
||||
`%LOCALAPPDATA%\FrameLedger\rules`, and `ReplaceFileW` fails one of them ("could not write the rules file"). Before
|
||||
the gate, seed the repository's rules and its `.seeded` marker (the uppercase SHA-256 hex) yourself; after it, put the
|
||||
owner's files back byte for byte.
|
||||
- **WPF's `ScrollViewer` moves 48 DIP per wheel message whatever its delta** (`16_WPFUI_SYNTAX`), so a touchpad's small
|
||||
deltas each jump the whole step; `MarkdownView` handles the wheel itself.
|
||||
- **A review of Play after its gates and its first CI run were green found four defects no gate could** (§beta.19's
|
||||
lesson, again). The pipe fails a request in flight with an `IOException` when the agent stops (`PipeClient` fails every
|
||||
pending request so), nothing on the Play path caught it, and a command's unhandled exception is the App's crash dialog —
|
||||
so pressing Play while the agent restarted for an update would have ended there. A store record whose id builds no
|
||||
link read "GOG GALAXY is not installed"; the agent's `UnknownGame` reached a notice as that token; two notices advised
|
||||
what their own path could not do. All four fixed in #304 before it merged. **Not fixed here:** `SessionDeletion` has the
|
||||
same gap (it catches no `IOException`), and every other caller of the pipe misses the `ObjectDisposedException` and
|
||||
`IpcFramingException` the same failure can raise — the owner asked for it as its own PR after this release, and
|
||||
its own pre-release (beta.22).
|
||||
- **Analyzers met:** MA0048 (one type per file), MA0099 (compare a flags enum with its `None`, not `0`), CS1573 (a
|
||||
`<param>` on some of a record's parameters needs one on all — `<remarks>` instead), IDE1006 (a `private const` takes
|
||||
the `_` prefix). **Mechanical, again:** a Bash heredoc halves `\\`; the Write tool writes LF and `sed -i` turns CRLF
|
||||
into LF.
|
||||
|
||||
**Owner-only, added to the list below:** item 17.
|
||||
|
||||
## Owner-only — no PR can close these
|
||||
|
||||
1. **§S23-2 — branch protection.** `Rules / validate` is not a required status check on
|
||||
@@ -2225,6 +2379,33 @@ blends into the background in dark mode").
|
||||
without `-dirty`. (c) **Disable all hooking:** turning it on says a game being measured stops within 30 seconds; with
|
||||
it on, a hooked game's notice reads "All hooking is switched off in Settings, so nothing was measured." (d) The `ja`
|
||||
strings marked `review`, `Safety_Unhooked_Unnamed_Format` among them.
|
||||
15. ~~**beta.19 on real hardware.**~~ **Passed 2026-10-12** — the owner ran it and reported (a), (c), (d)'s unplugged
|
||||
drive, (e) and (f) OK ("Các mục đã test: 1, 2. 5, 6, 4, ok"); (b) and (d)'s removal were read from the logs: Refresh
|
||||
named the existing entry instead of offering a twin, and one check at 18:04:00 removed Deadly Heart Gambit, Vibe Train
|
||||
Demo and 衔蝶 (the App's restart at 17:47 had started the ten minutes again), the library then reading *Games · 46*.
|
||||
*(The item as written:)* (a) **A Doll's Locket - Remake:** its page ▸ *Change executable…* opens in `Dolls
|
||||
Locket\`; pick `css\Game.exe`. Its launcher asks for administrator, so the runtime is measured only with *Run the agent
|
||||
as administrator* on — otherwise the session says why nothing was measured. *(Withdrawn 2026-10-13, D57: that
|
||||
launcher is malware — do not run it; `spike-notes.md` §20.)* (b) **Refresh** offers no second A Doll's
|
||||
Locket. (c) **Engine versions:** a Unity game's page (*Unity 2022.3.62f2* on Umamusume, *Unity 2019.4.40* on GIRLS'
|
||||
FRONTLINE 2), Godot's (*Godot 4.4.1* on 衔蝶), RPG Maker's (*RPG Maker MZ 1.10.0*, *RPG Maker MV 1.6.2* on Flower in
|
||||
Us, *RPG Maker VX Ace (RGSS 3.0.1)*), each with its *Engine version* line. (d) **Uninstall a game that has no session**
|
||||
(or delete a copy you added): about ten minutes later its entry is gone and the Games page says so — two removed
|
||||
together are said in one notice that names both; with the USB drive unplugged nothing is removed; *Remove uninstalled
|
||||
games* off keeps it. (e) The Legal Gate shows the Privacy Policy 2.8
|
||||
once. (f) The `ja` strings marked `review`.
|
||||
16. **beta.20 on real hardware.** (a) **Bound Between Desks:** its page reads *Ren'Py 8.5.0*, and its *Engine version*
|
||||
line says it was read from the engine's version file (`renpy/vc_version.py`); the first sweep after the update reads
|
||||
every game once more (rules `2026.10.3`). (b) The Legal Gate shows the Privacy Policy 2.9 once. (c) The `ja` string
|
||||
marked `review` (`GameDetail_EngineVersion_RenPyVcVersion`).
|
||||
17. **beta.21 on real hardware.** (a) **Wuthering Waves:** after the update, before any session, its page says hooking
|
||||
is off — Anti-Cheat Expert beside its executable, and its Steam id on the title list; Neverness To Everness stays
|
||||
blocked, and GIRLS' FRONTLINE 2's exception stays in force. (b) **Play**, in both modes of Settings ▸ Games ▸ *Play
|
||||
button*, with a Steam game, Alan Wake 2 from the Epic Games Launcher (its link has not been tried on a real game), a
|
||||
GOG game and an itch game — and in Task Manager's Details tab the game's *Elevated* column reads *No*. (c) **The
|
||||
wheel and a touchpad** in Help ▸ User guide, the licence in Help ▸ About and the Legal Gate: about three lines a
|
||||
notch, gliding; at the end of the update notes the window scrolls instead. (d) The Legal Gate shows the Privacy
|
||||
Policy 2.10 once. (e) The `ja` strings marked `review` (Play, Settings ▸ Games, `GameDetail_Supports_None`).
|
||||
|
||||
**Answered 2026-08-05, do not re-ask:** remove `gameguard` and keep `guard` (approved
|
||||
over a red `Rules` gate, with the reasoning recorded in the merge commit); vendor NVAPI
|
||||
|
||||
@@ -48,7 +48,7 @@ with the 2026-09-16 recovery and with library entries removed since.
|
||||
|
||||
| Game | Why nothing was measured | When | Evidence |
|
||||
|---|---|---|---|
|
||||
| HELLO, HELLO WORLD! | A 32-bit game (RPG Maker MV): refused by the guard once, and two sessions with hooking switched off — each recorded with its duration and sensors | 2026-09-23 | database |
|
||||
| HELLO, HELLO WORLD! | A 32-bit game (RPG Maker MV): refused by the guard once, and two sessions with hooking switched off — each recorded with its duration and sensors. *Its itch.io download puts malware in front of the game — do not run it (noted 2026-10-13, [spike-notes §20](spike-notes.md))* | 2026-09-23 | database |
|
||||
| Umamusume: Pretty Derby | Three sessions played with hooking switched off for the game | 2026-09-27 | database |
|
||||
| Sekiro: Shadows Die Twice | One session played with hooking switched off | 2026-09-25 | database |
|
||||
| GIRLS' FRONTLINE 2: EXILIUM | One session whose process Windows would not let FrameLedger open, and two recovered after the agent itself stopped mid-session (*interrupted*) | 2026-09-22 → 09-23 | database |
|
||||
@@ -62,6 +62,7 @@ with the 2026-09-16 recovery and with library entries removed since.
|
||||
| Aniimo | NetEase Yidun with a kernel driver (`NEPKernel.sys`) in the game's folder — never eligible for an exception | 2026-09-25 | [19_SAFETY](19_SAFETY_AND_ANTICHEAT.md) |
|
||||
| Goose Goose Duck | Easy Anti-Cheat's service running, and its folder | 2026-08-04 | [spike-notes §13](spike-notes.md) |
|
||||
| Neverness To Everness | Anti-Cheat Expert's kernel driver in the game's folder | 2026-08-04 | [spike-notes §13](spike-notes.md) |
|
||||
| Wuthering Waves | Anti-Cheat Expert, kept beside the game's executable four folder levels in, where the check did not look before beta.21: a session with hooking on was injected and unhooked 37 seconds later, when the 30-second re-check met ACE's driver (`ACE-BASE.sys`); nothing was measured. Since beta.21 its folder and its Steam id refuse it before any injection *(row added 2026-10-13 from the agent's log)* | 2026-10-12 | [spike-notes §19](spike-notes.md) |
|
||||
| Counter-Strike 2 | Valve Anti-Cheat — refused by FrameLedger's title list since beta.8. On 2026-08-04 the checks alone allowed it (VAC is invisible to them); nothing was injected | 2026-08-04, beta.8 | [spike-notes §13](spike-notes.md), [19_SAFETY](19_SAFETY_AND_ANTICHEAT.md) |
|
||||
|
||||
Also refused before any injection: **Deadly Heart Gambit** — a 32-bit game (2026-08-03).
|
||||
|
||||
@@ -63,6 +63,21 @@ are kept because they record what each version changed and why (owner decision D
|
||||
>
|
||||
> Version 2.5 (2026-09-27, 0.1.0-beta.10) adds how a tracked game's window is shown — read from Windows — and the engine build name read from an Unreal Engine game's executable. It is also the first version to say two things the software already did: it reads the **content** of a library game's executable (markers in its first 8 MB and its import table, since the detection of engines and features; and, when a session starts, the graphics-library markers in the whole file), and it reads the processor load and the memory in use (since 0.1.0-beta.3). Nothing here leaves your device, as before.
|
||||
|
||||
### What version 2.10 of the Privacy Policy changed (0.1.0-beta.21)
|
||||
|
||||
§4 names the lists of installed games the Steam, GOG GALAXY, Epic Games and itch apps keep on the disk, and where GOG
|
||||
GALAXY is installed, read when the library is imported and when Play is pressed (beta.21 PR-4, owner decision D59; the
|
||||
wording approved with the plan). The import has read the Epic Games Launcher's manifests and itch's records since
|
||||
0.1.0-beta.1 without a word here — §4 named only "the store files that name it (Steam's and GOG's, on your disk)", read for
|
||||
detection; this version is the first to say so. §2 says that Play hands a game to its store's app, which may connect to
|
||||
its store, and that FrameLedger itself connects to nothing. Nothing here leaves your device, as before.
|
||||
|
||||
### What version 2.9 of the Privacy Policy changed (0.1.0-beta.20)
|
||||
|
||||
§4's list of the version marks an engine keeps in its own files gains one: the version file of a Ren'Py game's engine
|
||||
(`renpy/vc_version.py`), read to show a Ren'Py game's engine version (beta.20 PR-1, owner request 2026-10-12) — its first
|
||||
4 KiB, for the `version` line only. Nothing here leaves your device, as before.
|
||||
|
||||
### What version 2.8 of the Privacy Policy changed (0.1.0-beta.19)
|
||||
|
||||
§4 names the version marks an engine keeps in its own files, read to show a Unity, Godot or RPG Maker game's engine
|
||||
|
||||
+111
-3
@@ -2656,11 +2656,119 @@ Godot, RPG Maker.
|
||||
- **Detect time** is the whole detection of one entry — the install's walk, the rules and the second read — on the USB
|
||||
drive; the second read itself is a version resource and at most a few kilobytes. It runs once per executable and rules
|
||||
version, like Unreal's.
|
||||
- **Four of the itch installs front their runtime with a 213 MB .NET launcher** (HELLO, HELLO WORLD!, A Doll's Locket -
|
||||
Remake — whose launcher asks for administrator —, City of Bones and Träumerei) — the reason the import's choice of
|
||||
executable changed in the same train (`05_DETECTION` §Library import, D56).
|
||||
- ~~**Four of the itch installs front their runtime with a 213 MB .NET launcher**~~ **Four of the itch installs put a
|
||||
213 MB .NET program in front of their runtime, and it is malware** *(corrected 2026-10-13, owner decision D57 — §20;
|
||||
do not run it)* (HELLO, HELLO WORLD!, A Doll's Locket - Remake — whose launcher asks for administrator —, City of
|
||||
Bones and Träumerei) — read as a launcher, the reason the import's choice of executable changed in the same train
|
||||
(`05_DETECTION` §Library import, D56).
|
||||
- **Not measured:** RPG Maker 2000/2003 (`RPG_RT.exe`; none installed, and no rule detects it), XP and VX (no install —
|
||||
their RGSS1/RGSS2 libraries are read by the same rule as VX Ace's, unmeasured), a Unity build older than 2019 (its
|
||||
player is the executable, with no `UnityPlayer.dll`), a Godot 3 export, and a Godot pack appended to the executable
|
||||
(both installs ship the pack beside it; the trailer the reader follows is Godot's documented layout, tested on
|
||||
synthetic files only).
|
||||
|
||||
## 18 · The Ren'Py version in an installed game *(2026-10-12, beta.20)*
|
||||
|
||||
The owner's one Ren'Py install, read-only: Bound Between Desks (Steam) — `BoundBetweenDesks.exe` (386,048 bytes, no version
|
||||
resource), `BoundBetweenDesks.py`, `game\`, `lib\py3-windows-x86_64\` (Python 3.12: `libpython3.12.dll`,
|
||||
`librenpython.dll`, `pythonw.exe`) and `renpy\` with the engine's `.py` sources beside `__pycache__\*.cpython-312.pyc`.
|
||||
|
||||
- `renpy\vc_version.py` (109 bytes, LF line ends): `branch = 'master'`, `nightly = False`, `official = True`,
|
||||
`version = '8.5.0.25111603'`, `version_name = 'In Good Health'`.
|
||||
- `renpy\__init__.py` imports those names from `vc_version` (else from `renpy.versions.get_version()`) and builds
|
||||
`version_tuple` from `version.split(".")`; `renpy.version` is `"Ren'Py " + version_only`.
|
||||
- The game's own `log.txt` (written at its last start, 2026-09-16) begins `Ren'Py 8.5.0.25111603`: the same number.
|
||||
|
||||
Then through the shipped pipeline (`StaticGameDetector` over `GameFileProbe`, rules `2026.10.3`): `renpy 8.5.0
|
||||
renpy_vc_version` in 79 ms; Dialoop (`unity 6000.3.3f1`), Plethora of Bullets 2 (`godot 4.2.2`), A Doll's Locket - Remake
|
||||
(`rpgmaker_mv 1.10.0`) and City of Bones (`rpgmaker_rgss 3.0.1`) read as in §17.
|
||||
|
||||
- **Not measured:** an older Ren'Py (no other install), whose `vc_version.py` may name no `version` — it then reads as
|
||||
not found; a build that ships the engine compiled only (none seen).
|
||||
|
||||
## 19 · Anti-cheat beside the executable — Wuthering Waves *(2026-10-13, beta.21, owner decision D58)*
|
||||
|
||||
The owner's report: FrameLedger found no anti-cheat in `D:\SteamLibrary\steamapps\common\Wuthering Waves` (Steam
|
||||
`3513350`, Unreal Engine 4.26.2). Read-only, on the owner's disk and in the Agent's own log.
|
||||
|
||||
**The layout.** The install root holds the launcher `Wuthering Waves.exe` (483,768 bytes), `Client\`, `Engine\` and
|
||||
`ClearThirdParty.exe`; the library entry is the shipping binary `Client\Binaries\Win64\Client-Win64-Shipping.exe`
|
||||
(169,213,960 bytes). Beside it, `Client\Binaries\Win64\AntiCheatExpert\` holds Tencent's ACE: `ACE-BASE.sys`
|
||||
(4,125,432), `ACE-CORE.sys` (3,923,120) with `ACE-CORE.sys2`, `.sysa` and `.sysa2`, `ACE-Base64.dll` (69,736,848),
|
||||
`ACE-Service64.exe`, `ACE-Setup64.exe`, `ACE-Base.dat` and `pld.dat`. The folder is **four levels** under the root;
|
||||
entries per level under the root: 6, 10, 31, 276, 109, 136 (levels 1–6). Neverness To Everness keeps a second
|
||||
`AntiCheatExpert\` beside its `HTGame.exe`, at `Client\WindowsNoEditor\HT\Binaries\Win64\` — **six** levels down.
|
||||
|
||||
**Why it read clean.** Check 4 walked the install root only (since 2026-09-25), three levels deep, and a folder at the
|
||||
last level is named and never opened, silently: the walk listed `Win64` and reported a complete, clean tree. The rules
|
||||
already named the folder (`directories`: `AntiCheatExpert`); the walk never handed the name to the matcher.
|
||||
|
||||
**What it cost, from the Agent's log.** Added by import 2026-10-11 19:50:19 → `prescan: scanned 2 — anti-cheat 1, clean 1`
|
||||
(the anti-cheat was NTE's `PGameProtectDriver_X64.sys`, three levels down); re-scanned after the game's update at
|
||||
21:22:14, clean; re-added 2026-10-13 18:30:44, clean. With hooking turned on, the session of 2026-10-12 started at
|
||||
21:10:20 found nothing — ACE's driver not yet loaded, its services stopped — and was injected; at 21:10:57 the 30 s
|
||||
re-scan met `ACE-BASE.sys` (written to `System32\drivers` at 21:10 by the game's ACE setup) and unhooked:
|
||||
`SafetyUnhook; Saved (tier 1, exit=UnhookedSafety, frames=0); guard=BlockedDriver/Anti-Cheat Expert`. A driver is a
|
||||
machine-wide finding, which refuses the session and turns nothing off, so the game's hooking stayed on. Registered on
|
||||
the machine afterwards: the kernel service `ACE-BASE` (demand start) and the user-mode `AntiCheatExpert Protection`.
|
||||
|
||||
**The options, measured across the owner's 83 Steam installs** (read-only listings):
|
||||
|
||||
| Option | Cost | Newly finds | Verdict |
|
||||
|---|---|---|---|
|
||||
| Walk the executable's own folder too | ≤ 103 entries (NTE), 95 for Wuthering Waves | exactly the two `AntiCheatExpert\` folders above | **taken** |
|
||||
| Depth 3 → 4 | one constant; peak 1,627 entries (Half-Life 2) | Wuthering Waves' folder name only — NTE's is six levels down, and the folder's files stay out of reach | rejected |
|
||||
| Depth 5 or more | over 4096 entries for Yu-Gi-Oh! Master Duel (41,251), Yasha (12,215), GIRLS' FRONTLINE 2 (9,969) | — | rejected: those games would read *could not verify* and be refused at session start, GF2 under its D33 exception included |
|
||||
| Make the depth cap refuse | — | — | rejected: it would refuse nearly every game |
|
||||
|
||||
**Taken (rules `2026.10.4`):** check 4 walks the install root, then the executable's folder when it lives below the
|
||||
root (`ScanGameFolders`, `fl_prescan.cpp`), each with its own 4096-entry budget; the five `ACE-*` names join the
|
||||
`files` group, `ACE-CORE.sys` the `drivers` group, `ACE-BASE` the `services` group and `ACE-Base64.dll` a `modules`
|
||||
row of its own (so an injected Overlay stops itself if it loads); and Wuthering Waves' Steam id is on the title list.
|
||||
The version bump is what makes every game's pre-scan run again: the sweep re-scans only when the rules version or the
|
||||
executable changes.
|
||||
|
||||
- **Not measured:** that the game loads `ACE-Base64.dll` (no session has run since), and whether ACE's other titles
|
||||
keep the same layout.
|
||||
|
||||
## 20 · The launcher in front of four itch installs is malware *(2026-10-13, beta.21, owner decision D57)*
|
||||
|
||||
§17 read the 213 MB program four itch.io downloads put in front of their RPG Maker game as a *launcher*, and the
|
||||
documentation built on that reading (D28, D56's rationale, HANDOFF item 15(a), which told the owner to run A Doll's
|
||||
Locket's with the agent as administrator). Read on 2026-10-13 without running anything — file listings, the itch
|
||||
receipt, version resources, the .NET metadata strings and the files beside it — it is not a launcher. **It is malware.
|
||||
Do not run it.**
|
||||
|
||||
| Download (itch) | The program | SHA-256 | Beside it |
|
||||
|---|---|---|---|
|
||||
| HELLO, HELLO WORLD! (5015466) | `HELLOHELLOWORLD.exe`, 213,572,096 bytes | `053553514C3E34865393654477631DEFB50B36509F44B8ADC5B1E555E1F64FD1` | `locales\ml.reg`, `locales\ko.xml` |
|
||||
| A Doll's Locket - Remake (5085165) | `DollsLocket.exe`, 213,745,664 bytes | `51D3271AD0FFAF3652DAB9F66C1279CB2CA16F46A6AB2E5173D032600C1E5E53` | `data\Items.reg`, `data\Armors.xml` |
|
||||
| City of Bones | `CityofBones.exe`, 213,557,760 bytes | `CA81BE260941E7BE2D87FE6852E7DAD0D432A84F071C2C578A7BD06BE7E61248` | `System\Windowskin.reg`, `System\RGSS301.xml` |
|
||||
| Träumerei Chapter 2 | `TräumereiChapter2.exe`, 213,559,808 bytes | `65D4CCB7065227A0ED08D8977CA2F00F1E2A6DDC5F375C2C32E115D90DE29E4D` | `System\Game.reg`, `System\RGSS301.xml` |
|
||||
|
||||
- **The four programs are one .NET program**, unsigned, its version resource Visual Studio's template named after each
|
||||
game (`HELLOHELLOWORLD`, version 1.0.0.7, "Copyright © 2026"), and nearly all of its size embedded resources.
|
||||
- **Beside each, two files named like the game's own.** A 3,060-byte Windows registry file — byte-identical in all four —
|
||||
that sets `AmsiEnable = 0` under `HKCU` and `HKLM\SOFTWARE\Microsoft\Windows Script\Settings` (it switches off
|
||||
Windows' script scanning), and under `HKLM\SOFTWARE\Policies\Microsoft\Windows Defender` adds exclusions for the `.exe`
|
||||
and `.msi` extensions and for `powershell.exe`, `rundll32.exe`, `msiexec.exe` and `regasm.exe`, and sets
|
||||
`SpynetReporting = 0` and `SubmitSamplesConsent = 2` (no cloud protection, no samples sent). And a 3,216-byte `.xml`
|
||||
that is no XML: high-entropy bytes, a different blob in each download.
|
||||
- **What the program's own metadata names** (type and member names, read as strings): checks for virtual machines
|
||||
(VMware, VirtualBox, QEMU, Hyper-V, Xen, KVM, Bochs, Parallels — through WMI, the registry and the firmware) and for
|
||||
debuggers (`IsDebuggerPresent`, `CheckRemoteDebuggerPresent`, `NtQueryInformationProcess` on the debug port, object and
|
||||
flags, hardware breakpoints, debugger windows); AES decryption of Base64 text; PowerShell run inside the process
|
||||
(`CreateRunspace`, `AddScript`); registry writes; steps named `RunPayload` and `PayloadStep`; and the game it starts
|
||||
afterwards — the RPG Maker runtime beside it (`swiftshader\Game.exe`, `css\Game.exe`, `Game.exe` with
|
||||
`RGSS301.dll`), which is what makes it look like the game.
|
||||
- **Where it sits in each download:** the itch receipt of HELLO, HELLO WORLD! lists the program, the runtime in
|
||||
`swiftshader\` and both disguised files as what the download installed; nothing was added afterwards.
|
||||
|
||||
**What changes in FrameLedger (D57): the documentation, not the import.** The import still takes a store's own pick when
|
||||
it is not a helper (beta.19) — FrameLedger reads a game's files to find its engine and anti-cheat, never to judge
|
||||
whether it is safe, and a store's verdict stays the store's. What is corrected in place: §17's bullet, `05_DETECTION`
|
||||
§Library import (D56's rationale and its admin-mode sentence), HANDOFF D28, D56 and item 15(a), the beta.19 CHANGELOG
|
||||
entry, and the HELLO, HELLO WORLD! row of `LIST_GAME_TESTED.md`; `LIMITATIONS.md` says FrameLedger does not tell a safe
|
||||
game from an unsafe one.
|
||||
|
||||
- **Not measured, and not to be:** what the payload does. Nothing here was run, decrypted or uploaded anywhere.
|
||||
+4
-2
@@ -65,12 +65,14 @@ stopped, hooking turned off — each with one button that only says you have rea
|
||||
- **Add game…** — or drop `.exe` files onto the page.
|
||||
- Each game shows its name, its store and engine, and one state: **Hooking on**, **Hooking off**, **Anti-cheat** (found,
|
||||
so it is not hooked), **Exception** (a user-mode exception is in force) or **Not recorded**; then its sessions,
|
||||
playtime and last play. Click it to open its page (in the list: double-click, or Enter).
|
||||
playtime and last play. Click it to open its page (in the list: double-click, or Enter). Its **Play** button (on the
|
||||
card's corner; the list's first column) starts it as the game's page does.
|
||||
|
||||
## A game's page
|
||||
|
||||
- **At the top:** the name, publisher, version, store and engine, the `.exe` path, the last session, the last measured
|
||||
session's frame rate and its ray-tracing chips. **Edit…** changes the name, publisher, version and notes. **Change
|
||||
session's frame rate and its ray-tracing chips. **Play** starts the game: through the store that installed it, or
|
||||
directly — **Settings ▸ Games ▸ Play button** chooses. **Edit…** changes the name, publisher, version and notes. **Change
|
||||
executable…** points the entry at another `.exe` and turns hooking back off; its file dialog opens in the game's own
|
||||
folder. **Remove…** asks whether to keep the game's sessions.
|
||||
- **Recording** — off, FrameLedger ignores the program completely: for a launcher or a tool that is not a game.
|
||||
|
||||
@@ -11,7 +11,7 @@ by the capture agent; unless the row says otherwise, a change applies from the n
|
||||
| **Games with hooking on** | Shown while any game has hooking on: one **Turn off** per game. | — |
|
||||
| **Hide hooking on anti-cheat games** | On, the page of a game where anti-cheat was found shows only what was found; off, it also shows the Hooking switch, greyed out. Such a game is never hooked either way. | On |
|
||||
| **Allow hooking in games whose only anti-cheat runs in user mode** | Turns on the one narrow exception ([Anti-cheat and safety](04-anti-cheat-and-safety.md#the-one-exception-you-can-make)). The games that qualify are listed under it, each with **Make exception…** (after a warning) or **Withdraw**. *Agent.* | Off |
|
||||
| **Vulkan layer** | The component that measures Vulkan games — but only a game FrameLedger starts itself, which the App cannot do yet, so a Vulkan game you start is recorded, not measured. The agent registers and removes it by itself; **Register** and **Unregister** repair that, for your Windows user only. | — |
|
||||
| **Vulkan layer** | The component that measures Vulkan games — but only a game FrameLedger starts itself: **Play** set to *Start directly* (Games, below) does; a Vulkan game started any other way is recorded, not measured. The agent registers and removes it by itself; **Register** and **Unregister** repair that, for your Windows user only. | — |
|
||||
|
||||
The link under them, *Read what the hook does and does not do*, opens the safety document on GitHub.
|
||||
|
||||
@@ -44,6 +44,12 @@ The link under them, *Read what the hook does and does not do*, opens the safety
|
||||
| **Theme** | Follow system, Light or Dark. Applies at once. | Follow system |
|
||||
| **Language** | English, Tiếng Việt or 日本語. The window is rebuilt in the new language at once. | English |
|
||||
|
||||
## Games
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Play button** | What **Play** does, on a game's page and on each game in the library. *Through the store*: Steam or the Epic Games Launcher starts the game, GOG GALAXY runs it, and the itch app asks which copy to launch — each store's app does what it does when you start a game from it. A game no store installed, and a GOG game without GOG GALAXY, is started by FrameLedger instead; so is every game while FrameLedger itself runs as administrator, so that the game does not. *Start directly*: FrameLedger's agent starts the game, recorded from its first frame, with your standard rights; it does not start a game whose recording is off, or one that asks to run as administrator. | Through the store |
|
||||
|
||||
## Window
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|
||||
+7
-6
@@ -11,8 +11,8 @@
|
||||
that changes what FrameLedger.Overlay or the capture host does; date the change.
|
||||
HTML comments are not part of the block.
|
||||
-->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.18`** (2026-10-07), an unsigned installer built from that tag with its
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-13.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.21`** (2026-10-13), an unsigned installer built from that tag with its
|
||||
> checksums published beside it. The source holds the desktop app
|
||||
> (library, store import, charts, settings) and the background Agent, which records a session when a
|
||||
> game in the library runs (unless you switched its recording off), injects only into games you enabled
|
||||
@@ -21,8 +21,9 @@
|
||||
>
|
||||
> - **Frame times and output resolution:** measured from the present call for Direct3D 11/12 and
|
||||
> OpenGL titles FrameLedger injects into. Vulkan titles are measured only when FrameLedger itself
|
||||
> starts the game with its Vulkan layer enabled, which today only the Agent's command-line launch
|
||||
> does. A Vulkan title started any other way is not observed by the layer; FrameLedger injects its
|
||||
> starts the game with its Vulkan layer enabled, which the Play button set to *Start directly* (since
|
||||
> beta.21) and the Agent's command-line launch do. A Vulkan title started any other way is not
|
||||
> observed by the layer; FrameLedger injects its
|
||||
> Direct3D component into it instead, and what that records on a Vulkan title has not been
|
||||
> verified. Direct3D 9 and every 32-bit title are not measured.
|
||||
> - **Which upscaler is running:** measured from the API a Direct3D title calls — DLSS or NIS through
|
||||
@@ -66,8 +67,8 @@
|
||||
> labelled with what it rests on; `N/A` where the executable names none. Since beta.19 also Unity's (from its
|
||||
> player library or its data file — without the release letter where only the library's number is readable),
|
||||
> Godot's (from its data pack) and RPG Maker's maker and version (MV and MZ from their core script; XP, VX and VX
|
||||
> Ace by their runtime library's version, which is not the editor's). RPG Maker 2000/2003 is not detected. Other
|
||||
> engines show what their own files state.
|
||||
> Ace by their runtime library's version, which is not the editor's). RPG Maker 2000/2003 is not detected. Since
|
||||
> beta.20 also Ren'Py's (from its engine's version file). Other engines show what their own files state.
|
||||
> - **The game's own memory (since beta.12):** its dedicated and shared GPU memory and its private
|
||||
> working set — the numbers Task Manager's Details tab shows — with its working set and commit, read
|
||||
> once a second from Windows' own counters, from outside the game, in every session: a game
|
||||
|
||||
+7
-6
@@ -113,8 +113,8 @@ Software running inside another process can, in principle, destabilize it. Frame
|
||||
Frame timing is derived from high-resolution timestamps taken at the moment the game presents each frame; upscaling, frame-generation and ray-tracing state are read from the parameters the game passes to those APIs. This is substantially more accurate than inferring settings from files on disk, but **no measurement is guaranteed to be exact**:
|
||||
|
||||
<!-- accuracy-block:begin -->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-06.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.18`** (2026-10-07), an unsigned installer built from that tag with its
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-10-13.** The software is a beta; its latest
|
||||
> **pre-release is `0.1.0-beta.21`** (2026-10-13), an unsigned installer built from that tag with its
|
||||
> checksums published beside it. The source holds the desktop app
|
||||
> (library, store import, charts, settings) and the background Agent, which records a session when a
|
||||
> game in the library runs (unless you switched its recording off), injects only into games you enabled
|
||||
@@ -123,8 +123,9 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
|
||||
>
|
||||
> - **Frame times and output resolution:** measured from the present call for Direct3D 11/12 and
|
||||
> OpenGL titles FrameLedger injects into. Vulkan titles are measured only when FrameLedger itself
|
||||
> starts the game with its Vulkan layer enabled, which today only the Agent's command-line launch
|
||||
> does. A Vulkan title started any other way is not observed by the layer; FrameLedger injects its
|
||||
> starts the game with its Vulkan layer enabled, which the Play button set to *Start directly* (since
|
||||
> beta.21) and the Agent's command-line launch do. A Vulkan title started any other way is not
|
||||
> observed by the layer; FrameLedger injects its
|
||||
> Direct3D component into it instead, and what that records on a Vulkan title has not been
|
||||
> verified. Direct3D 9 and every 32-bit title are not measured.
|
||||
> - **Which upscaler is running:** measured from the API a Direct3D title calls — DLSS or NIS through
|
||||
@@ -168,8 +169,8 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
|
||||
> labelled with what it rests on; `N/A` where the executable names none. Since beta.19 also Unity's (from its
|
||||
> player library or its data file — without the release letter where only the library's number is readable),
|
||||
> Godot's (from its data pack) and RPG Maker's maker and version (MV and MZ from their core script; XP, VX and VX
|
||||
> Ace by their runtime library's version, which is not the editor's). RPG Maker 2000/2003 is not detected. Other
|
||||
> engines show what their own files state.
|
||||
> Ace by their runtime library's version, which is not the editor's). RPG Maker 2000/2003 is not detected. Since
|
||||
> beta.20 also Ren'Py's (from its engine's version file). Other engines show what their own files state.
|
||||
> - **The game's own memory (since beta.12):** its dedicated and shared GPU memory and its private
|
||||
> working set — the numbers Task Manager's Details tab shows — with its working set and commit, read
|
||||
> once a second from Windows' own counters, from outside the game, in every session: a game
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# FrameLedger — Privacy Policy
|
||||
|
||||
**Version:** 2.8 · **Effective:** {{RELEASE_DATE}}
|
||||
**Version:** 2.10 · **Effective:** {{RELEASE_DATE}}
|
||||
|
||||
**Short version: everything stays on your PC. FrameLedger has no accounts, no telemetry, no analytics, and never uploads your data anywhere.**
|
||||
|
||||
@@ -29,6 +29,8 @@ There is no other request. In particular, the anti-cheat safety list and the det
|
||||
|
||||
GitHub's own privacy practices apply to requests it receives: <https://docs.github.com/privacy>.
|
||||
|
||||
Pressing Play hands the game to its store's app on your PC, which may connect to its store as it does whenever you start a game from it; FrameLedger itself connects to nothing.
|
||||
|
||||
## 3. Bug reports — always manual
|
||||
|
||||
The "Report a bug" feature builds a zip file **on your device**, shows you exactly which files it contains, and lets you inspect them. Nothing is transmitted by the app; **you** decide whether to attach the file to a GitHub issue in your browser. Logs are redacted (user directory paths removed) before bundling. Optional items (crash dumps, last-session metadata) are included only when you tick their checkboxes.
|
||||
@@ -39,7 +41,7 @@ An exported session (CSV or JSON) and a bug report can contain your games' names
|
||||
|
||||
## 4. What the app can technically observe
|
||||
|
||||
To do its job, FrameLedger observes: which of *your tracked* executables — the entries in your library whose recording is on — are running, and their process trees; the parameters your games pass to the graphics APIs it intercepts (presentation, upscaling, ray tracing, pipeline creation); the memory use of a tracked game's process — its dedicated and shared video memory, from Windows' GPU performance counters, and its working sets and commit, from Windows' process-memory information, for which a game it does not inject into is opened with the least access Windows offers and closed again (never its memory's content); loaded module names of a game being captured (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), the version marks an engine keeps in its own files (Unity's player library and the header of its data file, the header of a Godot data pack, an RPG Maker game's title, core script and Game.ini, and the library Game.ini names), and the store files that name it (Steam's and GOG's, on your disk) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; how busy the processor is and how much memory is in use, from Windows' own counters; the crash reports Windows keeps in its Application log about a tracked game's executable while it ran (to tell a crash from an ordinary exit — the reports are read, never sent anywhere); and the names of the programs a tracked game starts, so that a game's own crash reporter is recognised.
|
||||
To do its job, FrameLedger observes: which of *your tracked* executables — the entries in your library whose recording is on — are running, and their process trees; the parameters your games pass to the graphics APIs it intercepts (presentation, upscaling, ray tracing, pipeline creation); the memory use of a tracked game's process — its dedicated and shared video memory, from Windows' GPU performance counters, and its working sets and commit, from Windows' process-memory information, for which a game it does not inject into is opened with the least access Windows offers and closed again (never its memory's content); loaded module names of a game being captured (for detection and for the anti-cheat safety check); the names of the files in each library game's install folder, the version information of its executable and of the upscaling libraries it ships, the content of its executable file (the markers of the engine and of the graphics libraries it carries, the libraries it imports, and the engine build name an Unreal Engine game carries), the version marks an engine keeps in its own files (Unity's player library and the header of its data file, the header of a Godot data pack, an RPG Maker game's title, core script and Game.ini, the library Game.ini names, and the version file of a Ren'Py game's engine), and the store files that name it (Steam's and GOG's, on your disk) — to detect its engine, its engine version and its features and to check it for anti-cheat before any injection is possible; the lists of installed games that the Steam, GOG GALAXY, Epic Games and itch apps keep on your disk, and where GOG GALAXY is installed — read when you import your library and when you press Play, to find the store that installed a game and hand the game to that store's app; the size, position and state of a tracked game's window and the monitor it is on, read from Windows and not from the game, and — for a game FrameLedger injects into — whether the game asked for exclusive full-screen; the NVIDIA driver's settings for your tracked executables (read only: the DLSS and frame-generation overrides the NVIDIA App set); hardware sensor values from your graphics driver's own libraries; how busy the processor is and how much memory is in use, from Windows' own counters; the crash reports Windows keeps in its Application log about a tracked game's executable while it ran (to tell a crash from an ordinary exit — the reports are read, never sent anywhere); and the names of the programs a tracked game starts, so that a game's own crash reporter is recognised.
|
||||
|
||||
It does **not** read game memory outside those API parameters, and does not read game saves, chat, input content, network traffic, or anything unrelated to performance measurement. It records only for programs you added to your library and did not switch recording off for — a program whose recording is off is not watched at all — and injects only into games you individually enabled.
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"level, which made it a check that could not fire."
|
||||
],
|
||||
"schemaVersion": 2,
|
||||
"rulesVersion": "2026.10.2",
|
||||
"rulesVersion": "2026.10.4",
|
||||
|
||||
"engines": [
|
||||
{
|
||||
@@ -124,7 +124,7 @@
|
||||
{ "type": "dir_exists", "value": "renpy" },
|
||||
{ "type": "sibling_glob", "value": "*.rpa" }
|
||||
] },
|
||||
"version": null
|
||||
"version": { "type": "renpy_build" }
|
||||
},
|
||||
{
|
||||
"id": "cryengine",
|
||||
@@ -223,7 +223,9 @@
|
||||
{ "family": "EQU8", "match": "prefix", "values": [ "equ8" ],
|
||||
"note": "Splitgate. Documented (SteamDB EQU8); module names unmeasured." },
|
||||
{ "family": "Xigncode3", "match": "exact", "values": [ "x3.xem" ],
|
||||
"note": "x3.xem is XIGNCODE3's loader, LoadLibrary'd as an ordinary module (documented). The files row names the same token in the install tree." }
|
||||
"note": "x3.xem is XIGNCODE3's loader, LoadLibrary'd as an ordinary module (documented). The files row names the same token in the install tree." },
|
||||
{ "family": "Anti-Cheat Expert", "match": "exact", "values": [ "ACE-Base64.dll" ],
|
||||
"note": "ACE's user-mode module, MEASURED on disk 2026-10-13 in Wuthering Waves' AntiCheatExpert/ folder; that the game loads it is unmeasured. Exact, not prefix: 'ACE-' is four characters over a namespace we do not own. Appended, as every row since 2026-09-25." }
|
||||
],
|
||||
"drivers": [
|
||||
{ "family": "Riot Vanguard", "match": "exact", "values": [ "vgk.sys" ], "scope": "machine" },
|
||||
@@ -233,6 +235,8 @@
|
||||
"note": "MEASURED 2026-08-04: EasyAntiCheat_EOSSys was Running as a kernel driver while a real EAC title played, and matched NOTHING in this group — the refusal came from the service check instead. A family caught through only one of five groups is one rename away from being missed." },
|
||||
{ "family": "Anti-Cheat Expert", "match": "exact", "values": [ "ACE-BASE.sys", "ACE-ADVT.sys", "ACE-GAME.sys" ], "scope": "machine",
|
||||
"note": "ACE-BASE.sys and ACE-ADVT.sys MEASURED under System32\\drivers on the dev machine 2026-08-04. ACE-GAME.sys is a documented sibling and is UNMEASURED: a blocklist may over-cover, never under-cover. Exact not prefix — 'ACE-' is four characters over a namespace we do not own." },
|
||||
{ "family": "Anti-Cheat Expert", "match": "exact", "values": [ "ACE-CORE.sys" ], "scope": "machine",
|
||||
"note": "On disk beside ACE-BASE.sys in Wuthering Waves' AntiCheatExpert/ folder (MEASURED 2026-10-13); that it loads is unmeasured. Exact, as the row above." },
|
||||
{ "family": "BattlEye", "match": "exact", "values": [ "BEDaisy.sys" ], "scope": "machine",
|
||||
"note": "BattlEye's kernel driver, loaded by BEService while a protected game runs and unloaded after (documented, BattlEye FAQ). Unmeasured." },
|
||||
{ "family": "FACEIT", "match": "exact", "values": [ "FACEIT.sys" ], "scope": "machine",
|
||||
@@ -262,7 +266,7 @@
|
||||
{ "family": "Easy Anti-Cheat", "values": [ "EasyAntiCheat", "EasyAntiCheat_EOS" ] },
|
||||
{ "family": "BattlEye", "values": [ "BattlEye" ] },
|
||||
{ "family": "Anti-Cheat Expert", "values": [ "AntiCheatExpert", "AceAntibotClient" ],
|
||||
"note": "Documented (SteamDB FileDetectionRuleSets, AntiCheatExpert). Unmeasured." },
|
||||
"note": "Documented (SteamDB FileDetectionRuleSets). AntiCheatExpert MEASURED 2026-10-13 beside the executables of Wuthering Waves and Neverness To Everness, reached from the executable's own folder and never from the root. AceAntibotClient is unmeasured." },
|
||||
{ "family": "nProtect GameGuard", "values": [ "GameGuard" ] },
|
||||
{ "family": "Xigncode3", "values": [ "XIGNCODE", "XIGNCODE3" ] },
|
||||
{ "family": "AhnLab HackShield", "values": [ "HShield" ],
|
||||
@@ -278,8 +282,8 @@
|
||||
{ "family": "Easy Anti-Cheat", "values": [ "EasyAntiCheat", "EasyAntiCheat_EOS", "EasyAntiCheat_EOSSys" ] },
|
||||
{ "family": "Riot Vanguard", "values": [ "vgc", "vgk" ],
|
||||
"note": "vgk is the kernel driver's service, started at boot like vgk.sys itself." },
|
||||
{ "family": "Anti-Cheat Expert", "values": [ "AntiCheatExpert Protection", "AntiCheatExpert Service" ],
|
||||
"note": "'AntiCheatExpert Protection' MEASURED registered on the dev machine 2026-08-04 by Neverness To Everness. The sibling name is unmeasured." },
|
||||
{ "family": "Anti-Cheat Expert", "values": [ "AntiCheatExpert Protection", "AntiCheatExpert Service", "ACE-BASE" ],
|
||||
"note": "'AntiCheatExpert Protection' MEASURED registered on the dev machine 2026-08-04 by Neverness To Everness; 'ACE-BASE', the kernel service of ACE-BASE.sys, MEASURED registered there 2026-10-13. 'AntiCheatExpert Service' is unmeasured." },
|
||||
{ "family": "BattlEye", "values": [ "BEService", "BEDaisy" ],
|
||||
"note": "BEService is started by a protected game and stops after it; BEDaisy is the driver's service. A stopped service is absent (19_SAFETY). Unmeasured." },
|
||||
{ "family": "FACEIT", "values": [ "FACEIT", "FACEITService" ],
|
||||
@@ -298,6 +302,8 @@
|
||||
"note": "Shipped beside the game. This note said 'not a loadable module' until 2026-09-25: XIGNCODE3 LoadLibrary's x3.xem as its loader (documented), which is why the modules group names it too." },
|
||||
{ "family": "Anti-Cheat Expert", "values": [ "PGameProtectDriver_X64.sys", "SGuard64.exe", "SGuardSvc64.exe" ],
|
||||
"note": "A KERNEL DRIVER shipped inside the game install. MEASURED at 'Neverness To Everness/NTEGlobal/driver/' 2026-08-04, where check 4 returned Allow: no group named it, and the fuzzy tier is modules-only — so a name containing 'protect' sat in the game's tree and the static scan walked past." },
|
||||
{ "family": "Anti-Cheat Expert", "values": [ "ACE-BASE.sys", "ACE-CORE.sys", "ACE-Base64.dll", "ACE-Service64.exe", "ACE-Setup64.exe" ],
|
||||
"note": "MEASURED 2026-10-13 in Wuthering Waves' Client/Binaries/Win64/AntiCheatExpert/, beside its executable and four levels under its install root, which the walk from the root never opened: check 4 also walks the executable's own folder since then." },
|
||||
{ "family": "Easy Anti-Cheat", "values": [ "EasyAntiCheat_EOS_Setup.exe", "EasyAntiCheat_Setup.exe", "EasyAntiCheat_x64.dll", "EasyAntiCheat_x86.dll", "EasyAntiCheat_EOS.sys", "start_protected_game.exe", "eac_server64.dll" ],
|
||||
"note": "For a layout where the EasyAntiCheat folder sits deeper than the scan reaches. start_protected_game.exe is the EAC launcher FromSoftware titles ship (ELDEN RING's appeared in the owner's Windows Application log on 2026-09-21)." },
|
||||
{ "family": "BattlEye", "values": [ "BEService.exe", "BEService_x64.exe", "BEClient.dll", "BEClient_x64.dll", "BEDaisy.sys" ],
|
||||
@@ -418,6 +424,7 @@
|
||||
{ "store": "steam", "id": "2139460", "family": "NetEase Anti-Cheat", "reason": "Protected by NetEase's kernel anti-cheat (NEAC)." },
|
||||
{ "store": "steam", "id": "2507950", "family": "Anti-Cheat Expert", "reason": "Protected by Tencent Anti-Cheat Expert (ACE), a kernel anti-cheat." },
|
||||
{ "store": "steam", "id": "2073620", "family": "Anti-Cheat Expert", "reason": "Protected by Tencent Anti-Cheat Expert (ACE), a kernel anti-cheat." },
|
||||
{ "store": "steam", "id": "3513350", "family": "Anti-Cheat Expert", "reason": "Wuthering Waves, protected by Tencent Anti-Cheat Expert (ACE), a kernel anti-cheat." },
|
||||
{ "store": "steam", "id": "1517290", "family": "EA AntiCheat", "reason": "Protected by EA AntiCheat (Javelin), a kernel anti-cheat." },
|
||||
{ "store": "steam", "id": "2807960", "family": "EA AntiCheat", "reason": "Protected by EA AntiCheat (Javelin), a kernel anti-cheat." },
|
||||
{ "store": "steam", "id": "2669320", "family": "EA AntiCheat", "reason": "Protected by EA AntiCheat (Javelin), a kernel anti-cheat." },
|
||||
|
||||
@@ -198,12 +198,12 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"$comment": "beta.10: Unreal Engine's build facts (the shipping executable's numeric file version and the engine's branch name inside it), decided in code (Domain.Detection.UnrealVersion) rather than by a pattern - which is why it takes no parameter. beta.19 adds Unity's (the player library's version resource, the data file's header), Godot's (a data pack's header, the executable's version resource) and RPG Maker's (MV/MZ's core-script header, the RGSS library Game.ini names), decided by UnityVersion, GodotVersion and RpgMakerVersion.",
|
||||
"$comment": "beta.10: Unreal Engine's build facts (the shipping executable's numeric file version and the engine's branch name inside it), decided in code (Domain.Detection.UnrealVersion) rather than by a pattern - which is why it takes no parameter. beta.19 adds Unity's (the player library's version resource, the data file's header), Godot's (a data pack's header, the executable's version resource) and RPG Maker's (MV/MZ's core-script header, the RGSS library Game.ini names), decided by UnityVersion, GodotVersion and RpgMakerVersion. beta.20 adds Ren'Py's (the version line of the engine's renpy/vc_version.py), decided by RenPyVersion.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["type"],
|
||||
"properties": {
|
||||
"type": { "enum": ["unreal_build", "unity_build", "godot_build", "rpgmaker_build"] }
|
||||
"type": { "enum": ["unreal_build", "unity_build", "godot_build", "rpgmaker_build", "renpy_build"] }
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -110,6 +110,8 @@ public partial class App : System.Windows.Application
|
||||
_host = BuildHost(_db, appearance, registered, closePolicy);
|
||||
await _host.StartAsync().ConfigureAwait(true);
|
||||
Log.Information("ui: started ({Version}), ledger {Ledger}", UiIdentity.Version, UiPaths.Database);
|
||||
// beta.21: tier 0 is software rendering (a VM without a GPU, Remote Desktop) - every scroll drawn on the CPU.
|
||||
Log.Information("ui: render tier {Tier} (2 = the GPU draws; 0 = software)", System.Windows.Media.RenderCapability.Tier >> 16);
|
||||
if (UiPaths.IsViewer)
|
||||
{
|
||||
Log.Warning("ui: a VIEWER over {Folder} (--data-dir, D52): no Agent is started or contacted, nothing on this PC is changed", UiPaths.DataDirectory);
|
||||
@@ -192,7 +194,8 @@ public partial class App : System.Windows.Application
|
||||
Log.Warning(ex, "diag: the hardware could not be read; its lines are n/a");
|
||||
}
|
||||
|
||||
string report = DiagReport.Build(UiIdentity.Version, UiPaths.DataDirectory, UiPaths.Logs, schema, values, new AgentLauncher().CanLaunch, now, hardware);
|
||||
string report = DiagReport.Build(UiIdentity.Version, UiPaths.DataDirectory, UiPaths.Logs, schema, values, new AgentLauncher().CanLaunch, now, hardware,
|
||||
System.Windows.Media.RenderCapability.Tier >> 16);
|
||||
string path = DiagReport.Write(UiPaths.Logs, report, now);
|
||||
await Console.Out.WriteLineAsync(string.Format(CultureInfo.CurrentCulture, Strings.Diag_Written_Format, path)).ConfigureAwait(true);
|
||||
Log.Information("ui: --diag written to {Path}", path);
|
||||
@@ -418,6 +421,14 @@ public partial class App : System.Windows.Application
|
||||
services.AddSingleton<IStoreLibrarySource>(static _ => new EpicLibrarySource());
|
||||
services.AddSingleton<IStoreLibrarySource>(static _ => new ItchLibrarySource(log: static line => Serilog.Log.Information("{Line}", line)));
|
||||
services.AddSingleton<IExecutableLocator, ExecutableLocator>();
|
||||
// beta.21 (D59): Play reads the same records to find the store that installed a game, and GOG GALAXY's program.
|
||||
services.AddSingleton<Application.Play.IGogGalaxyLocator>(static _ => new GogGalaxyLocator());
|
||||
services.AddSingleton(static sp => new GamePlayer(
|
||||
sp.GetRequiredService<Application.Settings.RegisteredSettings>(),
|
||||
sp.GetServices<IStoreLibrarySource>(),
|
||||
sp.GetRequiredService<Application.Play.IGogGalaxyLocator>(),
|
||||
sp.GetRequiredService<IShellStarter>(),
|
||||
sp.GetRequiredService<IAgentRequests>()));
|
||||
services.AddSingleton<IExecutableIdentitySource, ExecutableIdentitySource>();
|
||||
services.AddSingleton(static sp => new LibraryImporter(
|
||||
sp.GetServices<IStoreLibrarySource>(),
|
||||
|
||||
@@ -97,9 +97,8 @@ public partial class DocumentBrowser : UserControl
|
||||
|
||||
private void ShowPage(DocumentPage? page)
|
||||
{
|
||||
View.DocumentPath = page?.Path;
|
||||
View.IsPlainText = page?.IsPlainText ?? false;
|
||||
View.MarkdownText = page?.Text ?? string.Empty;
|
||||
// One render, now (beta.21): the three properties one by one rendered the old text under the new path first.
|
||||
View.Show(page?.Text ?? string.Empty, page?.IsPlainText ?? false, page?.Path);
|
||||
AutomationProperties.SetName(View, page?.Title ?? string.Empty);
|
||||
PageChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Threading;
|
||||
using FrameLedger.App.Markdown;
|
||||
using FrameLedger.App.Services;
|
||||
|
||||
@@ -18,8 +21,32 @@ namespace FrameLedger.App.Controls;
|
||||
/// (<see cref="RepositoryLinkRequested"/>), which shows it when the App embeds it, and otherwise opens on GitHub at this
|
||||
/// build's source (<see cref="RepositoryLinks"/>); anything else is not followed.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// <b>The wheel (beta.21, owner request 2026-10-13: "scrolling the documents is slow").</b> WPF's scroll viewer moves a
|
||||
/// fixed 48 DIP per wheel message, whatever its delta — about two and a half lines of body text, Windows' "lines to
|
||||
/// scroll" ignored, and a precision touchpad's small deltas each jumping the whole step (measured: −1, −15, −120 and −360
|
||||
/// all moved 48). Layout costs about a millisecond a step, so the step was the problem, not drawing. The view now moves
|
||||
/// <see cref="WheelStep"/>: the delta in proportion, Windows' lines per notch at a browser's line (100/3 DIP), scaled by
|
||||
/// the zoom — and eases there over about 120 ms unless Windows' animations are off. At either end it leaves the wheel
|
||||
/// unhandled, so whatever holds the view (the update notes' dialog) scrolls instead. Ctrl+wheel stays the zoom.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>One render per page.</b> Each of the three properties rendered the whole document on its own, so a page change
|
||||
/// rendered the old text under the new path first, and the Legal Gate's three bindings rendered three times. Property
|
||||
/// changes now ask for one render, posted to the dispatcher ahead of layout; <see cref="Show"/> sets all three and renders
|
||||
/// at once; and a document this view has rendered is kept (<see cref="CacheCapacity"/>), so going back to a page costs
|
||||
/// its layout and nothing else.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public sealed class MarkdownView : FlowDocumentScrollViewer
|
||||
{
|
||||
/// <summary>A line of the wheel's step: Chromium scrolls 100 DIP for Windows' default three lines at 100%.</summary>
|
||||
internal const double WheelLineDip = 100.0 / 3.0;
|
||||
|
||||
/// <summary>How many rendered documents one view keeps (the user guide has twelve pages and Limitations).</summary>
|
||||
internal const int CacheCapacity = 16;
|
||||
|
||||
public static readonly DependencyProperty MarkdownTextProperty =
|
||||
DependencyProperty.Register(nameof(MarkdownText), typeof(string), typeof(MarkdownView), new PropertyMetadata(null, OnSourceChanged));
|
||||
|
||||
@@ -29,7 +56,18 @@ public sealed class MarkdownView : FlowDocumentScrollViewer
|
||||
public static readonly DependencyProperty DocumentPathProperty =
|
||||
DependencyProperty.Register(nameof(DocumentPath), typeof(string), typeof(MarkdownView), new PropertyMetadata(null, OnSourceChanged));
|
||||
|
||||
private readonly Dictionary<RenderKey, RenderedMarkdown> _cache = [];
|
||||
private readonly LinkedList<RenderKey> _recent = new();
|
||||
private IReadOnlyDictionary<string, Block> _anchors = new Dictionary<string, Block>(StringComparer.Ordinal);
|
||||
private RenderKey? _shown;
|
||||
private bool _batching;
|
||||
private DispatcherOperation? _pending;
|
||||
|
||||
private ScrollViewer? _scroller;
|
||||
private double _wheelTarget = double.NaN;
|
||||
private double _lastSetOffset = double.NaN;
|
||||
private TimeSpan _lastFrame;
|
||||
private bool _easing;
|
||||
|
||||
public MarkdownView()
|
||||
{
|
||||
@@ -38,7 +76,8 @@ public sealed class MarkdownView : FlowDocumentScrollViewer
|
||||
VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
|
||||
Focusable = true;
|
||||
AddHandler(Hyperlink.RequestNavigateEvent, new RequestNavigateEventHandler(OnRequestNavigate));
|
||||
Rebuild();
|
||||
Unloaded += (_, _) => StopEasing();
|
||||
RenderNow();
|
||||
}
|
||||
|
||||
/// <summary>A link to another file of the repository; the host shows it and sets Handled, or it opens on GitHub.</summary>
|
||||
@@ -69,31 +108,226 @@ public sealed class MarkdownView : FlowDocumentScrollViewer
|
||||
public IUrlOpener UrlOpener { get; set; } = new ShellUrlOpener();
|
||||
|
||||
/// <summary>The headings this document can scroll to, by anchor.</summary>
|
||||
public IReadOnlyCollection<string> Anchors => [.. _anchors.Keys];
|
||||
public IReadOnlyCollection<string> Anchors
|
||||
{
|
||||
get
|
||||
{
|
||||
RenderIfPending();
|
||||
return [.. _anchors.Keys];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>How many documents this view has rendered from text — a cache hit is not one (for tests).</summary>
|
||||
internal int Renders { get; private set; }
|
||||
|
||||
/// <summary>Where the wheel is taking the view, or NaN when it is not easing it there (for tests).</summary>
|
||||
internal double ScrollTarget => _wheelTarget;
|
||||
|
||||
/// <summary>The template's scroll viewer, once the template is applied (for tests).</summary>
|
||||
internal ScrollViewer? Scroller => _scroller;
|
||||
|
||||
/// <summary>The modifier keys held, read when the wheel turns; a test gives its own rather than the real keyboard's.</summary>
|
||||
internal Func<ModifierKeys> CurrentModifiers { get; set; } = static () => Keyboard.Modifiers;
|
||||
|
||||
/// <summary>Windows' "lines to scroll" per notch (−1: a screen); a test gives its own.</summary>
|
||||
internal Func<int> WheelScrollLines { get; set; } = static () => SystemParameters.WheelScrollLines;
|
||||
|
||||
/// <summary>Whether the wheel eases to its target; off where Windows' animations are, and in tests.</summary>
|
||||
internal bool EaseWheel { get; set; } = SystemParameters.ClientAreaAnimation;
|
||||
|
||||
/// <summary>Shows a document: the three properties at once, rendered once, now.</summary>
|
||||
public void Show(string? text, bool isPlainText, string? path)
|
||||
{
|
||||
_batching = true;
|
||||
try
|
||||
{
|
||||
DocumentPath = path;
|
||||
IsPlainText = isPlainText;
|
||||
MarkdownText = text;
|
||||
}
|
||||
finally
|
||||
{
|
||||
_batching = false;
|
||||
}
|
||||
|
||||
RenderNow();
|
||||
}
|
||||
|
||||
/// <summary>Brings the heading with <paramref name="anchor"/> into view; whether the document has it.</summary>
|
||||
public bool ScrollTo(string anchor)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(anchor);
|
||||
RenderIfPending();
|
||||
if (!_anchors.TryGetValue(anchor, out Block? block))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
StopEasing();
|
||||
block.BringIntoView();
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => ((MarkdownView)d).Rebuild();
|
||||
|
||||
private void Rebuild()
|
||||
/// <summary>
|
||||
/// The distance one wheel message moves the view, in DIP (positive: down). <paramref name="delta"/> in proportion (120 is a
|
||||
/// notch); <paramref name="wheelScrollLines"/> lines per notch at <see cref="WheelLineDip"/>, or a screen
|
||||
/// (<paramref name="viewportHeight"/>) when Windows says −1; scaled by <paramref name="zoomPercent"/>.
|
||||
/// </summary>
|
||||
internal static double WheelStep(int delta, int wheelScrollLines, double viewportHeight, double zoomPercent)
|
||||
{
|
||||
string text = MarkdownText ?? string.Empty;
|
||||
RenderedMarkdown rendered = IsPlainText ? MarkdownRenderer.RenderPlainText(text) : MarkdownRenderer.Render(text, DocumentPath);
|
||||
double notches = delta / 120.0;
|
||||
double perNotch = wheelScrollLines < 0 ? viewportHeight : wheelScrollLines * WheelLineDip * zoomPercent / 100.0;
|
||||
return -notches * perNotch;
|
||||
}
|
||||
|
||||
public override void OnApplyTemplate()
|
||||
{
|
||||
base.OnApplyTemplate();
|
||||
StopEasing();
|
||||
_scroller = GetTemplateChild("PART_ContentHost") as ScrollViewer;
|
||||
}
|
||||
|
||||
protected override void OnPreviewMouseWheel(MouseWheelEventArgs e)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(e);
|
||||
base.OnPreviewMouseWheel(e);
|
||||
if (e.Handled || _scroller is not { } scroller || (CurrentModifiers() & ModifierKeys.Control) != ModifierKeys.None)
|
||||
{
|
||||
return; // Ctrl+wheel is the zoom
|
||||
}
|
||||
|
||||
double step = WheelStep(e.Delta, WheelScrollLines(), scroller.ViewportHeight, Zoom);
|
||||
if (step == 0 || double.IsNaN(step))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
double from = double.IsNaN(_wheelTarget) ? scroller.VerticalOffset : _wheelTarget;
|
||||
double to = Math.Clamp(from + step, 0, scroller.ScrollableHeight);
|
||||
if (Math.Abs(to - scroller.VerticalOffset) < 0.5 && double.IsNaN(_wheelTarget))
|
||||
{
|
||||
return; // at the end it would move toward: the wheel is the host's
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
if (!EaseWheel)
|
||||
{
|
||||
scroller.ScrollToVerticalOffset(to);
|
||||
return;
|
||||
}
|
||||
|
||||
_wheelTarget = to;
|
||||
if (!_easing)
|
||||
{
|
||||
_easing = true;
|
||||
_lastFrame = TimeSpan.Zero;
|
||||
_lastSetOffset = scroller.VerticalOffset;
|
||||
CompositionTarget.Rendering += OnRendering;
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => ((MarkdownView)d).RequestRender();
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD001:Avoid legacy thread switching APIs", Justification = "a WPF application has no JoinableTaskFactory; this posts to the view's own dispatcher from its own thread, at a priority ahead of layout, and never waits (ScrollBarHiding does the same)")]
|
||||
private void RequestRender()
|
||||
{
|
||||
if (_batching || _pending is not null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Ahead of layout, after whatever is setting the other properties has set them.
|
||||
_pending = Dispatcher.InvokeAsync(RenderIfPending, DispatcherPriority.DataBind);
|
||||
}
|
||||
|
||||
private void RenderIfPending()
|
||||
{
|
||||
if (_pending is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
RenderNow();
|
||||
}
|
||||
|
||||
private void RenderNow()
|
||||
{
|
||||
if (_pending is { } pending)
|
||||
{
|
||||
_ = pending.Abort();
|
||||
_pending = null;
|
||||
}
|
||||
|
||||
var key = new RenderKey(DocumentPath, IsPlainText, MarkdownText ?? string.Empty);
|
||||
if (_shown is { } shown && shown.Equals(key))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_cache.TryGetValue(key, out RenderedMarkdown? rendered))
|
||||
{
|
||||
rendered = key.IsPlainText ? MarkdownRenderer.RenderPlainText(key.Text) : MarkdownRenderer.Render(key.Text, key.Path);
|
||||
Renders++;
|
||||
_cache[key] = rendered;
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = _recent.Remove(key);
|
||||
}
|
||||
|
||||
_ = _recent.AddFirst(key);
|
||||
while (_recent.Count > CacheCapacity && _recent.Last is { } oldest)
|
||||
{
|
||||
_ = _cache.Remove(oldest.Value);
|
||||
_recent.RemoveLast();
|
||||
}
|
||||
|
||||
StopEasing();
|
||||
_anchors = rendered.Anchors;
|
||||
_shown = key;
|
||||
Document = rendered.Document;
|
||||
}
|
||||
|
||||
private void OnRendering(object? sender, EventArgs e)
|
||||
{
|
||||
if (_scroller is not { } scroller || double.IsNaN(_wheelTarget))
|
||||
{
|
||||
StopEasing();
|
||||
return;
|
||||
}
|
||||
|
||||
// Something else moved the view since the last frame (the scroll bar, the keyboard, a link): it is theirs now.
|
||||
if (Math.Abs(scroller.VerticalOffset - _lastSetOffset) > 1)
|
||||
{
|
||||
StopEasing();
|
||||
return;
|
||||
}
|
||||
|
||||
TimeSpan now = (e as RenderingEventArgs)?.RenderingTime ?? TimeSpan.Zero;
|
||||
double elapsedMs = _lastFrame == TimeSpan.Zero ? 16 : Math.Clamp((now - _lastFrame).TotalMilliseconds, 1, 100);
|
||||
_lastFrame = now;
|
||||
|
||||
// Exponential ease-out: about 95% of the way in 120 ms, however many notches have been added on the way.
|
||||
double remaining = _wheelTarget - scroller.VerticalOffset;
|
||||
double next = Math.Abs(remaining) < 0.5 ? _wheelTarget : scroller.VerticalOffset + (remaining * (1 - Math.Exp(-elapsedMs / 40.0)));
|
||||
scroller.ScrollToVerticalOffset(next);
|
||||
_lastSetOffset = next;
|
||||
if (next == _wheelTarget)
|
||||
{
|
||||
StopEasing();
|
||||
}
|
||||
}
|
||||
|
||||
private void StopEasing()
|
||||
{
|
||||
_wheelTarget = double.NaN;
|
||||
if (_easing)
|
||||
{
|
||||
_easing = false;
|
||||
CompositionTarget.Rendering -= OnRendering;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
e.Handled = true;
|
||||
@@ -116,4 +350,7 @@ public sealed class MarkdownView : FlowDocumentScrollViewer
|
||||
_ = ScrollTo(anchor);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>What a rendered document depends on: theme and language are not in it — its colours are resource references.</summary>
|
||||
private readonly record struct RenderKey(string? Path, bool IsPlainText, string Text);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ public static class MarkdownRenderer
|
||||
int columns = Math.Max(table.ColumnDefinitions.Count, rows.Select(static r => r.Count).DefaultIfEmpty(0).Max());
|
||||
for (int i = 0; i < columns; i++)
|
||||
{
|
||||
wpf.Columns.Add(new TableColumn { Width = GridLength.Auto });
|
||||
wpf.Columns.Add(new TableColumn()); // WPF's default width is already Auto (read by reflection, beta.21)
|
||||
}
|
||||
|
||||
var group = new TableRowGroup();
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Top">
|
||||
<!-- beta.21 (D59): Play, through the store that installed the game or started directly (Settings ▸ Games). -->
|
||||
<ui:Button Margin="0,0,8,0" Appearance="Primary" Command="{Binding ViewModel.PlayCommand}" Content="{x:Static vm:GameDetailViewModel.PlayText}"
|
||||
Icon="{ui:SymbolIcon Play24}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" ToolTip="{Binding ViewModel.PlayToolTip}" />
|
||||
<ui:Button Margin="0,0,8,0" Command="{Binding ViewModel.EditCommand}" Content="{x:Static vm:GameDetailViewModel.EditText}" Icon="{ui:SymbolIcon Edit24}" />
|
||||
<ui:Button Margin="0,0,8,0" Command="{Binding ViewModel.ChangeExecutableCommand}" Content="{x:Static vm:GameDetailViewModel.ChangeExecutableText}" Icon="{ui:SymbolIcon DocumentArrowRight24}" />
|
||||
<ui:Button Appearance="Danger" Command="{Binding ViewModel.RemoveCommand}" Content="{x:Static vm:GameDetailViewModel.RemoveText}" Icon="{ui:SymbolIcon Delete24}" />
|
||||
@@ -74,7 +77,7 @@
|
||||
<StackPanel>
|
||||
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static vm:GameDetailViewModel.SupportsHeader}" />
|
||||
<ui:TextBlock Margin="0,6,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap"
|
||||
Text="{x:Static vm:GameDetailViewModel.SupportsEmptyText}"
|
||||
Text="{Binding ViewModel.SupportsEmptyText}"
|
||||
Visibility="{Binding ViewModel.SupportsEmpty, Converter={StaticResource BoolToVis}}" />
|
||||
<ItemsControl Margin="0,6,0,0" ItemsSource="{Binding ViewModel.Supports}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
|
||||
@@ -79,36 +79,46 @@
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:GameCardViewModel}">
|
||||
<ui:CardAction IsChevronVisible="False" VerticalAlignment="Stretch" VerticalContentAlignment="Top"
|
||||
Command="{Binding DataContext.ViewModel.OpenCommand, RelativeSource={RelativeSource AncestorType=Page}}"
|
||||
<Grid>
|
||||
<ui:CardAction IsChevronVisible="False" VerticalAlignment="Stretch" VerticalContentAlignment="Top"
|
||||
Command="{Binding DataContext.ViewModel.OpenCommand, RelativeSource={RelativeSource AncestorType=Page}}"
|
||||
CommandParameter="{Binding}"
|
||||
Icon="{ui:SymbolIcon Games24}">
|
||||
<StackPanel>
|
||||
<ui:TextBlock Margin="0,0,40,0" FontTypography="BodyStrong" Text="{Binding Name}" TextTrimming="CharacterEllipsis" />
|
||||
<!-- Pills wrap to a second line rather than being cut (the third one was, at 300 px). -->
|
||||
<WrapPanel Margin="0,4,0,0">
|
||||
<Border Style="{StaticResource TagPill}" Margin="0,0,6,4"
|
||||
Visibility="{Binding HasPlatform, Converter={StaticResource BoolToVis}}">
|
||||
<TextBlock Style="{StaticResource TagPillText}" Text="{Binding PlatformText}" />
|
||||
</Border>
|
||||
<Border Style="{StaticResource TagPill}" Margin="0,0,6,4"
|
||||
Visibility="{Binding HasEngine, Converter={StaticResource BoolToVis}}">
|
||||
<TextBlock Style="{StaticResource TagPillText}" Text="{Binding EngineText}" />
|
||||
</Border>
|
||||
<Border Style="{StaticResource HookStatePill}" Margin="0,0,6,4">
|
||||
<TextBlock Style="{StaticResource HookStatePillText}" Text="{Binding HookText}" />
|
||||
</Border>
|
||||
<Border x:Name="NotInstalledPill" Style="{StaticResource TagPill}" Margin="0,0,6,4"
|
||||
ToolTip="{Binding NotInstalledToolTip}"
|
||||
Visibility="{Binding NotInstalled, Converter={StaticResource BoolToVis}}">
|
||||
<TextBlock Style="{StaticResource TagPillText}" Text="{x:Static res:Strings.Games_Card_NotInstalled}" />
|
||||
</Border>
|
||||
</WrapPanel>
|
||||
<ui:TextBlock Margin="0,2,0,0" Style="{StaticResource SecondaryText}" Text="{Binding SessionsText}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding PlaytimeText}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding LastPlayedText}" />
|
||||
</StackPanel>
|
||||
</ui:CardAction>
|
||||
<!-- beta.21 (D59): Play, over the card's corner rather than inside it, so the card stays one button. -->
|
||||
<ui:Button Margin="0,10,10,0" Padding="6,4" HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Play_Button}"
|
||||
Command="{Binding DataContext.ViewModel.PlayCommand, RelativeSource={RelativeSource AncestorType=Page}}"
|
||||
CommandParameter="{Binding}"
|
||||
Icon="{ui:SymbolIcon Games24}">
|
||||
<StackPanel>
|
||||
<ui:TextBlock FontTypography="BodyStrong" Text="{Binding Name}" TextTrimming="CharacterEllipsis" />
|
||||
<!-- Pills wrap to a second line rather than being cut (the third one was, at 300 px). -->
|
||||
<WrapPanel Margin="0,4,0,0">
|
||||
<Border Style="{StaticResource TagPill}" Margin="0,0,6,4"
|
||||
Visibility="{Binding HasPlatform, Converter={StaticResource BoolToVis}}">
|
||||
<TextBlock Style="{StaticResource TagPillText}" Text="{Binding PlatformText}" />
|
||||
</Border>
|
||||
<Border Style="{StaticResource TagPill}" Margin="0,0,6,4"
|
||||
Visibility="{Binding HasEngine, Converter={StaticResource BoolToVis}}">
|
||||
<TextBlock Style="{StaticResource TagPillText}" Text="{Binding EngineText}" />
|
||||
</Border>
|
||||
<Border Style="{StaticResource HookStatePill}" Margin="0,0,6,4">
|
||||
<TextBlock Style="{StaticResource HookStatePillText}" Text="{Binding HookText}" />
|
||||
</Border>
|
||||
<Border x:Name="NotInstalledPill" Style="{StaticResource TagPill}" Margin="0,0,6,4"
|
||||
ToolTip="{Binding NotInstalledToolTip}"
|
||||
Visibility="{Binding NotInstalled, Converter={StaticResource BoolToVis}}">
|
||||
<TextBlock Style="{StaticResource TagPillText}" Text="{x:Static res:Strings.Games_Card_NotInstalled}" />
|
||||
</Border>
|
||||
</WrapPanel>
|
||||
<ui:TextBlock Margin="0,2,0,0" Style="{StaticResource SecondaryText}" Text="{Binding SessionsText}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding PlaytimeText}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding LastPlayedText}" />
|
||||
</StackPanel>
|
||||
</ui:CardAction>
|
||||
Icon="{ui:SymbolIcon Play24}"
|
||||
IsEnabled="{Binding DataContext.ViewModel.ActsOnThisPc, RelativeSource={RelativeSource AncestorType=Page}}"
|
||||
ToolTip="{Binding DataContext.ViewModel.PlayToolTip, RelativeSource={RelativeSource AncestorType=Page}}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
@@ -120,6 +130,20 @@
|
||||
MouseDoubleClick="OnListDoubleClick" KeyDown="OnListKeyDown"
|
||||
Visibility="{Binding ViewModel.ListView, Converter={StaticResource BoolToVis}}">
|
||||
<DataGrid.Columns>
|
||||
<!-- beta.21 (D59): Play, as on the cards. -->
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Play_Button}" Width="Auto">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ui:Button Margin="2,0" Padding="6,2" Appearance="Transparent"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Play_Button}"
|
||||
Command="{Binding DataContext.ViewModel.PlayCommand, RelativeSource={RelativeSource AncestorType=Page}}"
|
||||
CommandParameter="{Binding}"
|
||||
Icon="{ui:SymbolIcon Play24}"
|
||||
IsEnabled="{Binding DataContext.ViewModel.ActsOnThisPc, RelativeSource={RelativeSource AncestorType=Page}}"
|
||||
ToolTip="{Binding DataContext.ViewModel.PlayToolTip, RelativeSource={RelativeSource AncestorType=Page}}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_Name}" Binding="{Binding Name}" Width="3*" />
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_Store}" Binding="{Binding PlatformText}" Width="Auto" />
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_Engine}" Binding="{Binding EngineText}" Width="*" />
|
||||
|
||||
@@ -299,6 +299,24 @@
|
||||
SelectedValuePath="Value" />
|
||||
</ui:CardControl>
|
||||
|
||||
<!-- beta.21 (owner decision D59): what Play does. The App's own setting; the Agent never reads it. -->
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Games_Header}" />
|
||||
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Play24}">
|
||||
<ui:CardControl.Header>
|
||||
<StackPanel>
|
||||
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Settings_PlayMode_Label}" />
|
||||
<ui:TextBlock MaxWidth="520" HorizontalAlignment="Left" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
|
||||
Text="{x:Static res:Strings.Settings_PlayMode_Body}" />
|
||||
</StackPanel>
|
||||
</ui:CardControl.Header>
|
||||
<ComboBox MinWidth="160"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Settings_PlayMode_Label}"
|
||||
DisplayMemberPath="Label"
|
||||
ItemsSource="{Binding ViewModel.PlayModes}"
|
||||
SelectedValue="{Binding ViewModel.PlayMode, Mode=TwoWay}"
|
||||
SelectedValuePath="Value" />
|
||||
</ui:CardControl>
|
||||
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Window_Header}" />
|
||||
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Power24}">
|
||||
<ui:CardControl.Header>
|
||||
|
||||
@@ -26,7 +26,8 @@ public static class DiagReport
|
||||
}
|
||||
|
||||
/// <summary>The report text. <paramref name="settings"/> is every registry key's effective value; <paramref name="schemaVersion"/> null when the ledger could not be opened.</summary>
|
||||
public static string Build(string appVersion, string dataDirectory, string logsDirectory, long? schemaVersion, IReadOnlyDictionary<string, string> settings, bool agentBesideApp, DateTimeOffset now, HardwareSnapshot? hardware = null)
|
||||
public static string Build(string appVersion, string dataDirectory, string logsDirectory, long? schemaVersion, IReadOnlyDictionary<string, string> settings, bool agentBesideApp, DateTimeOffset now, HardwareSnapshot? hardware = null,
|
||||
int? renderTier = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(settings);
|
||||
var sb = new StringBuilder();
|
||||
@@ -48,6 +49,8 @@ public static class DiagReport
|
||||
sb.AppendLine(CultureInfo.InvariantCulture, $"gpu_driver: {hardware?.GpuDriver ?? "n/a"}");
|
||||
sb.AppendLine(CultureInfo.InvariantCulture, $"ram_gb: {(hardware?.RamGb is double gb ? gb.ToString("0.#", CultureInfo.InvariantCulture) : "n/a")}");
|
||||
sb.AppendLine(CultureInfo.InvariantCulture, $"display: {hardware?.DisplayRes ?? "n/a"}{(hardware?.DisplayHz is double hz ? " @ " + hz.ToString("0.#", CultureInfo.InvariantCulture) + " Hz" : string.Empty)}");
|
||||
// beta.21: WPF's rendering tier — 0 is software rendering, where every scroll of a document is drawn on the CPU.
|
||||
sb.AppendLine(CultureInfo.InvariantCulture, $"render_tier: {(renderTier is int tier ? tier.ToString(CultureInfo.InvariantCulture) : "n/a")}");
|
||||
sb.AppendLine("settings:");
|
||||
foreach (SettingDefinition definition in SettingsRegistry.All)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using FrameLedger.Application.Import;
|
||||
using FrameLedger.Application.Persistence;
|
||||
using FrameLedger.Application.Play;
|
||||
using FrameLedger.Application.Settings;
|
||||
using FrameLedger.Infrastructure.Ipc;
|
||||
using FrameLedger.Shared.Ipc;
|
||||
using Serilog;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// The Play button (beta.21, owner decision D59: "1: press Play → the platform opens → it runs; 3: it runs at once; let me
|
||||
/// switch between the two"). <c>ui.play_mode</c> = <c>store</c> (the default) hands the game to the app of the store whose own
|
||||
/// records name the folder it is installed in (<see cref="StoreRecords"/>, <see cref="StoreLaunches"/>); a game no store
|
||||
/// installed, a GOG game without GOG GALAXY, and every press while the App runs as administrator are started directly
|
||||
/// instead, and the notice says why. <c>direct</c> has the capture agent start it (<c>LaunchGame</c>, launch mode): recorded
|
||||
/// from its first frame, never as administrator (<c>UnelevatedProcess</c>), hooked only where the gate allows exactly as for any
|
||||
/// start (CLAUDE.md rule 1). FrameLedger itself connects to nothing (rule 8): a store's app does what it does when a game is
|
||||
/// started from it.
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
|
||||
public sealed class GamePlayer
|
||||
{
|
||||
private readonly RegisteredSettings _settings;
|
||||
private readonly IReadOnlyList<IStoreLibrarySource> _stores;
|
||||
private readonly IGogGalaxyLocator _galaxy;
|
||||
private readonly IShellStarter _shell;
|
||||
private readonly IAgentRequests _agent;
|
||||
private readonly Func<bool> _elevated;
|
||||
|
||||
public GamePlayer(RegisteredSettings settings, IEnumerable<IStoreLibrarySource> stores, IGogGalaxyLocator galaxy, IShellStarter shell,
|
||||
IAgentRequests agent, Func<bool>? elevated = null)
|
||||
{
|
||||
_settings = settings ?? throw new ArgumentNullException(nameof(settings));
|
||||
ArgumentNullException.ThrowIfNull(stores);
|
||||
_stores = [.. stores];
|
||||
_galaxy = galaxy ?? throw new ArgumentNullException(nameof(galaxy));
|
||||
_shell = shell ?? throw new ArgumentNullException(nameof(shell));
|
||||
_agent = agent ?? throw new ArgumentNullException(nameof(agent));
|
||||
_elevated = elevated ?? (static () => Environment.IsPrivilegedProcess);
|
||||
}
|
||||
|
||||
/// <summary>The mode Play is in now (<c>ui.play_mode</c>), for a tooltip.</summary>
|
||||
public async Task<bool> IsDirectAsync(CancellationToken ct = default) =>
|
||||
PlayMode.IsDirect(await _settings.GetAsync(SettingsRegistry.UiPlayMode, ct).ConfigureAwait(false));
|
||||
|
||||
public async Task<PlayResult> PlayAsync(GameRow game, CancellationToken ct = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(game);
|
||||
PlayFallback fallback = PlayFallback.None;
|
||||
if (!await IsDirectAsync(ct).ConfigureAwait(false))
|
||||
{
|
||||
if (_elevated())
|
||||
{
|
||||
fallback = PlayFallback.Elevated;
|
||||
}
|
||||
else
|
||||
{
|
||||
StoreGame? record = StoreRecords.Owning(game.Fingerprint.ExePath, game.StoreId, await RecordsAsync(ct).ConfigureAwait(false));
|
||||
if (record is null)
|
||||
{
|
||||
fallback = PlayFallback.NoStore;
|
||||
}
|
||||
else
|
||||
{
|
||||
string? galaxy = string.Equals(record.Platform, "gog", StringComparison.Ordinal) ? _galaxy.ClientPath() : null;
|
||||
if (StoreLaunches.For(record, galaxy) is { } launch)
|
||||
{
|
||||
return HandOff(game, launch);
|
||||
}
|
||||
|
||||
fallback = WhyNoHandOff(game, record, galaxy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return await StartDirectlyAsync(game, fallback, ct).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>The notice a result is said with: its text, and whether it is a warning.</summary>
|
||||
public static (string Text, bool Warning) Describe(PlayResult result, string gameName)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(result);
|
||||
return result.Outcome switch
|
||||
{
|
||||
PlayOutcome.HandedToStore => (result.Store switch
|
||||
{
|
||||
"steam" => string.Format(CultureInfo.CurrentCulture, Strings.Play_Steam_Format, gameName),
|
||||
"epic" => string.Format(CultureInfo.CurrentCulture, Strings.Play_Epic_Format, gameName),
|
||||
"gog" => string.Format(CultureInfo.CurrentCulture, Strings.Play_Gog_Format, gameName),
|
||||
_ => string.Format(CultureInfo.CurrentCulture, Strings.Play_Itch_Format, gameName),
|
||||
}, false),
|
||||
PlayOutcome.StartedByAgent => (result.Fallback switch
|
||||
{
|
||||
PlayFallback.NoStore => string.Format(CultureInfo.CurrentCulture, Strings.Play_NoStore_Format, gameName),
|
||||
PlayFallback.NoGalaxy => string.Format(CultureInfo.CurrentCulture, Strings.Play_NoGalaxy_Format, gameName),
|
||||
PlayFallback.Elevated => string.Format(CultureInfo.CurrentCulture, Strings.Play_Elevated_Format, gameName),
|
||||
_ => string.Format(CultureInfo.CurrentCulture, Strings.Play_Started_Format, gameName),
|
||||
}, false),
|
||||
PlayOutcome.AgentUnavailable => (string.Format(CultureInfo.CurrentCulture, Strings.Play_AgentUnavailable_Format, gameName), true),
|
||||
// "Set Play to go through the store" only where Play was not already going through it.
|
||||
PlayOutcome.RecordingOff => (string.Format(CultureInfo.CurrentCulture,
|
||||
result.Fallback == PlayFallback.None ? Strings.Play_RecordingOff_Format : Strings.Play_RecordingOff_Fallback_Format, gameName), true),
|
||||
PlayOutcome.AlreadyRunning => (string.Format(CultureInfo.CurrentCulture, Strings.Play_AlreadyRunning_Format, gameName), false),
|
||||
PlayOutcome.NotInLibrary => (string.Format(CultureInfo.CurrentCulture, Strings.Play_NotInLibrary_Format, gameName), true),
|
||||
_ when result.Detail is null => (string.Format(CultureInfo.CurrentCulture, Strings.Play_HandOffFailed_Format, gameName), true),
|
||||
_ => (string.Format(CultureInfo.CurrentCulture, Strings.Play_Failed_Format, gameName, result.Detail), true),
|
||||
};
|
||||
}
|
||||
|
||||
private PlayResult HandOff(GameRow game, StoreLaunch launch)
|
||||
{
|
||||
bool handed = launch.Kind == StoreLaunchKind.RunProgram
|
||||
? _shell.StartProgram(launch.Target, launch.Arguments ?? string.Empty, launch.WorkingDirectory)
|
||||
: _shell.OpenLink(launch.Target);
|
||||
Log.Information("play: {Game} (id {Id}) through {Store}: {Handed}", game.Name, game.Id, launch.Platform, handed ? "handed to its app" : "Windows did not take it");
|
||||
return handed ? new PlayResult(PlayOutcome.HandedToStore, launch.Platform) : new PlayResult(PlayOutcome.Failed, launch.Platform);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A store's record with no hand-off: a GOG game without GOG GALAXY, or — never seen, and logged — an id or a folder of a
|
||||
/// shape that store's own never have, which <see cref="StoreLaunches"/> puts in no link.
|
||||
/// </summary>
|
||||
private static PlayFallback WhyNoHandOff(GameRow game, StoreGame record, string? galaxy)
|
||||
{
|
||||
if (string.Equals(record.Platform, "gog", StringComparison.Ordinal) && galaxy is null)
|
||||
{
|
||||
return PlayFallback.NoGalaxy;
|
||||
}
|
||||
|
||||
Log.Warning("play: {Game} (id {Id}): {Store}'s record of it names nothing FrameLedger may hand to its app; the agent starts it",
|
||||
game.Name, game.Id, record.Platform);
|
||||
return PlayFallback.NoLink;
|
||||
}
|
||||
|
||||
private async Task<IReadOnlyList<StoreGame>> RecordsAsync(CancellationToken ct)
|
||||
{
|
||||
List<StoreGame> all = [];
|
||||
foreach (IStoreLibrarySource store in _stores)
|
||||
{
|
||||
try
|
||||
{
|
||||
all.AddRange(await store.ListAsync(ct).ConfigureAwait(false));
|
||||
}
|
||||
catch (Exception ex) when (ex is not OperationCanceledException and not OutOfMemoryException)
|
||||
{
|
||||
// One store's records that cannot be read are that store's, never the press's.
|
||||
Log.Warning("play: {Store}'s records could not be read ({Message})", store.Platform, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
return all;
|
||||
}
|
||||
|
||||
private async Task<PlayResult> StartDirectlyAsync(GameRow game, PlayFallback fallback, CancellationToken ct)
|
||||
{
|
||||
if (!_agent.IsConnected)
|
||||
{
|
||||
return new PlayResult(PlayOutcome.AgentUnavailable, Fallback: fallback);
|
||||
}
|
||||
|
||||
LaunchAck? ack;
|
||||
try
|
||||
{
|
||||
IpcEnvelope envelope = await _agent.RequestAsync(IpcMessageType.LaunchGame, new LaunchGameRequest(game.Id, null), ct).ConfigureAwait(false);
|
||||
ack = IpcCodec.Payload<LaunchAck>(envelope);
|
||||
}
|
||||
catch (Exception ex) when (ex is InvalidOperationException or TimeoutException or IOException or ObjectDisposedException or IpcFramingException)
|
||||
{
|
||||
// The connection went between the check above and the answer — the agent stopping, or restarting for an update:
|
||||
// the pipe fails a request in flight with these (PipeClient), and a press never ends in an unhandled exception.
|
||||
Log.Warning("play: LaunchGame for {Game} (id {Id}) had no answer ({Kind}: {Message})", game.Name, game.Id, ex.GetType().Name, ex.Message);
|
||||
return new PlayResult(PlayOutcome.AgentUnavailable, Fallback: fallback);
|
||||
}
|
||||
catch (Exception ex) when (ex is IpcRequestException or JsonException)
|
||||
{
|
||||
Log.Warning("play: LaunchGame for {Game} (id {Id}) failed ({Kind}: {Message})", game.Name, game.Id, ex.GetType().Name, ex.Message);
|
||||
return new PlayResult(PlayOutcome.Failed, Fallback: fallback, Detail: (ex as IpcRequestException)?.Code ?? ex.GetType().Name);
|
||||
}
|
||||
|
||||
if (ack is null)
|
||||
{
|
||||
Log.Warning("play: LaunchGame for {Game} (id {Id}) was answered without a payload", game.Name, game.Id);
|
||||
return new PlayResult(PlayOutcome.Failed, Fallback: fallback, Detail: IpcMessageType.LaunchAck);
|
||||
}
|
||||
|
||||
Log.Information("play: {Game} (id {Id}) through the agent: {Outcome}", game.Name, game.Id, ack.Outcome);
|
||||
return ack.Outcome switch
|
||||
{
|
||||
_ when ack.Accepted => new PlayResult(PlayOutcome.StartedByAgent, Fallback: fallback),
|
||||
"RecordingOff" => new PlayResult(PlayOutcome.RecordingOff, Fallback: fallback),
|
||||
"SessionRunning" => new PlayResult(PlayOutcome.AlreadyRunning, Fallback: fallback),
|
||||
"UnknownGame" => new PlayResult(PlayOutcome.NotInLibrary, Fallback: fallback),
|
||||
_ => new PlayResult(PlayOutcome.Failed, Fallback: fallback, Detail: ack.Outcome),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// How Play hands a game to its store's app (beta.21, D59): a link the shell opens with the app registered for it, or the
|
||||
/// store's own program. Behind a port so a test starts nothing and a viewer (D52) cannot (<see cref="ViewerShellStarter"/>).
|
||||
/// </summary>
|
||||
public interface IShellStarter
|
||||
{
|
||||
/// <summary>Opens <paramref name="link"/> with the app Windows has for its scheme; whether Windows took it.</summary>
|
||||
bool OpenLink(string link);
|
||||
|
||||
/// <summary>Starts <paramref name="path"/> with <paramref name="arguments"/> in <paramref name="workingDirectory"/>; whether it started.</summary>
|
||||
bool StartProgram(string path, string arguments, string? workingDirectory);
|
||||
}
|
||||
@@ -52,6 +52,8 @@ internal static class MachineFacingServices
|
||||
|
||||
services.AddSingleton<IRunAtLogon, RunAtLogonRegistry>();
|
||||
services.AddSingleton<IAgentTool, AgentTool>();
|
||||
// beta.21 (D59): Play hands a game to its store's app.
|
||||
services.AddSingleton<IShellStarter, ShellStarter>();
|
||||
|
||||
// The startup check is a hosted service; after an update's restart it also repairs the logon task.
|
||||
services.AddSingleton<IUpdateClient, VelopackUpdateClient>();
|
||||
@@ -66,6 +68,7 @@ internal static class MachineFacingServices
|
||||
services.AddSingleton<IAgentLink>(static sp => sp.GetRequiredService<ViewerAgentLink>());
|
||||
services.AddSingleton<IRunAtLogon, ViewerRunAtLogon>();
|
||||
services.AddSingleton<IAgentTool, ViewerAgentTool>();
|
||||
services.AddSingleton<IShellStarter, ViewerShellStarter>();
|
||||
services.AddSingleton<IUpdateClient, ViewerUpdateClient>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>Why a press in the store mode was started directly instead.</summary>
|
||||
public enum PlayFallback
|
||||
{
|
||||
None = 0,
|
||||
|
||||
/// <summary>No store's records name the folder the executable is in.</summary>
|
||||
NoStore,
|
||||
|
||||
/// <summary>GOG's records name it, and GOG GALAXY is not installed.</summary>
|
||||
NoGalaxy,
|
||||
|
||||
/// <summary>The App runs as administrator, and a store's app it started would too — and so would the game.</summary>
|
||||
Elevated,
|
||||
|
||||
/// <summary>A store's records name it with an id or a folder FrameLedger puts in no link (never seen; logged).</summary>
|
||||
NoLink,
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>What one press of Play did.</summary>
|
||||
public enum PlayOutcome
|
||||
{
|
||||
/// <summary>Nobody decided. The zero value, never a result.</summary>
|
||||
NotEvaluated = 0,
|
||||
|
||||
/// <summary>The store's app has the game (<see cref="PlayResult.Store"/> names the store).</summary>
|
||||
HandedToStore,
|
||||
|
||||
/// <summary>The capture agent accepted the launch (<c>LaunchGame</c>).</summary>
|
||||
StartedByAgent,
|
||||
|
||||
/// <summary>Direct, and no capture agent is connected.</summary>
|
||||
AgentUnavailable,
|
||||
|
||||
/// <summary>Direct, and the entry's recording is off: FrameLedger starts only what it records (schema 0009).</summary>
|
||||
RecordingOff,
|
||||
|
||||
/// <summary>A session of the game is already running.</summary>
|
||||
AlreadyRunning,
|
||||
|
||||
/// <summary>The agent has no entry with the game's id (<c>UnknownGame</c>): it left the library since the page was read.</summary>
|
||||
NotInLibrary,
|
||||
|
||||
/// <summary>Windows would not open the store's app, or the agent refused for another reason (<see cref="PlayResult.Detail"/>).</summary>
|
||||
Failed,
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>One press of Play: what happened, which store's app has it, why it fell back, and the agent's own word on a failure.</summary>
|
||||
public sealed record PlayResult(PlayOutcome Outcome, string? Store = null, PlayFallback Fallback = PlayFallback.None, string? Detail = null);
|
||||
@@ -0,0 +1,47 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using Serilog;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>The shell's own hand-off. The App runs with the user's standard rights; an elevated App never reaches here (<see cref="GamePlayer"/>).</summary>
|
||||
public sealed class ShellStarter : IShellStarter
|
||||
{
|
||||
public bool OpenLink(string link)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(link);
|
||||
try
|
||||
{
|
||||
using Process? started = Process.Start(new ProcessStartInfo(link) { UseShellExecute = true });
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex) when (ex is Win32Exception or InvalidOperationException or FileNotFoundException)
|
||||
{
|
||||
Log.Warning("play: Windows did not open {Link} ({Message})", link, ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool StartProgram(string path, string arguments, string? workingDirectory)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(path);
|
||||
try
|
||||
{
|
||||
using Process? started = Process.Start(new ProcessStartInfo(path, arguments ?? string.Empty)
|
||||
{
|
||||
UseShellExecute = false,
|
||||
WorkingDirectory = workingDirectory ?? string.Empty,
|
||||
});
|
||||
return started is not null;
|
||||
}
|
||||
catch (Exception ex) when (ex is Win32Exception or InvalidOperationException or FileNotFoundException)
|
||||
{
|
||||
Log.Warning("play: {Program} did not start ({Message})", path, ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>A viewer's (D52): nothing on this PC is started.</summary>
|
||||
public sealed class ViewerShellStarter : IShellStarter
|
||||
{
|
||||
public bool OpenLink(string link) => false;
|
||||
|
||||
public bool StartProgram(string path, string arguments, string? workingDirectory) => false;
|
||||
}
|
||||
Generated
+78
@@ -453,6 +453,7 @@ public static class Strings
|
||||
nameof(GameDetail_EngineVersion_GodotPackEmbedded),
|
||||
nameof(GameDetail_EngineVersion_NotFound),
|
||||
nameof(GameDetail_EngineVersion_NotFoundInFiles),
|
||||
nameof(GameDetail_EngineVersion_RenPyVcVersion),
|
||||
nameof(GameDetail_EngineVersion_Rgss),
|
||||
nameof(GameDetail_EngineVersion_UnityData),
|
||||
nameof(GameDetail_EngineVersion_UnityPlayer),
|
||||
@@ -487,6 +488,7 @@ public static class Strings
|
||||
nameof(GameDetail_Supports_Empty),
|
||||
nameof(GameDetail_Supports_Format),
|
||||
nameof(GameDetail_Supports_Header),
|
||||
nameof(GameDetail_Supports_None),
|
||||
nameof(GameDetail_Tab_Distribution),
|
||||
nameof(GameDetail_Tab_Frametime),
|
||||
nameof(GameDetail_Tab_Latency),
|
||||
@@ -701,6 +703,25 @@ public static class Strings
|
||||
nameof(Override_Default),
|
||||
nameof(Override_Keep),
|
||||
nameof(Override_Title_Format),
|
||||
nameof(Play_AgentUnavailable_Format),
|
||||
nameof(Play_AlreadyRunning_Format),
|
||||
nameof(Play_Button),
|
||||
nameof(Play_Elevated_Format),
|
||||
nameof(Play_Epic_Format),
|
||||
nameof(Play_Failed_Format),
|
||||
nameof(Play_Gog_Format),
|
||||
nameof(Play_HandOffFailed_Format),
|
||||
nameof(Play_Itch_Format),
|
||||
nameof(Play_NoGalaxy_Format),
|
||||
nameof(Play_NoStore_Format),
|
||||
nameof(Play_NotInLibrary_Format),
|
||||
nameof(Play_RecordingOff_Fallback_Format),
|
||||
nameof(Play_RecordingOff_Format),
|
||||
nameof(Play_Started_Format),
|
||||
nameof(Play_Steam_Format),
|
||||
nameof(Play_Title),
|
||||
nameof(Play_ToolTip_Direct),
|
||||
nameof(Play_ToolTip_Store),
|
||||
nameof(RemoveGame_Body),
|
||||
nameof(RemoveGame_Delete),
|
||||
nameof(RemoveGame_Keep),
|
||||
@@ -814,6 +835,7 @@ public static class Strings
|
||||
nameof(Settings_Exceptions_Withdraw),
|
||||
nameof(Settings_FpsDecimals_Body),
|
||||
nameof(Settings_FpsDecimals_Label),
|
||||
nameof(Settings_Games_Header),
|
||||
nameof(Settings_Header),
|
||||
nameof(Settings_HideAntiCheatHooking_Body),
|
||||
nameof(Settings_HideAntiCheatHooking_Label),
|
||||
@@ -841,6 +863,10 @@ public static class Strings
|
||||
nameof(Settings_MinSession_Label),
|
||||
nameof(Settings_OnlineMetadata_Body),
|
||||
nameof(Settings_OnlineMetadata_Label),
|
||||
nameof(Settings_PlayMode_Body),
|
||||
nameof(Settings_PlayMode_Direct),
|
||||
nameof(Settings_PlayMode_Label),
|
||||
nameof(Settings_PlayMode_Store),
|
||||
nameof(Settings_Policy_Header),
|
||||
nameof(Settings_Privacy_Header),
|
||||
nameof(Settings_RemoveUninstalled_Applied),
|
||||
@@ -1924,6 +1950,8 @@ public static class Strings
|
||||
|
||||
public static string GameDetail_EngineVersion_NotFoundInFiles => ResourceManager.GetString(nameof(GameDetail_EngineVersion_NotFoundInFiles), Culture) ?? nameof(GameDetail_EngineVersion_NotFoundInFiles);
|
||||
|
||||
public static string GameDetail_EngineVersion_RenPyVcVersion => ResourceManager.GetString(nameof(GameDetail_EngineVersion_RenPyVcVersion), Culture) ?? nameof(GameDetail_EngineVersion_RenPyVcVersion);
|
||||
|
||||
public static string GameDetail_EngineVersion_Rgss => ResourceManager.GetString(nameof(GameDetail_EngineVersion_Rgss), Culture) ?? nameof(GameDetail_EngineVersion_Rgss);
|
||||
|
||||
public static string GameDetail_EngineVersion_UnityData => ResourceManager.GetString(nameof(GameDetail_EngineVersion_UnityData), Culture) ?? nameof(GameDetail_EngineVersion_UnityData);
|
||||
@@ -1992,6 +2020,8 @@ public static class Strings
|
||||
|
||||
public static string GameDetail_Supports_Header => ResourceManager.GetString(nameof(GameDetail_Supports_Header), Culture) ?? nameof(GameDetail_Supports_Header);
|
||||
|
||||
public static string GameDetail_Supports_None => ResourceManager.GetString(nameof(GameDetail_Supports_None), Culture) ?? nameof(GameDetail_Supports_None);
|
||||
|
||||
public static string GameDetail_Tab_Distribution => ResourceManager.GetString(nameof(GameDetail_Tab_Distribution), Culture) ?? nameof(GameDetail_Tab_Distribution);
|
||||
|
||||
public static string GameDetail_Tab_Frametime => ResourceManager.GetString(nameof(GameDetail_Tab_Frametime), Culture) ?? nameof(GameDetail_Tab_Frametime);
|
||||
@@ -2420,6 +2450,44 @@ public static class Strings
|
||||
|
||||
public static string Override_Title_Format => ResourceManager.GetString(nameof(Override_Title_Format), Culture) ?? nameof(Override_Title_Format);
|
||||
|
||||
public static string Play_AgentUnavailable_Format => ResourceManager.GetString(nameof(Play_AgentUnavailable_Format), Culture) ?? nameof(Play_AgentUnavailable_Format);
|
||||
|
||||
public static string Play_AlreadyRunning_Format => ResourceManager.GetString(nameof(Play_AlreadyRunning_Format), Culture) ?? nameof(Play_AlreadyRunning_Format);
|
||||
|
||||
public static string Play_Button => ResourceManager.GetString(nameof(Play_Button), Culture) ?? nameof(Play_Button);
|
||||
|
||||
public static string Play_Elevated_Format => ResourceManager.GetString(nameof(Play_Elevated_Format), Culture) ?? nameof(Play_Elevated_Format);
|
||||
|
||||
public static string Play_Epic_Format => ResourceManager.GetString(nameof(Play_Epic_Format), Culture) ?? nameof(Play_Epic_Format);
|
||||
|
||||
public static string Play_Failed_Format => ResourceManager.GetString(nameof(Play_Failed_Format), Culture) ?? nameof(Play_Failed_Format);
|
||||
|
||||
public static string Play_Gog_Format => ResourceManager.GetString(nameof(Play_Gog_Format), Culture) ?? nameof(Play_Gog_Format);
|
||||
|
||||
public static string Play_HandOffFailed_Format => ResourceManager.GetString(nameof(Play_HandOffFailed_Format), Culture) ?? nameof(Play_HandOffFailed_Format);
|
||||
|
||||
public static string Play_Itch_Format => ResourceManager.GetString(nameof(Play_Itch_Format), Culture) ?? nameof(Play_Itch_Format);
|
||||
|
||||
public static string Play_NoGalaxy_Format => ResourceManager.GetString(nameof(Play_NoGalaxy_Format), Culture) ?? nameof(Play_NoGalaxy_Format);
|
||||
|
||||
public static string Play_NoStore_Format => ResourceManager.GetString(nameof(Play_NoStore_Format), Culture) ?? nameof(Play_NoStore_Format);
|
||||
|
||||
public static string Play_NotInLibrary_Format => ResourceManager.GetString(nameof(Play_NotInLibrary_Format), Culture) ?? nameof(Play_NotInLibrary_Format);
|
||||
|
||||
public static string Play_RecordingOff_Fallback_Format => ResourceManager.GetString(nameof(Play_RecordingOff_Fallback_Format), Culture) ?? nameof(Play_RecordingOff_Fallback_Format);
|
||||
|
||||
public static string Play_RecordingOff_Format => ResourceManager.GetString(nameof(Play_RecordingOff_Format), Culture) ?? nameof(Play_RecordingOff_Format);
|
||||
|
||||
public static string Play_Started_Format => ResourceManager.GetString(nameof(Play_Started_Format), Culture) ?? nameof(Play_Started_Format);
|
||||
|
||||
public static string Play_Steam_Format => ResourceManager.GetString(nameof(Play_Steam_Format), Culture) ?? nameof(Play_Steam_Format);
|
||||
|
||||
public static string Play_Title => ResourceManager.GetString(nameof(Play_Title), Culture) ?? nameof(Play_Title);
|
||||
|
||||
public static string Play_ToolTip_Direct => ResourceManager.GetString(nameof(Play_ToolTip_Direct), Culture) ?? nameof(Play_ToolTip_Direct);
|
||||
|
||||
public static string Play_ToolTip_Store => ResourceManager.GetString(nameof(Play_ToolTip_Store), Culture) ?? nameof(Play_ToolTip_Store);
|
||||
|
||||
public static string RemoveGame_Body => ResourceManager.GetString(nameof(RemoveGame_Body), Culture) ?? nameof(RemoveGame_Body);
|
||||
|
||||
public static string RemoveGame_Delete => ResourceManager.GetString(nameof(RemoveGame_Delete), Culture) ?? nameof(RemoveGame_Delete);
|
||||
@@ -2646,6 +2714,8 @@ public static class Strings
|
||||
|
||||
public static string Settings_FpsDecimals_Label => ResourceManager.GetString(nameof(Settings_FpsDecimals_Label), Culture) ?? nameof(Settings_FpsDecimals_Label);
|
||||
|
||||
public static string Settings_Games_Header => ResourceManager.GetString(nameof(Settings_Games_Header), Culture) ?? nameof(Settings_Games_Header);
|
||||
|
||||
public static string Settings_Header => ResourceManager.GetString(nameof(Settings_Header), Culture) ?? nameof(Settings_Header);
|
||||
|
||||
public static string Settings_HideAntiCheatHooking_Body => ResourceManager.GetString(nameof(Settings_HideAntiCheatHooking_Body), Culture) ?? nameof(Settings_HideAntiCheatHooking_Body);
|
||||
@@ -2700,6 +2770,14 @@ public static class Strings
|
||||
|
||||
public static string Settings_OnlineMetadata_Label => ResourceManager.GetString(nameof(Settings_OnlineMetadata_Label), Culture) ?? nameof(Settings_OnlineMetadata_Label);
|
||||
|
||||
public static string Settings_PlayMode_Body => ResourceManager.GetString(nameof(Settings_PlayMode_Body), Culture) ?? nameof(Settings_PlayMode_Body);
|
||||
|
||||
public static string Settings_PlayMode_Direct => ResourceManager.GetString(nameof(Settings_PlayMode_Direct), Culture) ?? nameof(Settings_PlayMode_Direct);
|
||||
|
||||
public static string Settings_PlayMode_Label => ResourceManager.GetString(nameof(Settings_PlayMode_Label), Culture) ?? nameof(Settings_PlayMode_Label);
|
||||
|
||||
public static string Settings_PlayMode_Store => ResourceManager.GetString(nameof(Settings_PlayMode_Store), Culture) ?? nameof(Settings_PlayMode_Store);
|
||||
|
||||
public static string Settings_Policy_Header => ResourceManager.GetString(nameof(Settings_Policy_Header), Culture) ?? nameof(Settings_Policy_Header);
|
||||
|
||||
public static string Settings_Privacy_Header => ResourceManager.GetString(nameof(Settings_Privacy_Header), Culture) ?? nameof(Settings_Privacy_Header);
|
||||
|
||||
@@ -2981,6 +2981,10 @@
|
||||
<value>ゲームの Game.ini が指定する RPG Maker のランタイムライブラリ(RGSS)から。この番号はエディターではなくライブラリのものです。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="GameDetail_EngineVersion_RenPyVcVersion" xml:space="preserve">
|
||||
<value>ゲームの Ren'Py エンジンのバージョンファイル(renpy/vc_version.py)から。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="GameDetail_EngineVersion_NotFoundInFiles" xml:space="preserve">
|
||||
<value>ゲームのファイルには見つかりません。</value>
|
||||
<comment>review</comment>
|
||||
@@ -4213,4 +4217,104 @@
|
||||
<value>{0} は FrameLedger 自身のデータ フォルダーです。--data-dir はそのコピー用で、テスト ビルドが記録先のデータベースを開かないようにするためのものです。このフォルダーを使うには --data-dir を付けずに FrameLedger を起動してください。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="GameDetail_Supports_None" xml:space="preserve">
|
||||
<value>見つかりません — ゲームのフォルダーには、ルールが挙げるアップスケーラー、フレーム生成、Vulkan のファイルがありません。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Button" xml:space="preserve">
|
||||
<value>プレイ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Store" xml:space="preserve">
|
||||
<value>ゲームをインストールしたストア経由でプレイします。Steam または Epic Games Launcher が起動し、GOG GALAXY が実行し、itch アプリは先に確認します。どのストアからもインストールされていないゲームは FrameLedger が起動します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Direct" xml:space="preserve">
|
||||
<value>プレイ: FrameLedger がゲームを自分で起動します。最初のフレームから記録し、通常の権限で実行します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Title" xml:space="preserve">
|
||||
<value>プレイ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Steam_Format" xml:space="preserve">
|
||||
<value>Steam が {0} を起動しています。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Epic_Format" xml:space="preserve">
|
||||
<value>Epic Games Launcher が {0} を起動しています。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Gog_Format" xml:space="preserve">
|
||||
<value>GOG GALAXY が {0} を起動しています。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Itch_Format" xml:space="preserve">
|
||||
<value>itch アプリが起動する {0} のコピーを確認します。そちらで確定してください。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Started_Format" xml:space="preserve">
|
||||
<value>FrameLedger が {0} を起動しています。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_NoStore_Format" xml:space="preserve">
|
||||
<value>{0} のフォルダーを記録しているストアがないため、FrameLedger が起動しています。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_NoGalaxy_Format" xml:space="preserve">
|
||||
<value>GOG GALAXY がインストールされていないため、FrameLedger が {0} を起動しています。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Elevated_Format" xml:space="preserve">
|
||||
<value>FrameLedger が管理者として実行されているため、ストアではなくキャプチャ エージェントが通常の権限で {0} を起動しています。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_AgentUnavailable_Format" xml:space="preserve">
|
||||
<value>キャプチャ エージェントが実行されていないため、FrameLedger は {0} を起動できません。ご自分で起動するか、エージェントが接続してからもう一度お試しください。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_RecordingOff_Format" xml:space="preserve">
|
||||
<value>{0} の記録がオフで、FrameLedger は記録するゲームしか起動しません。記録をオンにするか、プレイをストア経由にしてください(設定 ▸ ゲーム)。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_AlreadyRunning_Format" xml:space="preserve">
|
||||
<value>{0} はすでに実行中です。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_Failed_Format" xml:space="preserve">
|
||||
<value>{0} を起動できませんでした({1})。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_HandOffFailed_Format" xml:space="preserve">
|
||||
<value>Windows は {0} のストア アプリを開けませんでした。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_Games_Header" xml:space="preserve">
|
||||
<value>ゲーム</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Label" xml:space="preserve">
|
||||
<value>プレイ ボタン</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Body" xml:space="preserve">
|
||||
<value>ストア経由: Steam と Epic Games Launcher がゲームを起動し、GOG GALAXY が実行し、itch アプリは先に確認します。どのストアからもインストールされていないゲームは FrameLedger が起動します。直接: FrameLedger がゲームを自分で起動します。最初のフレームから記録し、通常の権限で実行します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Store" xml:space="preserve">
|
||||
<value>ストア経由</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Direct" xml:space="preserve">
|
||||
<value>直接起動</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_RecordingOff_Fallback_Format" xml:space="preserve">
|
||||
<value>{0} の記録がオフで、FrameLedger は記録するゲームしか起動しません。記録をオンにするか、ご自分で起動してください。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Play_NotInLibrary_Format" xml:space="preserve">
|
||||
<value>{0} はもうライブラリにないため、起動しませんでした。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -2246,6 +2246,9 @@ The documents below are the full terms; this summary does not replace them.</val
|
||||
<data name="GameDetail_EngineVersion_Rgss" xml:space="preserve">
|
||||
<value>From the RPG Maker runtime library (RGSS) that the game's Game.ini names. The number is the library's, not the editor's.</value>
|
||||
</data>
|
||||
<data name="GameDetail_EngineVersion_RenPyVcVersion" xml:space="preserve">
|
||||
<value>From the version file of the game's Ren'Py engine (renpy/vc_version.py).</value>
|
||||
</data>
|
||||
<data name="GameDetail_EngineVersion_NotFoundInFiles" xml:space="preserve">
|
||||
<value>Not found in the game's files.</value>
|
||||
</data>
|
||||
@@ -3170,4 +3173,79 @@ The documents below are the full terms; this summary does not replace them.</val
|
||||
<data name="DataDir_Profile_Format" xml:space="preserve">
|
||||
<value>{0} is FrameLedger's own data folder. --data-dir is for a copy of it, so that a test build never opens the database you record into. To use this folder, start FrameLedger without --data-dir.</value>
|
||||
</data>
|
||||
<data name="GameDetail_Supports_None" xml:space="preserve">
|
||||
<value>None found — the game's folder holds no upscaler, frame-generation or Vulkan file the rules name.</value>
|
||||
</data>
|
||||
<data name="Play_Button" xml:space="preserve">
|
||||
<value>Play</value>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Store" xml:space="preserve">
|
||||
<value>Play through the store that installed the game: Steam or the Epic Games Launcher starts it, GOG GALAXY runs it, the itch app asks first. A game no store installed is started by FrameLedger.</value>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Direct" xml:space="preserve">
|
||||
<value>Play: FrameLedger starts the game itself, recorded from its first frame, with your standard rights.</value>
|
||||
</data>
|
||||
<data name="Play_Title" xml:space="preserve">
|
||||
<value>Play</value>
|
||||
</data>
|
||||
<data name="Play_Steam_Format" xml:space="preserve">
|
||||
<value>Steam is starting {0}.</value>
|
||||
</data>
|
||||
<data name="Play_Epic_Format" xml:space="preserve">
|
||||
<value>The Epic Games Launcher is starting {0}.</value>
|
||||
</data>
|
||||
<data name="Play_Gog_Format" xml:space="preserve">
|
||||
<value>GOG GALAXY is starting {0}.</value>
|
||||
</data>
|
||||
<data name="Play_Itch_Format" xml:space="preserve">
|
||||
<value>The itch app asks which copy of {0} to launch — confirm there.</value>
|
||||
</data>
|
||||
<data name="Play_Started_Format" xml:space="preserve">
|
||||
<value>FrameLedger is starting {0}.</value>
|
||||
</data>
|
||||
<data name="Play_NoStore_Format" xml:space="preserve">
|
||||
<value>No store's records name the folder of {0}, so FrameLedger is starting it.</value>
|
||||
</data>
|
||||
<data name="Play_NoGalaxy_Format" xml:space="preserve">
|
||||
<value>GOG GALAXY is not installed, so FrameLedger is starting {0}.</value>
|
||||
</data>
|
||||
<data name="Play_Elevated_Format" xml:space="preserve">
|
||||
<value>FrameLedger is running as administrator, so the capture agent is starting {0} with your standard rights instead of its store.</value>
|
||||
</data>
|
||||
<data name="Play_AgentUnavailable_Format" xml:space="preserve">
|
||||
<value>The capture agent is not running, so FrameLedger cannot start {0}. Start it yourself, or try again when the agent is connected.</value>
|
||||
</data>
|
||||
<data name="Play_RecordingOff_Format" xml:space="preserve">
|
||||
<value>Recording is off for {0}, and FrameLedger starts only games it records. Turn recording on, or set Play to go through the store (Settings ▸ Games).</value>
|
||||
</data>
|
||||
<data name="Play_AlreadyRunning_Format" xml:space="preserve">
|
||||
<value>{0} is already running.</value>
|
||||
</data>
|
||||
<data name="Play_Failed_Format" xml:space="preserve">
|
||||
<value>{0} could not be started ({1}).</value>
|
||||
</data>
|
||||
<data name="Play_HandOffFailed_Format" xml:space="preserve">
|
||||
<value>Windows could not open the store's app for {0}.</value>
|
||||
</data>
|
||||
<data name="Settings_Games_Header" xml:space="preserve">
|
||||
<value>Games</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Label" xml:space="preserve">
|
||||
<value>Play button</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Body" xml:space="preserve">
|
||||
<value>Through the store: Steam and the Epic Games Launcher start the game, GOG GALAXY runs it, the itch app asks first; a game no store installed is started by FrameLedger. Directly: FrameLedger starts the game itself — recorded from its first frame, with your standard rights.</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Store" xml:space="preserve">
|
||||
<value>Through the store</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Direct" xml:space="preserve">
|
||||
<value>Start directly</value>
|
||||
</data>
|
||||
<data name="Play_RecordingOff_Fallback_Format" xml:space="preserve">
|
||||
<value>Recording is off for {0}, and FrameLedger starts only games it records. Turn its recording on, or start it yourself.</value>
|
||||
</data>
|
||||
<data name="Play_NotInLibrary_Format" xml:space="preserve">
|
||||
<value>{0} is no longer in the library, so it was not started.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -2241,6 +2241,9 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
|
||||
<data name="GameDetail_EngineVersion_Rgss" xml:space="preserve">
|
||||
<value>Lấy từ thư viện runtime RPG Maker (RGSS) mà file Game.ini của game chỉ định. Đây là số phiên bản của thư viện, không phải của trình biên tập.</value>
|
||||
</data>
|
||||
<data name="GameDetail_EngineVersion_RenPyVcVersion" xml:space="preserve">
|
||||
<value>Lấy từ file phiên bản của engine Ren'Py trong game (renpy/vc_version.py).</value>
|
||||
</data>
|
||||
<data name="GameDetail_EngineVersion_NotFoundInFiles" xml:space="preserve">
|
||||
<value>Không tìm thấy trong các file của game.</value>
|
||||
</data>
|
||||
@@ -3165,4 +3168,79 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
|
||||
<data name="DataDir_Profile_Format" xml:space="preserve">
|
||||
<value>{0} là thư mục dữ liệu của chính FrameLedger. --data-dir dành cho một bản sao của nó, để một bản thử nghiệm không bao giờ mở cơ sở dữ liệu bạn đang ghi vào. Để dùng thư mục này, hãy mở FrameLedger không kèm --data-dir.</value>
|
||||
</data>
|
||||
<data name="GameDetail_Supports_None" xml:space="preserve">
|
||||
<value>Không tìm thấy — thư mục game không có file upscaler, frame generation hay Vulkan nào mà bộ quy tắc liệt kê.</value>
|
||||
</data>
|
||||
<data name="Play_Button" xml:space="preserve">
|
||||
<value>Chơi</value>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Store" xml:space="preserve">
|
||||
<value>Chơi qua store đã cài game: Steam hoặc Epic Games Launcher sẽ chạy game, GOG GALAXY chạy game, app itch hỏi trước. Game không do store nào cài thì FrameLedger tự chạy.</value>
|
||||
</data>
|
||||
<data name="Play_ToolTip_Direct" xml:space="preserve">
|
||||
<value>Chơi: FrameLedger tự chạy game, ghi lại từ khung hình đầu tiên, với quyền thường của bạn.</value>
|
||||
</data>
|
||||
<data name="Play_Title" xml:space="preserve">
|
||||
<value>Chơi</value>
|
||||
</data>
|
||||
<data name="Play_Steam_Format" xml:space="preserve">
|
||||
<value>Steam đang chạy {0}.</value>
|
||||
</data>
|
||||
<data name="Play_Epic_Format" xml:space="preserve">
|
||||
<value>Epic Games Launcher đang chạy {0}.</value>
|
||||
</data>
|
||||
<data name="Play_Gog_Format" xml:space="preserve">
|
||||
<value>GOG GALAXY đang chạy {0}.</value>
|
||||
</data>
|
||||
<data name="Play_Itch_Format" xml:space="preserve">
|
||||
<value>App itch sẽ hỏi chạy bản nào của {0} — hãy xác nhận ở đó.</value>
|
||||
</data>
|
||||
<data name="Play_Started_Format" xml:space="preserve">
|
||||
<value>FrameLedger đang chạy {0}.</value>
|
||||
</data>
|
||||
<data name="Play_NoStore_Format" xml:space="preserve">
|
||||
<value>Không store nào ghi nhận thư mục của {0}, nên FrameLedger tự chạy game.</value>
|
||||
</data>
|
||||
<data name="Play_NoGalaxy_Format" xml:space="preserve">
|
||||
<value>GOG GALAXY chưa được cài, nên FrameLedger tự chạy {0}.</value>
|
||||
</data>
|
||||
<data name="Play_Elevated_Format" xml:space="preserve">
|
||||
<value>FrameLedger đang chạy với quyền quản trị, nên capture agent sẽ chạy {0} với quyền thường của bạn thay vì qua store.</value>
|
||||
</data>
|
||||
<data name="Play_AgentUnavailable_Format" xml:space="preserve">
|
||||
<value>Capture agent không chạy, nên FrameLedger không thể chạy {0}. Hãy tự chạy game, hoặc thử lại khi agent đã kết nối.</value>
|
||||
</data>
|
||||
<data name="Play_RecordingOff_Format" xml:space="preserve">
|
||||
<value>Việc ghi đang tắt cho {0}, và FrameLedger chỉ chạy game mà nó ghi. Hãy bật ghi, hoặc đặt nút Chơi đi qua store (Cài đặt ▸ Game).</value>
|
||||
</data>
|
||||
<data name="Play_AlreadyRunning_Format" xml:space="preserve">
|
||||
<value>{0} đang chạy rồi.</value>
|
||||
</data>
|
||||
<data name="Play_Failed_Format" xml:space="preserve">
|
||||
<value>Không chạy được {0} ({1}).</value>
|
||||
</data>
|
||||
<data name="Play_HandOffFailed_Format" xml:space="preserve">
|
||||
<value>Windows không mở được app của store cho {0}.</value>
|
||||
</data>
|
||||
<data name="Settings_Games_Header" xml:space="preserve">
|
||||
<value>Game</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Label" xml:space="preserve">
|
||||
<value>Nút Chơi</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Body" xml:space="preserve">
|
||||
<value>Qua store: Steam và Epic Games Launcher chạy game, GOG GALAXY chạy game, app itch hỏi trước; game không do store nào cài thì FrameLedger tự chạy. Chạy trực tiếp: FrameLedger tự chạy game — ghi lại từ khung hình đầu tiên, với quyền thường của bạn.</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Store" xml:space="preserve">
|
||||
<value>Qua store</value>
|
||||
</data>
|
||||
<data name="Settings_PlayMode_Direct" xml:space="preserve">
|
||||
<value>Chạy trực tiếp</value>
|
||||
</data>
|
||||
<data name="Play_RecordingOff_Fallback_Format" xml:space="preserve">
|
||||
<value>Việc ghi đang tắt cho {0}, và FrameLedger chỉ chạy game mà nó ghi. Hãy bật ghi, hoặc tự chạy game.</value>
|
||||
</data>
|
||||
<data name="Play_NotInLibrary_Format" xml:space="preserve">
|
||||
<value>{0} không còn trong thư viện, nên không được chạy.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -37,6 +37,7 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
private readonly IEditGamePrompt _edit;
|
||||
private readonly IGamePicker _picker;
|
||||
private readonly IMessageStrip _strip;
|
||||
private readonly GamePlayer? _player;
|
||||
private readonly ISessionSummaryOpener _summaries;
|
||||
private readonly SessionSeriesLoader _loader;
|
||||
private readonly IAgentLink? _agent;
|
||||
@@ -72,8 +73,13 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
/// itself when the file is under another drive letter, so this clears on the next visit once it has.
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(PlayCommand))]
|
||||
private bool _executableMissing;
|
||||
|
||||
/// <summary>What Play will do, in the mode Settings ▸ Games has now (beta.21, D59).</summary>
|
||||
[ObservableProperty]
|
||||
private string _playToolTip = Strings.Play_ToolTip_Store;
|
||||
|
||||
[ObservableProperty]
|
||||
private string _lastSessionText = string.Empty;
|
||||
|
||||
@@ -83,6 +89,14 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
[ObservableProperty]
|
||||
private bool _supportsEmpty = true;
|
||||
|
||||
/// <summary>
|
||||
/// What the Supports card says when it lists nothing (beta.21): "not scanned yet" until the Agent's sweep has read the
|
||||
/// executable, then that none of the files the rules name was found. It said "not scanned yet" for every game that
|
||||
/// ships none of them — a scanned RPG Maker game's page contradicted its own Details card.
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private string _supportsEmptyText = Strings.GameDetail_Supports_Empty;
|
||||
|
||||
[ObservableProperty]
|
||||
private string _measuredEmptyText = string.Empty;
|
||||
|
||||
@@ -219,9 +233,10 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
IConfirmations confirmations, IEditGamePrompt edit, IMessageStrip strip, ISessionSummaryOpener summaries,
|
||||
SessionSeriesLoader loader, IHardwareSnapshotRepository hardware, SessionSelection sessionSelection, IGamePicker picker,
|
||||
RegisteredSettings? settings = null, IAgentLink? agent = null, AntiCheatExceptions? exceptions = null, SessionDeletion? deletion = null,
|
||||
UiMode? mode = null)
|
||||
UiMode? mode = null, GamePlayer? player = null)
|
||||
{
|
||||
// beta.15 (D52): a viewer over a copy has no Agent to ask; a composition without a mode (a test) is the profile's App.
|
||||
_player = player;
|
||||
_mode = mode ?? UiMode.Profile;
|
||||
_deletion = deletion;
|
||||
_exceptions = exceptions;
|
||||
@@ -259,6 +274,8 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
|
||||
public static string EditText => Strings.GameDetail_Edit;
|
||||
|
||||
public static string PlayText => Strings.Play_Button;
|
||||
|
||||
public static string RemoveText => Strings.GameDetail_Remove;
|
||||
|
||||
public static string ChangeExecutableText => Strings.GameDetail_ChangeExe;
|
||||
@@ -277,8 +294,6 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
|
||||
public static string SupportsHeader => Strings.GameDetail_Supports_Header;
|
||||
|
||||
public static string SupportsEmptyText => Strings.GameDetail_Supports_Empty;
|
||||
|
||||
public static string MeasuredHeader => Strings.GameDetail_Measured_Header;
|
||||
|
||||
public static string RecordingHeader => Strings.GameDetail_Recording_Header;
|
||||
@@ -443,6 +458,11 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
Game = detail.Row;
|
||||
_detail = detail;
|
||||
NotFound = false;
|
||||
if (_player is not null)
|
||||
{
|
||||
PlayToolTip = await _player.IsDirectAsync(ct).ConfigureAwait(true) ? Strings.Play_ToolTip_Direct : Strings.Play_ToolTip_Store;
|
||||
}
|
||||
|
||||
if (_settings is not null)
|
||||
{
|
||||
_hideAntiCheatHooking = await _settings.GetBooleanAsync(SettingsRegistry.UiHideAntiCheatHooking, ct).ConfigureAwait(true);
|
||||
@@ -709,6 +729,13 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
[RelayCommand]
|
||||
private Task ReEnableHookingAsync() => RunAsync(EnableAsync);
|
||||
|
||||
/// <summary>
|
||||
/// beta.21 (owner decision D59): Play — through the store that installed the game, or started by the capture agent
|
||||
/// (Settings ▸ Games); <see cref="GamePlayer"/> says what each does. A game whose executable is not there has none.
|
||||
/// </summary>
|
||||
[RelayCommand(CanExecute = nameof(CanPlay))]
|
||||
private Task PlayAsync() => RunAsync(PlayCoreAsync);
|
||||
|
||||
[RelayCommand]
|
||||
private Task EditAsync() => RunAsync(EditCoreAsync);
|
||||
|
||||
@@ -722,6 +749,27 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
[RelayCommand]
|
||||
private Task ChangeExecutableAsync() => RunAsync(ChangeExecutableCoreAsync);
|
||||
|
||||
private bool CanPlay() => _player is not null && !ExecutableMissing;
|
||||
|
||||
private async Task PlayCoreAsync()
|
||||
{
|
||||
if (_player is null || Game is not { } game)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PlayResult result = await _player.PlayAsync(game).ConfigureAwait(true);
|
||||
(string message, bool warning) = GamePlayer.Describe(result, game.Name);
|
||||
if (warning)
|
||||
{
|
||||
_strip.Warn(Strings.Play_Title, message);
|
||||
}
|
||||
else
|
||||
{
|
||||
_strip.Info(Strings.Play_Title, message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>One action at a time, and the one in flight is <see cref="Pending"/> for a test to await.</summary>
|
||||
private async Task RunAsync(Func<Task> work)
|
||||
{
|
||||
@@ -1025,6 +1073,9 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
}
|
||||
|
||||
SupportsEmpty = Supports.Count == 0;
|
||||
|
||||
// The Details card's own test: a row the sweep has read carries the executable's machine.
|
||||
SupportsEmptyText = row.ExeMachine is null ? Strings.GameDetail_Supports_Empty : Strings.GameDetail_Supports_None;
|
||||
}
|
||||
|
||||
private void PresentDetails(GameDetail detail)
|
||||
@@ -1200,9 +1251,10 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
EngineVersionSource.RpgMakerMzCore => string.Format(CultureInfo.CurrentCulture, Strings.GameDetail_EngineVersion_CoreScript_Format, "js/rmmz_core.js"),
|
||||
EngineVersionSource.RpgMakerMvCore => string.Format(CultureInfo.CurrentCulture, Strings.GameDetail_EngineVersion_CoreScript_Format, "rpg_core.js"),
|
||||
EngineVersionSource.Rgss1Library or EngineVersionSource.Rgss2Library or EngineVersionSource.Rgss3Library => Strings.GameDetail_EngineVersion_Rgss,
|
||||
EngineVersionSource.RenPyVcVersion => Strings.GameDetail_EngineVersion_RenPyVcVersion,
|
||||
null when string.Equals(row.Engine, "unreal", StringComparison.Ordinal) && row.EngineVersion is null && row.ExeMachine is not null
|
||||
=> Strings.GameDetail_EngineVersion_NotFound,
|
||||
null when row.Engine is "unity" or "godot" or "rpgmaker_mv" or "rpgmaker_rgss" && row.EngineVersion is null && row.ExeMachine is not null
|
||||
null when row.Engine is "unity" or "godot" or "rpgmaker_mv" or "rpgmaker_rgss" or "renpy" && row.EngineVersion is null && row.ExeMachine is not null
|
||||
=> Strings.GameDetail_EngineVersion_NotFoundInFiles,
|
||||
_ => null,
|
||||
};
|
||||
|
||||
@@ -37,6 +37,8 @@ public sealed partial class GamesViewModel : ObservableObject
|
||||
private readonly IAgentLink? _agent;
|
||||
private readonly LibraryChanges? _changes;
|
||||
private readonly IMessageStrip? _strip;
|
||||
private readonly GamePlayer? _player;
|
||||
private readonly UiMode _mode;
|
||||
private readonly TimeProvider _clock;
|
||||
private readonly Func<string, bool> _exists;
|
||||
private readonly UiThread _ui = new();
|
||||
@@ -65,11 +67,17 @@ public sealed partial class GamesViewModel : ObservableObject
|
||||
[ObservableProperty]
|
||||
private bool _listView;
|
||||
|
||||
/// <summary>What Play will do, in the mode Settings ▸ Games has now (beta.21, D59).</summary>
|
||||
[ObservableProperty]
|
||||
private string _playToolTip = Strings.Play_ToolTip_Store;
|
||||
|
||||
public GamesViewModel(GameLibrary library, GameSelection selection, IPageNavigator navigator, AddGameFlow addGame, ImportLibraryFlow? import = null,
|
||||
RegisteredSettings? settings = null, IAgentLink? agent = null, LibraryChanges? changes = null, IMessageStrip? strip = null, TimeProvider? clock = null,
|
||||
Func<string, bool>? executableExists = null)
|
||||
Func<string, bool>? executableExists = null, GamePlayer? player = null, UiMode? mode = null)
|
||||
{
|
||||
_strip = strip;
|
||||
_player = player;
|
||||
_mode = mode ?? UiMode.Profile;
|
||||
_clock = clock ?? TimeProvider.System;
|
||||
_exists = executableExists ?? GameLibrary.ExecutableExists;
|
||||
_library = library ?? throw new ArgumentNullException(nameof(library));
|
||||
@@ -85,6 +93,9 @@ public sealed partial class GamesViewModel : ObservableObject
|
||||
|
||||
public static string EmptyText => Strings.Games_Empty;
|
||||
|
||||
/// <summary>beta.21 (D52's rule for Play): a viewer over a copy starts no game.</summary>
|
||||
public bool ActsOnThisPc => _mode.ActsOnThisPc;
|
||||
|
||||
public static string NoMatchText => Strings.Games_NoMatch;
|
||||
|
||||
public static string AddText => Strings.Games_Add;
|
||||
@@ -129,6 +140,11 @@ public sealed partial class GamesViewModel : ObservableObject
|
||||
{
|
||||
int read = Interlocked.Increment(ref _reads);
|
||||
await ReadViewAsync(ct).ConfigureAwait(true);
|
||||
if (_player is not null)
|
||||
{
|
||||
PlayToolTip = await _player.IsDirectAsync(ct).ConfigureAwait(true) ? Strings.Play_ToolTip_Direct : Strings.Play_ToolTip_Store;
|
||||
}
|
||||
|
||||
IReadOnlyList<GameCard> cards = await _library.ListCardsAsync(ct).ConfigureAwait(true);
|
||||
// Whether each executable is on disk is a file-system question per entry — a drive that is gone can take a moment
|
||||
// to say so — so it is asked off the UI thread, the game page's own way (GameLibrary.ExecutableExists).
|
||||
@@ -216,6 +232,29 @@ public sealed partial class GamesViewModel : ObservableObject
|
||||
[RelayCommand]
|
||||
private async Task AddGameAsync() => _ = await _addGame.RunAsync().ConfigureAwait(true);
|
||||
|
||||
/// <summary>beta.21 (D59): a card's or a row's Play — as the game's page plays it (<see cref="GamePlayer"/>).</summary>
|
||||
[RelayCommand(CanExecute = nameof(CanPlay))]
|
||||
private async Task PlayAsync(GameCardViewModel? card)
|
||||
{
|
||||
if (_player is null || card is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PlayResult result = await _player.PlayAsync(card.Card.Row).ConfigureAwait(true);
|
||||
(string message, bool warning) = GamePlayer.Describe(result, card.Name);
|
||||
if (warning)
|
||||
{
|
||||
_strip?.Warn(Strings.Play_Title, message);
|
||||
}
|
||||
else
|
||||
{
|
||||
_strip?.Info(Strings.Play_Title, message);
|
||||
}
|
||||
}
|
||||
|
||||
private bool CanPlay(GameCardViewModel? card) => _player is not null && card is { NotInstalled: false };
|
||||
|
||||
[RelayCommand]
|
||||
private void Open(GameCardViewModel? card)
|
||||
{
|
||||
|
||||
@@ -123,6 +123,10 @@ public sealed partial class SettingsViewModel : ObservableObject
|
||||
[ObservableProperty]
|
||||
private string _updateChannel = "stable";
|
||||
|
||||
/// <summary>beta.21 (owner decision D59): what Play does — <c>ui.play_mode</c>.</summary>
|
||||
[ObservableProperty]
|
||||
private string _playMode = Application.Play.PlayMode.Store;
|
||||
|
||||
/// <summary><c>11_UPDATER</c> §Flow: the startup silent check, on by default (P4 PR-5).</summary>
|
||||
[ObservableProperty]
|
||||
private bool _autoCheckUpdates = true;
|
||||
@@ -240,6 +244,13 @@ public sealed partial class SettingsViewModel : ObservableObject
|
||||
new(Update.UpdateChannelPolicy.Beta, Strings.Settings_Channel_Beta),
|
||||
];
|
||||
|
||||
/// <summary>Play's two modes (beta.21, D59), labelled in the language this page opened in.</summary>
|
||||
public IReadOnlyList<Choice<string>> PlayModes { get; } =
|
||||
[
|
||||
new(Application.Play.PlayMode.Store, Strings.Settings_PlayMode_Store),
|
||||
new(Application.Play.PlayMode.Direct, Strings.Settings_PlayMode_Direct),
|
||||
];
|
||||
|
||||
public static double MinSessionMinimum => SettingsRegistry.CaptureMinSessionSeconds.Minimum;
|
||||
|
||||
public static double MinSessionMaximum => SettingsRegistry.CaptureMinSessionSeconds.Maximum;
|
||||
@@ -482,6 +493,8 @@ public sealed partial class SettingsViewModel : ObservableObject
|
||||
|
||||
partial void OnUpdateChannelChanged(string value) => Persist(SettingsRegistry.UpdateChannel, value);
|
||||
|
||||
partial void OnPlayModeChanged(string value) => Persist(SettingsRegistry.UiPlayMode, value);
|
||||
|
||||
partial void OnAutoCheckUpdatesChanged(bool value) => Persist(SettingsRegistry.UpdateAutoCheck, value);
|
||||
|
||||
partial void OnStartWithWindowsChanged(bool value)
|
||||
@@ -550,6 +563,7 @@ public sealed partial class SettingsViewModel : ObservableObject
|
||||
HideScrollBars = await _settings.GetBooleanAsync(SettingsRegistry.UiHideScrollBars).ConfigureAwait(true);
|
||||
OnlineMetadata = await _settings.GetBooleanAsync(SettingsRegistry.PrivacyOnlineMetadata).ConfigureAwait(true);
|
||||
UpdateChannel = await _settings.GetAsync(SettingsRegistry.UpdateChannel).ConfigureAwait(true);
|
||||
PlayMode = await _settings.GetAsync(SettingsRegistry.UiPlayMode).ConfigureAwait(true);
|
||||
AutoCheckUpdates = await _settings.GetBooleanAsync(SettingsRegistry.UpdateAutoCheck).ConfigureAwait(true);
|
||||
LogDebug = await _settings.GetBooleanAsync(SettingsRegistry.LogDebug).ConfigureAwait(true);
|
||||
|
||||
|
||||
@@ -43,4 +43,10 @@ public interface IGameFileProbe
|
||||
/// <see cref="VersionExtractorType.RpgMakerBuild"/>. Null when neither is found.
|
||||
/// </summary>
|
||||
ValueTask<RpgMakerBuildFacts?> ReadRpgMakerBuildAsync(GameFileSnapshot snapshot, CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// Ren'Py's build facts (beta.20) — the <c>version</c> line of the engine's <c>renpy/vc_version.py</c> beside the
|
||||
/// launcher — for <see cref="VersionExtractorType.RenPyBuild"/>. Null when the file names none or could not be read.
|
||||
/// </summary>
|
||||
ValueTask<RenPyBuildFacts?> ReadRenPyBuildAsync(GameFileSnapshot snapshot, CancellationToken ct = default);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public sealed class StaticGameDetector(IDetectionRulesSource rulesSource, IGameF
|
||||
|
||||
/// <summary>
|
||||
/// The matched engine's version and its witness. The rules' own extractors answer from the snapshot; an engine whose
|
||||
/// version is decided in code — Unreal since beta.10, Unity, Godot and RPG Maker since beta.19 — gets one second read,
|
||||
/// version is decided in code — Unreal since beta.10, Unity, Godot and RPG Maker since beta.19, Ren'Py since beta.20 — gets one second read,
|
||||
/// made here for the one engine that matched rather than by the probe for every game.
|
||||
/// </summary>
|
||||
private async ValueTask<EngineVersionReading> VersionAsync(EngineMatch engine, GameFileSnapshot snapshot, CancellationToken ct)
|
||||
@@ -80,6 +80,8 @@ public sealed class StaticGameDetector(IDetectionRulesSource rulesSource, IGameF
|
||||
return await _probe.ReadGodotBuildAsync(snapshot, ct).ConfigureAwait(false) is { } godot ? GodotVersion.Decide(godot) : EngineVersionReading.None;
|
||||
case VersionExtractorType.RpgMakerBuild:
|
||||
return await _probe.ReadRpgMakerBuildAsync(snapshot, ct).ConfigureAwait(false) is { } maker ? RpgMakerVersion.Decide(maker) : EngineVersionReading.None;
|
||||
case VersionExtractorType.RenPyBuild:
|
||||
return await _probe.ReadRenPyBuildAsync(snapshot, ct).ConfigureAwait(false) is { } renpy ? RenPyVersion.Decide(renpy) : EngineVersionReading.None;
|
||||
default:
|
||||
return engine.Version is null ? EngineVersionReading.None : new EngineVersionReading(engine.Version, EngineVersionSource.Of(extractor.Type));
|
||||
}
|
||||
|
||||
@@ -9,4 +9,9 @@ namespace FrameLedger.Application.Import;
|
||||
/// executable when the store names one (GOG and Epic do; Steam and itch do not), and the store's version string.
|
||||
/// Read from local launcher files and registry keys only — nothing is fetched (CLAUDE.md rule 8).
|
||||
/// </summary>
|
||||
public sealed record StoreGame(string Platform, string StoreId, string Name, string InstallDirectory, string? ExePath, string? Version);
|
||||
/// <remarks>
|
||||
/// <c>LaunchKey</c> (beta.21, Play, D59): what the store's own launch link names where that is more than the store id —
|
||||
/// the Epic Games Launcher's <c>CatalogNamespace:CatalogItemId:AppName</c>; null for every other store.
|
||||
/// </remarks>
|
||||
public sealed record StoreGame(string Platform, string StoreId, string Name, string InstallDirectory, string? ExePath, string? Version,
|
||||
string? LaunchKey = null);
|
||||
@@ -0,0 +1,11 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Application.Play;
|
||||
|
||||
/// <summary>Where GOG GALAXY's program is (beta.21, Play): the GOG game shortcuts' own command needs it.</summary>
|
||||
public interface IGogGalaxyLocator
|
||||
{
|
||||
/// <summary>The full path of <c>GalaxyClient.exe</c> as GOG's own registry entries name it, or null when it is not installed.</summary>
|
||||
string? ClientPath();
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Application.Play;
|
||||
|
||||
/// <summary>The Play button's two modes (beta.21, owner decision D59): <c>ui.play_mode</c>'s choices.</summary>
|
||||
public static class PlayMode
|
||||
{
|
||||
/// <summary>Through the store that installed the game — the default; a game no store installed starts directly.</summary>
|
||||
public const string Store = "store";
|
||||
|
||||
/// <summary>The capture agent starts the game itself, recorded from its first frame, never as administrator.</summary>
|
||||
public const string Direct = "direct";
|
||||
|
||||
/// <summary>Whether a stored value is the direct mode; anything else is the store's.</summary>
|
||||
public static bool IsDirect(string? value) => string.Equals(value, Direct, StringComparison.Ordinal);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Application.Play;
|
||||
|
||||
/// <summary>
|
||||
/// One hand-off to a store's app: built by <see cref="StoreLaunches.For"/> from a record the store itself keeps, with every
|
||||
/// id checked against what that store's ids look like — never from a string a caller or a ledger row hands in, because a
|
||||
/// games row is a file any program of the user can write and a link is something the shell will open.
|
||||
/// </summary>
|
||||
/// <param name="Platform">The store, in <c>games.platform</c>'s vocabulary.</param>
|
||||
/// <param name="Kind">Whether <paramref name="Target"/> is a link or a program.</param>
|
||||
/// <param name="Target">The link, or the program's full path.</param>
|
||||
/// <param name="Arguments">The program's arguments; null for a link.</param>
|
||||
/// <param name="WorkingDirectory">The program's folder; null for a link.</param>
|
||||
public sealed record StoreLaunch(string Platform, StoreLaunchKind Kind, string Target, string? Arguments = null, string? WorkingDirectory = null);
|
||||
@@ -0,0 +1,17 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Application.Play;
|
||||
|
||||
/// <summary>How Play hands a game to its store's app (beta.21, owner decision D59).</summary>
|
||||
public enum StoreLaunchKind
|
||||
{
|
||||
/// <summary>Nobody decided. The zero value, never a launch.</summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>A link the shell opens with the store's registered app (<c>steam://</c>, <c>com.epicgames.launcher://</c>, <c>itch://</c>).</summary>
|
||||
OpenLink,
|
||||
|
||||
/// <summary>The store's own program with arguments — GOG GALAXY's <c>/command=runGame</c>, as its shortcuts start a game.</summary>
|
||||
RunProgram,
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using FrameLedger.Application.Import;
|
||||
|
||||
namespace FrameLedger.Application.Play;
|
||||
|
||||
/// <summary>
|
||||
/// The store's own way to start a game it installed (beta.21, Play, owner decision D59), read from the forms the stores
|
||||
/// themselves write — measured on the owner's PC on 2026-10-13, read-only:
|
||||
/// <list type="bullet">
|
||||
/// <item><b>Steam</b>: <c>steam://rungameid/<appid></c>, the link of every game shortcut Steam made there (20 of them);
|
||||
/// Steam starts the game.</item>
|
||||
/// <item><b>Epic Games Launcher</b>: <c>com.epicgames.launcher://apps/<namespace>%3A<item>%3A<app>?action=launch&silent=true</c>,
|
||||
/// the form the launcher's own desktop shortcuts carry, or the <c>AppName</c> alone where the manifest names no catalog —
|
||||
/// UNMEASURED: no Epic shortcut was on the PC.</item>
|
||||
/// <item><b>GOG GALAXY</b>: <c>GalaxyClient.exe /command=runGame /gameId=<id> /path="<folder>"</c>, the command line of
|
||||
/// the game shortcut GALAXY made there; GALAXY starts the game.</item>
|
||||
/// <item><b>itch</b>: <c>itch://install?game_id=<id>&launch</c>, which the itch app (26.22.0, read from its own code)
|
||||
/// answers by asking which installed copy to launch — the user confirms there.</item>
|
||||
/// </list>
|
||||
/// Every id is checked against what that store's ids look like before it is put in a link the shell will open.
|
||||
/// </summary>
|
||||
public static class StoreLaunches
|
||||
{
|
||||
/// <summary>The hand-off for <paramref name="record"/>, or null when its store has none FrameLedger may use.</summary>
|
||||
/// <param name="record">The store's record of the game (<see cref="StoreRecords.Owning"/>).</param>
|
||||
/// <param name="galaxyClientPath">GOG GALAXY's program, when it is installed; a GOG game without it has no hand-off.</param>
|
||||
public static StoreLaunch? For(StoreGame record, string? galaxyClientPath)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(record);
|
||||
return record.Platform switch
|
||||
{
|
||||
"steam" when IsDigits(record.StoreId) =>
|
||||
new StoreLaunch("steam", StoreLaunchKind.OpenLink, "steam://rungameid/" + record.StoreId),
|
||||
"epic" => Epic(record),
|
||||
"gog" when IsDigits(record.StoreId) && galaxyClientPath is { Length: > 0 } && IsPlainFolder(record.InstallDirectory) =>
|
||||
new StoreLaunch("gog", StoreLaunchKind.RunProgram, galaxyClientPath,
|
||||
"/command=runGame /gameId=" + record.StoreId + " /path=\"" + record.InstallDirectory.TrimEnd('\\', '/') + "\"",
|
||||
Path.GetDirectoryName(galaxyClientPath)),
|
||||
"itch" when IsDigits(record.StoreId) =>
|
||||
new StoreLaunch("itch", StoreLaunchKind.OpenLink, "itch://install?game_id=" + record.StoreId + "&launch"),
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
private static StoreLaunch? Epic(StoreGame record)
|
||||
{
|
||||
string? key = record.LaunchKey?.Split(':') is [var ns, var item, var app]
|
||||
&& IsEpicToken(ns) && IsEpicToken(item) && IsEpicToken(app) && string.Equals(app, record.StoreId, StringComparison.Ordinal)
|
||||
? ns + "%3A" + item + "%3A" + app
|
||||
: IsEpicToken(record.StoreId) ? record.StoreId : null;
|
||||
return key is null ? null : new StoreLaunch("epic", StoreLaunchKind.OpenLink, "com.epicgames.launcher://apps/" + key + "?action=launch&silent=true");
|
||||
}
|
||||
|
||||
/// <summary>Steam's app ids, GOG's product ids and itch's game ids are whole numbers.</summary>
|
||||
private static bool IsDigits(string id) => id.Length is > 0 and <= 20 && id.All(char.IsAsciiDigit);
|
||||
|
||||
/// <summary>Epic's AppName, CatalogNamespace and CatalogItemId: letters, digits, '-', '_' and '.'.</summary>
|
||||
private static bool IsEpicToken(string token) =>
|
||||
token.Length is > 0 and <= 128 && token.All(static c => char.IsAsciiLetterOrDigit(c) || c is '-' or '_' or '.');
|
||||
|
||||
/// <summary>A folder that can stand inside one pair of quotes on GALAXY's command line.</summary>
|
||||
private static bool IsPlainFolder(string folder) =>
|
||||
folder.Length is > 3 and < 1024 && Path.IsPathFullyQualified(folder) && !folder.Contains('"', StringComparison.Ordinal);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using FrameLedger.Application.Import;
|
||||
|
||||
namespace FrameLedger.Application.Play;
|
||||
|
||||
/// <summary>Which store installed a library entry's game (beta.21, Play): asked of the stores' own records, as the import reads them.</summary>
|
||||
public static class StoreRecords
|
||||
{
|
||||
/// <summary>
|
||||
/// The record whose install folder holds <paramref name="exePath"/> — the deepest such folder, and among equals the one
|
||||
/// whose id is the entry's <paramref name="storeId"/> — or null when no store installed it. The entry's own platform is
|
||||
/// not asked: detection may have rewritten it (an itch or GOG build that ships Steam's API reads as Steam) while its store
|
||||
/// id stayed the importer's, and a Steam link built from an itch id would start some other game.
|
||||
/// </summary>
|
||||
public static StoreGame? Owning(string exePath, string? storeId, IEnumerable<StoreGame> records)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(exePath);
|
||||
ArgumentNullException.ThrowIfNull(records);
|
||||
string exe = Full(exePath);
|
||||
StoreGame? best = null;
|
||||
int bestLength = -1;
|
||||
foreach (StoreGame record in records)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(record.InstallDirectory))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string folder = Full(record.InstallDirectory).TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar) + Path.DirectorySeparatorChar;
|
||||
if (!exe.StartsWith(folder, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
bool deeper = folder.Length > bestLength;
|
||||
bool sameButNamed = folder.Length == bestLength && storeId is not null
|
||||
&& string.Equals(record.StoreId, storeId, StringComparison.Ordinal)
|
||||
&& !string.Equals(best?.StoreId, storeId, StringComparison.Ordinal);
|
||||
if (deeper || sameButNamed)
|
||||
{
|
||||
best = record;
|
||||
bestLength = folder.Length;
|
||||
}
|
||||
}
|
||||
|
||||
return best;
|
||||
}
|
||||
|
||||
private static string Full(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Path.GetFullPath(path);
|
||||
}
|
||||
catch (Exception ex) when (ex is ArgumentException or NotSupportedException or PathTooLongException)
|
||||
{
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,12 +89,27 @@ public static class SettingsRegistry
|
||||
Choices = ["grid", "list"],
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// What the Play button does (beta.21, owner decision D59): <c>store</c> hands the game to the app of the store that
|
||||
/// installed it — Steam and the Epic Games Launcher start it, GOG GALAXY runs it as its own shortcuts do, itch asks
|
||||
/// first — and has the capture agent start it when no store did; <c>direct</c> has the capture agent start it, recorded
|
||||
/// from its first frame and never as administrator. Settings ▸ Games; the Agent never reads it.
|
||||
/// </summary>
|
||||
public static readonly SettingDefinition UiPlayMode = new()
|
||||
{
|
||||
Key = "ui.play_mode",
|
||||
Kind = SettingKind.Choice,
|
||||
Default = "store",
|
||||
Choices = ["store", "direct"],
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Whether the Agent's watcher records tracked games that the App did not launch (FR-3.1/FR-3.3). <b>Reserved since
|
||||
/// beta.12:</b> the App showed a switch for it ("Record games launched outside FrameLedger") and no Agent code ever read
|
||||
/// it, so turning it off recorded every game anyway; and the App has no way to start a game, so "off" could only have
|
||||
/// it, so turning it off recorded every game anyway; and the App had no way to start a game, so "off" could only have
|
||||
/// meant recording nothing. The switch is gone and the key stays, read by nobody, until a launch path exists
|
||||
/// (<c>06_DATA_MODEL</c> §Settings registry).
|
||||
/// (<c>06_DATA_MODEL</c> §Settings registry). One does since beta.21 — Play, through the store or the capture agent —
|
||||
/// and the key stays reserved: a game Play starts is recorded exactly as a game started any other way.
|
||||
/// </summary>
|
||||
public static readonly SettingDefinition CaptureBackground = new()
|
||||
{
|
||||
@@ -229,7 +244,7 @@ public static class SettingsRegistry
|
||||
/// <summary>Every definition, in the order <c>06_DATA_MODEL</c> lists them.</summary>
|
||||
public static IReadOnlyList<SettingDefinition> All { get; } =
|
||||
[
|
||||
UiLanguage, UiTheme, UiStartWithWindows, UiMinimizeToTray, UiHideAntiCheatHooking, UiFpsDecimals, UiHideScrollBars, UiLibraryView,
|
||||
UiLanguage, UiTheme, UiStartWithWindows, UiMinimizeToTray, UiHideAntiCheatHooking, UiFpsDecimals, UiHideScrollBars, UiLibraryView, UiPlayMode,
|
||||
CaptureBackground, HookingKillSwitch, HookingUserModeExceptions, CaptureRunElevated, CaptureMinSessionSeconds, TelemetryIntervalMs, RetentionRawSessionsPerGame,
|
||||
RetentionRemoveUninstalledGames, UpdateChannel, UpdateAutoCheck, PrivacyOnlineMetadata, LogDebug,
|
||||
];
|
||||
|
||||
@@ -51,6 +51,9 @@ public static class EngineVersionSource
|
||||
/// <summary>RPG Maker VX Ace: the RGSS3 library.</summary>
|
||||
public const string Rgss3Library = "rgss3_library";
|
||||
|
||||
/// <summary>Ren'Py (beta.20): the <c>version</c> line of the engine's <c>renpy/vc_version.py</c>, MAJOR.MINOR.PATCH.</summary>
|
||||
public const string RenPyVcVersion = "renpy_vc_version";
|
||||
|
||||
/// <summary>The rule's own extractor, named as the rules file names it (<c>pe_file_version</c>, <c>strings_regex</c>, …).</summary>
|
||||
public static string Of(VersionExtractorType type) => type switch
|
||||
{
|
||||
@@ -62,6 +65,7 @@ public static class EngineVersionSource
|
||||
VersionExtractorType.UnityBuild => "unity_build",
|
||||
VersionExtractorType.GodotBuild => "godot_build",
|
||||
VersionExtractorType.RpgMakerBuild => "rpgmaker_build",
|
||||
VersionExtractorType.RenPyBuild => "renpy_build",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(type), type, "not a version extractor"),
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.Domain.Detection;
|
||||
|
||||
/// <summary>
|
||||
/// What a Ren'Py title's own files say about the engine it was built with (beta.20), read from the files on disk.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Ren'Py ships its engine as Python beside the game's launcher, and the engine's <c>renpy/vc_version.py</c> names its
|
||||
/// release: <c>version = '8.5.0.25111603'</c>, with <c>version_name</c>, <c>branch</c>, <c>official</c> and <c>nightly</c>
|
||||
/// beside it. Measured 2026-10-12 on the owner's one Ren'Py install, Bound Between Desks (Steam): <c>8.5.0.25111603</c>,
|
||||
/// the same number the game's own <c>log.txt</c> printed at its last start (<c>Ren'Py 8.5.0.25111603</c>). Its launcher
|
||||
/// executable carries no version resource.
|
||||
/// </remarks>
|
||||
public sealed record RenPyBuildFacts
|
||||
{
|
||||
/// <summary>The <c>version</c> string of <c>renpy/vc_version.py</c> (<c>8.5.0.25111603</c>), or null when it names none.</summary>
|
||||
public string? VcVersion { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace FrameLedger.Domain.Detection;
|
||||
|
||||
/// <summary>The Ren'Py version a title was built with (beta.20), decided from <see cref="RenPyBuildFacts"/> — or nothing.</summary>
|
||||
/// <remarks>
|
||||
/// One witness: the engine's own <c>renpy/vc_version.py</c>. Its <c>version</c> carries a fourth number, the build
|
||||
/// (<c>8.5.0.25111603</c>); a Ren'Py release is named by the first three (Ren'Py 8.5.0), so those are kept. A title whose
|
||||
/// engine names no version there reads as none — nothing else is guessed from.
|
||||
/// </remarks>
|
||||
public static partial class RenPyVersion
|
||||
{
|
||||
/// <summary>The version these facts establish, and the witness it rests on.</summary>
|
||||
public static EngineVersionReading Decide(RenPyBuildFacts facts)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(facts);
|
||||
|
||||
return facts.VcVersion is { } text && Shape().Match(text.Trim()) is { Success: true } m
|
||||
&& Parse(m.Groups["major"].Value) is >= 1 and <= 99 and int major
|
||||
&& Parse(m.Groups["minor"].Value) is >= 0 and int minor
|
||||
&& Parse(m.Groups["patch"].Value) is >= 0 and int patch
|
||||
? new EngineVersionReading(string.Create(CultureInfo.InvariantCulture, $"{major}.{minor}.{patch}"), EngineVersionSource.RenPyVcVersion)
|
||||
: EngineVersionReading.None;
|
||||
}
|
||||
|
||||
private static int Parse(string digits) =>
|
||||
int.TryParse(digits, NumberStyles.None, CultureInfo.InvariantCulture, out int value) ? value : -1;
|
||||
|
||||
[GeneratedRegex(@"^(?<major>\d{1,2})\.(?<minor>\d{1,3})\.(?<patch>\d{1,3})(?:\.\d{1,12})?$", RegexOptions.ExplicitCapture | RegexOptions.CultureInvariant, matchTimeoutMilliseconds: 250)]
|
||||
private static partial Regex Shape();
|
||||
}
|
||||
@@ -235,7 +235,7 @@ public sealed class RuleEvaluator
|
||||
// that matched (beta.10; Unity, Godot and RPG Maker since beta.19) — reads the probe must not make for every
|
||||
// game in the library.
|
||||
VersionExtractorType.UnrealBuild or VersionExtractorType.UnityBuild or VersionExtractorType.GodotBuild
|
||||
or VersionExtractorType.RpgMakerBuild => null,
|
||||
or VersionExtractorType.RpgMakerBuild or VersionExtractorType.RenPyBuild => null,
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -40,4 +40,7 @@ public enum VersionExtractorType
|
||||
/// (<see cref="RpgMakerVersion.Decide"/>).
|
||||
/// </summary>
|
||||
RpgMakerBuild,
|
||||
|
||||
/// <summary>Ren'Py's (beta.20): the <c>version</c> line of the engine's <c>renpy/vc_version.py</c> (<see cref="RenPyVersion.Decide"/>).</summary>
|
||||
RenPyBuild,
|
||||
}
|
||||
@@ -228,6 +228,7 @@ public sealed class DetectionRulesFile : IDetectionRulesSource
|
||||
"unity_build" => VersionExtractorType.UnityBuild,
|
||||
"godot_build" => VersionExtractorType.GodotBuild,
|
||||
"rpgmaker_build" => VersionExtractorType.RpgMakerBuild,
|
||||
"renpy_build" => VersionExtractorType.RenPyBuild,
|
||||
_ => throw new InvalidOperationException($"'{owner}' has unknown version extractor '{d.Type}'"),
|
||||
},
|
||||
Value = d.Value,
|
||||
|
||||
@@ -160,6 +160,15 @@ public sealed class GameFileProbe : IGameFileProbe
|
||||
return ValueTask.FromResult(RpgMakerBuildReader.Read(Native(snapshot.ExePath), library));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <remarks>The engine's <c>renpy/vc_version.py</c> beside the launcher, where Ren'Py keeps it.</remarks>
|
||||
public ValueTask<RenPyBuildFacts?> ReadRenPyBuildAsync(GameFileSnapshot snapshot, CancellationToken ct = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(snapshot);
|
||||
ct.ThrowIfCancellationRequested();
|
||||
return ValueTask.FromResult(RenPyBuildReader.Read(Native(snapshot.ExePath)));
|
||||
}
|
||||
|
||||
private static string Native(string path) => path.Replace('/', Path.DirectorySeparatorChar);
|
||||
|
||||
/// <summary>The full path of the shallowest file the walk listed whose name <paramref name="named"/> accepts, or null.</summary>
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using FrameLedger.Domain.Detection;
|
||||
|
||||
namespace FrameLedger.Infrastructure.Detection;
|
||||
|
||||
/// <summary>
|
||||
/// Ren'Py's build facts from the files on disk (beta.20, <c>05_DETECTION</c> §Engine version — Ren'Py): the <c>version</c>
|
||||
/// line of the engine's <c>renpy/vc_version.py</c>, which Ren'Py keeps beside the game's launcher — read from its first
|
||||
/// <see cref="VersionFileBytes"/> bytes. Nothing else of the engine's files is read.
|
||||
/// </summary>
|
||||
public static partial class RenPyBuildReader
|
||||
{
|
||||
/// <summary>How much of <c>vc_version.py</c> is read: the measured file is 109 bytes.</summary>
|
||||
public const int VersionFileBytes = 4096;
|
||||
|
||||
/// <summary>The facts for the launcher <paramref name="exePath"/>, or null when its engine's version file names none.</summary>
|
||||
public static RenPyBuildFacts? Read(string exePath)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(exePath);
|
||||
string? folder = Path.GetDirectoryName(exePath);
|
||||
return folder is null ? null : ReadVersionFile(Path.Combine(folder, "renpy", "vc_version.py"));
|
||||
}
|
||||
|
||||
/// <summary>The <c>version</c> a <c>vc_version.py</c> names, or null. Public for the tests.</summary>
|
||||
public static RenPyBuildFacts? ReadVersionFile(string path)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(path);
|
||||
try
|
||||
{
|
||||
using var file = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete, bufferSize: 1);
|
||||
byte[] head = new byte[VersionFileBytes];
|
||||
int read = file.ReadAtLeast(head, head.Length, throwOnEndOfStream: false);
|
||||
Match m = VersionLine().Match(Encoding.UTF8.GetString(head, 0, read));
|
||||
return m.Success ? new RenPyBuildFacts { VcVersion = m.Groups["version"].Value } : null;
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary><c>version = '8.5.0.25111603'</c> at the start of a line — never <c>version_name</c>, whose name goes on.</summary>
|
||||
[GeneratedRegex(@"^version\s*=\s*['""](?<version>[^'""\r\n]{1,64})['""]", RegexOptions.ExplicitCapture | RegexOptions.Multiline | RegexOptions.CultureInvariant, matchTimeoutMilliseconds: 250)]
|
||||
private static partial Regex VersionLine();
|
||||
}
|
||||
@@ -9,7 +9,9 @@ namespace FrameLedger.Infrastructure.Import;
|
||||
/// <summary>
|
||||
/// The Epic Games Launcher's installed library (FR-1.2): one <c>*.item</c> JSON per title under
|
||||
/// <c>%ProgramData%\Epic\EpicGamesLauncher\Data\Manifests</c> — <c>DisplayName</c>, <c>InstallLocation</c>,
|
||||
/// <c>LaunchExecutable</c> (relative to the install), <c>AppName</c> (the store id) and <c>AppVersionString</c>.
|
||||
/// <c>LaunchExecutable</c> (relative to the install), <c>AppName</c> (the store id) and <c>AppVersionString</c>; since beta.21
|
||||
/// also <c>CatalogNamespace</c> and <c>CatalogItemId</c>, which with the AppName are what the launcher's own launch link names
|
||||
/// (<see cref="StoreGame.LaunchKey"/>, for Play).
|
||||
/// Read with <c>JsonDocument</c> so an unexpected shape costs that one file, never the import.
|
||||
/// </summary>
|
||||
public sealed class EpicLibrarySource(string? manifestsDirectory = null) : IStoreLibrarySource
|
||||
@@ -55,7 +57,10 @@ public sealed class EpicLibrarySource(string? manifestsDirectory = null) : IStor
|
||||
|
||||
string? launch = Text(root, "LaunchExecutable");
|
||||
string? exe = string.IsNullOrWhiteSpace(launch) ? null : Path.Combine(location, launch);
|
||||
return new StoreGame("epic", id, name, location, exe, Text(root, "AppVersionString"));
|
||||
string? ns = Text(root, "CatalogNamespace");
|
||||
string? catalogItem = Text(root, "CatalogItemId");
|
||||
string? launchKey = string.IsNullOrWhiteSpace(ns) || string.IsNullOrWhiteSpace(catalogItem) ? null : ns + ":" + catalogItem + ":" + id;
|
||||
return new StoreGame("epic", id, name, location, exe, Text(root, "AppVersionString"), launchKey);
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or JsonException)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using FrameLedger.Application.Play;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace FrameLedger.Infrastructure.Import;
|
||||
|
||||
/// <summary>
|
||||
/// GOG GALAXY's program, as GOG's own registry entries name it (beta.21, Play): <c>HKLM\SOFTWARE\WOW6432Node\GOG.com\GalaxyClient</c>'s
|
||||
/// <c>clientExecutable</c> (<c>GalaxyClient.exe</c>) in the folder its <c>paths\client</c> holds — read on the owner's PC on
|
||||
/// 2026-10-13 as <c>C:\Program Files\GOG Galaxy</c>, the folder of the program its game shortcuts start. Read-only, whichever
|
||||
/// hive and key the caller names (a test uses its own HKCU key); a key that is not there, or a file that is not, is "not
|
||||
/// installed".
|
||||
/// </summary>
|
||||
public sealed class GogGalaxyLocator(RegistryHive hive = RegistryHive.LocalMachine, string keyPath = GogGalaxyLocator.DefaultKeyPath) : IGogGalaxyLocator
|
||||
{
|
||||
public const string DefaultKeyPath = @"SOFTWARE\WOW6432Node\GOG.com\GalaxyClient";
|
||||
|
||||
public string? ClientPath()
|
||||
{
|
||||
try
|
||||
{
|
||||
using RegistryKey baseKey = RegistryKey.OpenBaseKey(hive, RegistryView.Default);
|
||||
using RegistryKey? client = baseKey.OpenSubKey(keyPath, writable: false);
|
||||
using RegistryKey? paths = client?.OpenSubKey("paths", writable: false);
|
||||
if (client?.GetValue("clientExecutable") is not string exe || paths?.GetValue("client") is not string folder
|
||||
|| string.IsNullOrWhiteSpace(exe) || string.IsNullOrWhiteSpace(folder) || exe.IndexOfAny(['\\', '/']) >= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string path = Path.Combine(folder, exe);
|
||||
return Path.IsPathFullyQualified(path) && File.Exists(path) ? path : null;
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or System.Security.SecurityException or ArgumentException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -320,15 +320,17 @@ struct Sources {
|
||||
|
||||
// Check 4 — the static pre-scan.
|
||||
//
|
||||
// The directory the target's image lives in. kFailed means we could not
|
||||
// The directory the target's image lives in — its OWN folder (2026-10-13;
|
||||
// until then the seam resolved the install root itself, and a folder beside
|
||||
// a nested executable was out of check 4's reach). The checks resolve the
|
||||
// install root from it (ResolveInstallRoot). kFailed means we could not
|
||||
// name it, which refuses: check 4 cannot run against a directory we cannot
|
||||
// find, and "we did not look" has never been a pass in this file.
|
||||
Collected (*ImageDirectory)(std::uint32_t pid, wchar_t* out, std::size_t cap) = nullptr;
|
||||
|
||||
// The target's executable LEAF NAME, for check 3. A separate seam from
|
||||
// ImageDirectory because it is a different fact: that one deliberately
|
||||
// resolves the INSTALL ROOT (Unreal puts the exe three levels below it), and
|
||||
// the name is exactly what it throws away.
|
||||
// ImageDirectory because it is a different fact: that one strips the name
|
||||
// to name the folder, and the name is exactly what it throws away.
|
||||
//
|
||||
// NARROW on purpose. `blockedExecutables` is ASCII by schema and
|
||||
// MatchesBlockedExecutable compares ASCII, so converting here keeps one
|
||||
|
||||
@@ -90,7 +90,10 @@ FL_GUARD_ABI void FlGuardedInjectWhenReady(std::uint32_t targetPid, const wchar_
|
||||
// It replaced FlStaticPreScan(gameDirectory) on 2026-09-25. That export scanned the directory it was given, and its
|
||||
// one caller gave the executable's own folder, so an Unreal title's root-level EasyAntiCheat/ was never seen by the
|
||||
// scan that decides whether hooking may be enabled. This one resolves the install root itself (ResolveInstallRoot, as
|
||||
// the chokepoint always did) and adds check 3: the executable's name and the install's store identity.
|
||||
// the chokepoint always did) and adds check 3: the executable's name and the install's store identity. Since
|
||||
// 2026-10-13 check 4 walks the executable's own folder too when it lives below the root, here and in the chokepoint
|
||||
// alike: the root's walk reaches three levels, and Wuthering Waves keeps its AntiCheatExpert\ beside an executable
|
||||
// that is already three levels down.
|
||||
//
|
||||
// It reports through FlGuardResult rather than an outcome enum of its own, so there is ONE reason table and ONE
|
||||
// mirror surface: kAllow means clean; BlockedExecutable, BlockedStoreId, AntiCheatDirectory and AntiCheatFile name
|
||||
|
||||
@@ -54,8 +54,18 @@ namespace fl::guard {
|
||||
// because the entry cap is a REFUSAL: overrunning it does not scan less, it
|
||||
// refuses the title.
|
||||
//
|
||||
// Both caps are REFUSALS, not truncations. A walk that stopped early has not
|
||||
// seen the directory, and this file has no "scanned what we could" state.
|
||||
// THE TWO CAPS ARE NOT THE SAME KIND — corrected 2026-10-13. This said both were
|
||||
// refusals, and only the ENTRY cap is: overrunning it, an unreadable name or a
|
||||
// reparse point is kIncomplete, which refuses. The DEPTH cap is a REACH: a folder
|
||||
// at the last level is reported by name and never opened, silently — so what it
|
||||
// holds is not seen, and the walk still reads as complete. Raising it is not the
|
||||
// answer: at depth 5 three installed titles overrun 4096 entries (Master Duel
|
||||
// 41,251), which would refuse them. What the reach cost was measured instead:
|
||||
// Wuthering Waves keeps `AntiCheatExpert\` beside its executable at
|
||||
// `Client\Binaries\Win64\` — four levels under the install root — and the walk
|
||||
// from the root read it clean. Check 4 therefore walks the root AND, when the
|
||||
// executable lives below it, the executable's own folder (ScanGameFolders,
|
||||
// fl_prescan.cpp): each with this reach and its own entry budget.
|
||||
inline constexpr std::size_t kMaxPreScanDepth = 3;
|
||||
inline constexpr std::size_t kMaxPreScanEntries = 4096;
|
||||
|
||||
@@ -84,6 +94,11 @@ inline constexpr std::size_t kMaxPreScanPathLen = 1024;
|
||||
// `D:\games\Title\` is a folder of other games, and refusing this title because
|
||||
// a sibling ships anti-cheat is a false refusal with no appeal.
|
||||
//
|
||||
// The root REPLACED the executable's folder as check 4's one walk on 2026-09-25,
|
||||
// and that was half right: what sits at the root (Lies of P's EasyAntiCheat/) is
|
||||
// seen, what sits beside a nested executable is not (kMaxPreScanDepth). Since
|
||||
// 2026-10-13 check 4 walks both.
|
||||
//
|
||||
// Returns false if the result does not fit, which the caller treats as
|
||||
// "cannot determine".
|
||||
[[nodiscard]] bool ResolveInstallRoot(const wchar_t* exeDir, wchar_t* out, std::size_t cap) noexcept;
|
||||
@@ -96,8 +111,9 @@ inline constexpr std::size_t kMaxPreScanPathLen = 1024;
|
||||
// game's hooking off like any finding (19_SAFETY §What a finding does to the game); the owner took that trade.
|
||||
inline constexpr const char* kKernelDriverInTreeFamily = "Kernel driver in the game folder";
|
||||
|
||||
// Check 4, as EvaluateImpl runs it: derive the target's directory from its pid,
|
||||
// then scan it.
|
||||
// Check 4, as EvaluateImpl runs it: derive the target's own folder from its pid
|
||||
// (Sources::ImageDirectory), resolve the install root from it, then walk the root
|
||||
// and — when they differ — the executable's folder.
|
||||
//
|
||||
// Takes Sources because every evidence input in this guard is a seam — an input
|
||||
// whose failure path cannot be exercised is an input whose failure path is
|
||||
@@ -119,13 +135,14 @@ inline constexpr const char* kKernelDriverInTreeFamily = "Kernel driver in the g
|
||||
// read.
|
||||
[[nodiscard]] Verdict CheckStoreIdentity(const Sources& s, const Rules& rules, const wchar_t* installRoot) noexcept;
|
||||
|
||||
// The same, as EvaluateImpl runs it: the install root derived from the pid, exactly as check 4 derives it.
|
||||
// The same, as EvaluateImpl runs it: the install root resolved from the target's own folder, exactly as check 4
|
||||
// resolves it.
|
||||
[[nodiscard]] Verdict CheckBlockedStoreId(const Sources& s, const Rules& rules, std::uint32_t targetPid) noexcept;
|
||||
|
||||
// The advisory form, for the question "can this game be enabled at all?" (FR-2.2) and for the Agent's pre-scan of
|
||||
// the library (19_SAFETY §What a finding does to the game). Same matcher, same polarity, no pid: check 3 (the
|
||||
// executable's own name, and the store identity of its install root) and check 4 (the install root's tree), from the
|
||||
// EXECUTABLE's path.
|
||||
// executable's own name, and the store identity of its install root) and check 4 (the install root's tree, and the
|
||||
// executable's own folder's tree when it lives below the root — 2026-10-13), from the EXECUTABLE's path.
|
||||
//
|
||||
// It takes the executable, not a directory, since 2026-09-25. It took a directory, and its one caller passed the
|
||||
// executable's own folder while nothing resolved the install root — so the pre-scan that decides whether hooking may
|
||||
|
||||
@@ -337,13 +337,15 @@ Collected ImageDirectoryImpl(std::uint32_t pid, wchar_t* out, std::size_t cap) n
|
||||
}
|
||||
*lastSep = L'\0';
|
||||
|
||||
// The INSTALL ROOT, not the executable's directory. Unreal puts the exe at
|
||||
// <root>\<Project>\Binaries\Win64\, and EasyAntiCheat/ sits at the root —
|
||||
// measured on Lies of P, where the pre-scan saw seven files none of which
|
||||
// could have been an anti-cheat SDK.
|
||||
if (!ResolveInstallRoot(path, out, cap)) {
|
||||
// The executable's OWN folder (2026-10-13). The checks derive the install
|
||||
// root from it (ResolveInstallRoot) and check 4 walks both. Until then this
|
||||
// returned the root, which is where Lies of P keeps EasyAntiCheat/ — and
|
||||
// that alone left a folder BESIDE an Unreal executable, three levels below
|
||||
// the root, out of the walk's reach: Wuthering Waves' AntiCheatExpert\.
|
||||
if (wcslen(path) + 1 > cap) {
|
||||
return Collected::kFailed; // truncating a path yields a DIFFERENT directory
|
||||
}
|
||||
wcscpy_s(out, cap, path);
|
||||
return Collected::kOk;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,6 +158,23 @@ Verdict ScanWith(const Sources& s, const Rules& rules, const wchar_t* dir, const
|
||||
return Passed();
|
||||
}
|
||||
|
||||
// Check 4's two walks (2026-10-13): the install root's tree, then — when the executable lives below the root — the
|
||||
// executable's own folder's tree. The walk reaches kMaxPreScanDepth levels below the folder it starts from
|
||||
// (fl_prescan.h), and an Unreal executable sits three levels below its root, so a folder BESIDE it is four: MEASURED on
|
||||
// Wuthering Waves, whose `Client\Binaries\Win64\AntiCheatExpert\` the root's walk listed the parent of and never
|
||||
// opened, and which therefore read clean. Same walk, same caps, same tolerance and the same record of a tolerated
|
||||
// finding; the first refusal is the answer.
|
||||
Verdict ScanGameFolders(const Sources& s, const Rules& rules, const wchar_t* root, const wchar_t* exeDir,
|
||||
const Tolerance* tolerance, ToleratedFinding* finding) noexcept {
|
||||
if (Verdict v = ScanWith(s, rules, root, tolerance, finding); !v.Allowed()) {
|
||||
return v;
|
||||
}
|
||||
if (exeDir == nullptr || exeDir[0] == L'\0' || _wcsicmp(root, exeDir) == 0) {
|
||||
return Passed(); // the executable lives at its root: the one walk saw its folder
|
||||
}
|
||||
return ScanWith(s, rules, exeDir, tolerance, finding);
|
||||
}
|
||||
|
||||
// Case-insensitive comparison of one path segment.
|
||||
bool SegmentIs(const wchar_t* begin, const wchar_t* end, const wchar_t* literal) noexcept {
|
||||
const std::size_t n = static_cast<std::size_t>(end - begin);
|
||||
@@ -240,15 +257,16 @@ Verdict PreScanGameWith(const wchar_t* exePath, const Sources& s, const char* to
|
||||
return Refused(Reason::kBlockedExecutable, hit->family, leaf);
|
||||
}
|
||||
|
||||
// Check 3's store half, then check 4 — both over the install root. Title lists are never tolerated (D33): only
|
||||
// check 4 takes the exception, and only for a user-mode family.
|
||||
// Check 3's store half over the install root, then check 4 over the root and the executable's own folder. Title
|
||||
// lists are never tolerated (D33): only check 4 takes the exception, and only for a user-mode family.
|
||||
if (Verdict v = CheckStoreIdentity(s, rules, root); !v.Allowed()) {
|
||||
return v;
|
||||
}
|
||||
Tolerance tolerance;
|
||||
ResolveTolerance(rules, toleratedFamilies, tolerance);
|
||||
ToleratedFinding finding;
|
||||
if (Verdict v = ScanWith(s, rules, root, tolerance.any ? &tolerance : nullptr, &finding); !v.Allowed()) {
|
||||
if (Verdict v = ScanGameFolders(s, rules, root, dir, tolerance.any ? &tolerance : nullptr, &finding);
|
||||
!v.Allowed()) {
|
||||
return v;
|
||||
}
|
||||
return finding.seen ? ToleratedVerdict(finding) : Passed();
|
||||
@@ -335,7 +353,11 @@ Verdict CheckStaticPreScan(const Sources& s, const Rules& rules, std::uint32_t t
|
||||
// 19_SAFETY has no "three of four checks passed" state.
|
||||
return Refused(Reason::kPreScanFailed, nullptr, "could not establish the target's directory");
|
||||
}
|
||||
return ScanWith(s, rules, dir, tolerance, finding);
|
||||
wchar_t root[kMaxPreScanPathLen] = {};
|
||||
if (!ResolveInstallRoot(dir, root, kMaxPreScanPathLen)) {
|
||||
return Refused(Reason::kPreScanFailed, nullptr, "could not establish the game's install root");
|
||||
}
|
||||
return ScanGameFolders(s, rules, root, dir, tolerance, finding);
|
||||
}
|
||||
|
||||
Verdict CheckStoreIdentity(const Sources& s, const Rules& rules, const wchar_t* installRoot) noexcept {
|
||||
@@ -370,10 +392,14 @@ Verdict CheckBlockedStoreId(const Sources& s, const Rules& rules, std::uint32_t
|
||||
if (s.ImageDirectory == nullptr) {
|
||||
return Refused(Reason::kPreScanFailed, nullptr, "no image-path source");
|
||||
}
|
||||
wchar_t root[kMaxPreScanPathLen] = {};
|
||||
if (s.ImageDirectory(targetPid, root, kMaxPreScanPathLen) != Collected::kOk || root[0] == L'\0') {
|
||||
wchar_t dir[kMaxPreScanPathLen] = {};
|
||||
if (s.ImageDirectory(targetPid, dir, kMaxPreScanPathLen) != Collected::kOk || dir[0] == L'\0') {
|
||||
return Refused(Reason::kPreScanFailed, nullptr, "could not establish the target's directory");
|
||||
}
|
||||
wchar_t root[kMaxPreScanPathLen] = {};
|
||||
if (!ResolveInstallRoot(dir, root, kMaxPreScanPathLen)) {
|
||||
return Refused(Reason::kPreScanFailed, nullptr, "could not establish the game's install root");
|
||||
}
|
||||
return CheckStoreIdentity(s, rules, root);
|
||||
}
|
||||
|
||||
|
||||
+183
-10
@@ -154,6 +154,14 @@ struct Fake {
|
||||
std::wstring imageDirectory = L"C:\\Games\\Example";
|
||||
Collected imageDirectoryResult = Collected::kOk;
|
||||
std::wstring lastScannedDir; // what check 4 was asked to walk
|
||||
// 2026-10-13: check 4 walks the install root AND the executable's own folder. A directory named here answers with
|
||||
// its own listing; any other answers with `dirEntries`, so every case written before keeps its meaning.
|
||||
struct Listing {
|
||||
std::vector<std::pair<std::string, bool>> entries;
|
||||
Collected result = Collected::kOk;
|
||||
};
|
||||
std::map<std::wstring, Listing> listingAt;
|
||||
std::vector<std::wstring> scannedDirs; // every directory check 4 was asked to walk, in order
|
||||
|
||||
// Check 3's store half (2026-09-25). Defaults to "this install carries no store identity", so every
|
||||
// pre-existing case keeps its meaning now that the floor lists store ids: check 3 asks, and allows.
|
||||
@@ -312,12 +320,15 @@ Collected FakeImageFileName(std::uint32_t, char* out, std::size_t cap) {
|
||||
|
||||
Collected FakeEnumDirEntries(const wchar_t* dir, DirEntrySink sink, void* ctx) {
|
||||
g.lastScannedDir = dir != nullptr ? dir : L"";
|
||||
for (const auto& e : g.dirEntries) {
|
||||
g.scannedDirs.push_back(g.lastScannedDir);
|
||||
const auto own = g.listingAt.find(g.lastScannedDir);
|
||||
const auto& entries = own != g.listingAt.end() ? own->second.entries : g.dirEntries;
|
||||
for (const auto& e : entries) {
|
||||
if (!sink(ctx, e.first.c_str(), e.second)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return g.dirEntriesResult;
|
||||
return own != g.listingAt.end() ? own->second.result : g.dirEntriesResult;
|
||||
}
|
||||
|
||||
Collected FakeStoreIdentity(const wchar_t* installRoot, char* out, std::size_t cap) {
|
||||
@@ -3759,10 +3770,13 @@ TEST_CASE("a directory listing that FAILED is undetermined, not clean", "[guard]
|
||||
}
|
||||
|
||||
TEST_CASE("a TRUNCATED directory listing is undetermined, not clean", "[guard][prescan][failclosed]") {
|
||||
// The entry cap, the depth cap and an unfollowed reparse point all arrive
|
||||
// The entry cap, an unreadable name and an unfollowed reparse point arrive
|
||||
// here as kIncomplete. An empty-but-incomplete listing is the exact shape
|
||||
// of this project's worst defect: it reads as "nothing found" when it means
|
||||
// "we did not finish looking".
|
||||
// "we did not finish looking". The DEPTH cap does not arrive here, and this
|
||||
// comment said it did until 2026-10-13: it is a reach — a folder at the last
|
||||
// level is named and never opened, and the walk still reports kOk — which
|
||||
// is why check 4 walks the executable's own folder too (fl_prescan.h).
|
||||
ResetFake();
|
||||
g.dirEntries = {{"game.exe", false}};
|
||||
g.dirEntriesResult = Collected::kIncomplete;
|
||||
@@ -3951,17 +3965,95 @@ TEST_CASE("the advisory pre-scan reaches the same verdict as the one inside the
|
||||
CHECK(StaticPreScanGameWithSources(L"C:\\Games\\Example\\", FakeSources()).reason == Reason::kPreScanFailed);
|
||||
}
|
||||
|
||||
TEST_CASE("the advisory pre-scan walks the INSTALL ROOT, not the executable's folder", "[guard][prescan]") {
|
||||
TEST_CASE("the advisory pre-scan walks the INSTALL ROOT first, then the executable's folder", "[guard][prescan]") {
|
||||
// Until 2026-09-25 the advisory pre-scan scanned the directory it was handed, and the Agent handed it the
|
||||
// executable's own folder: for Lies of P's layout, a folder of seven files, with EasyAntiCheat/ three levels up.
|
||||
// The chokepoint resolved the root all along; the scan that decides whether hooking may be enabled did not.
|
||||
// The chokepoint resolved the root all along; the scan that decides whether hooking may be enabled did not. A hit
|
||||
// at the root is the answer, so nothing is walked after it.
|
||||
const std::wstring root = LR"(D:\SteamLibrary\steamapps\common\Lies of P)";
|
||||
const std::wstring exe = root + LR"(\LiesofP\Binaries\Win64\LOP-Win64-Shipping.exe)";
|
||||
ResetFake();
|
||||
g.dirEntries = {{"EasyAntiCheat", true}};
|
||||
const Verdict v = StaticPreScanGameWithSources(
|
||||
LR"(D:\SteamLibrary\steamapps\common\Lies of P\LiesofP\Binaries\Win64\LOP-Win64-Shipping.exe)", FakeSources());
|
||||
const Verdict v = StaticPreScanGameWithSources(exe.c_str(), FakeSources());
|
||||
CHECK(v.reason == Reason::kAntiCheatDirectory);
|
||||
CHECK(g.lastScannedDir == LR"(D:\SteamLibrary\steamapps\common\Lies of P)");
|
||||
CHECK(g.lastStoreRoot == LR"(D:\SteamLibrary\steamapps\common\Lies of P)");
|
||||
CHECK(g.lastScannedDir == root);
|
||||
CHECK(g.scannedDirs.size() == 1);
|
||||
CHECK(g.lastStoreRoot == root);
|
||||
|
||||
// A clean root: the executable's own folder is walked next (2026-10-13), and both are clean.
|
||||
ResetFake();
|
||||
g.dirEntries = {{"LOP-Win64-Shipping.exe", false}};
|
||||
CHECK(StaticPreScanGameWithSources(exe.c_str(), FakeSources()).Allowed());
|
||||
REQUIRE(g.scannedDirs.size() == 2);
|
||||
CHECK(g.scannedDirs[0] == root);
|
||||
CHECK(g.scannedDirs[1] == root + LR"(\LiesofP\Binaries\Win64)");
|
||||
}
|
||||
|
||||
TEST_CASE("an anti-cheat folder beside a nested executable refuses -- Wuthering Waves", "[guard][prescan]") {
|
||||
// MEASURED 2026-10-13 (spike-notes §19). Wuthering Waves keeps Tencent's ACE in `Client\Binaries\Win64\
|
||||
// AntiCheatExpert\`, beside `Client-Win64-Shipping.exe` and four levels under its install root. The root's walk named
|
||||
// `Win64` and never opened it (kMaxPreScanDepth), so the library pre-scan read the game clean three times, and a
|
||||
// session was hooked for 37 s before the 30 s re-scan met ACE's driver — a machine-wide finding, which turned
|
||||
// nothing off. The root's listing here is what the real walk returns to that depth.
|
||||
const std::wstring root = LR"(D:\SteamLibrary\steamapps\common\Wuthering Waves)";
|
||||
const std::wstring exeDir = root + LR"(\Client\Binaries\Win64)";
|
||||
const std::wstring exe = exeDir + LR"(\Client-Win64-Shipping.exe)";
|
||||
|
||||
ResetFake();
|
||||
g.listingAt[root].entries = {
|
||||
{"Client", true}, {"Binaries", true}, {"Win64", true}, {"Engine", true}, {"Wuthering Waves.exe", false}};
|
||||
g.listingAt[exeDir].entries = {
|
||||
{"AntiCheatExpert", true}, {"ACE-BASE.sys", false}, {"Client-Win64-Shipping.exe", false}};
|
||||
|
||||
const Verdict advisory = StaticPreScanGameWithSources(exe.c_str(), FakeSources());
|
||||
REQUIRE_FALSE(advisory.Allowed());
|
||||
CHECK(advisory.reason == Reason::kAntiCheatDirectory);
|
||||
CHECK(std::strcmp(advisory.family, "Anti-Cheat Expert") == 0);
|
||||
CHECK(std::strcmp(advisory.signal, "AntiCheatExpert") == 0);
|
||||
REQUIRE(g.scannedDirs.size() == 2);
|
||||
CHECK(g.scannedDirs[1] == exeDir);
|
||||
|
||||
// The chokepoint, from the pid: the seam names the executable's folder, the store half asks the root resolved from
|
||||
// it, and check 4 walks both.
|
||||
g.scannedDirs.clear();
|
||||
g.imageDirectory = exeDir;
|
||||
const Verdict chokepoint = EvaluateWithSources(1234, FakeSources());
|
||||
REQUIRE_FALSE(chokepoint.Allowed());
|
||||
CHECK(chokepoint.reason == Reason::kAntiCheatDirectory);
|
||||
CHECK(std::strcmp(chokepoint.family, "Anti-Cheat Expert") == 0);
|
||||
CHECK(g.lastStoreRoot == root);
|
||||
REQUIRE(g.scannedDirs.size() == 2);
|
||||
CHECK(g.scannedDirs[0] == root);
|
||||
CHECK(g.scannedDirs[1] == exeDir);
|
||||
}
|
||||
|
||||
TEST_CASE("an executable at its install root is walked once", "[guard][prescan]") {
|
||||
ResetFake();
|
||||
g.dirEntries = {{"game.exe", false}};
|
||||
CHECK(StaticPreScanGameWithSources(LR"(D:\SteamLibrary\steamapps\common\Some Title\game.exe)", FakeSources())
|
||||
.Allowed());
|
||||
REQUIRE(g.scannedDirs.size() == 1);
|
||||
CHECK(g.scannedDirs[0] == LR"(D:\SteamLibrary\steamapps\common\Some Title)");
|
||||
|
||||
// So is one no store boundary names — its folder is its root — from the pid as from the path.
|
||||
ResetFake();
|
||||
g.dirEntries = {{"game.exe", false}};
|
||||
CHECK(EvaluateWithSources(1234, FakeSources()).Allowed());
|
||||
REQUIRE(g.scannedDirs.size() == 1);
|
||||
CHECK(g.scannedDirs[0] == L"C:\\Games\\Example");
|
||||
}
|
||||
|
||||
TEST_CASE("a walk of the executable's folder that could not finish refuses after a clean root",
|
||||
"[guard][prescan][failclosed]") {
|
||||
const std::wstring root = LR"(D:\SteamLibrary\steamapps\common\Nested)";
|
||||
const std::wstring exeDir = root + LR"(\Game\Binaries\Win64)";
|
||||
ResetFake();
|
||||
g.listingAt[root].entries = {{"Game", true}};
|
||||
g.listingAt[exeDir].entries = {{"Game-Win64-Shipping.exe", false}};
|
||||
g.listingAt[exeDir].result = Collected::kIncomplete;
|
||||
const Verdict v = StaticPreScanGameWithSources((exeDir + LR"(\Game-Win64-Shipping.exe)").c_str(), FakeSources());
|
||||
REQUIRE_FALSE(v.Allowed());
|
||||
CHECK(v.reason == Reason::kPreScanFailed);
|
||||
}
|
||||
|
||||
TEST_CASE("the advisory pre-scan runs check 3 on the executable's own name", "[guard][prescan][check3]") {
|
||||
@@ -4172,6 +4264,67 @@ TEST_CASE("the real seam reads a GOG product id, and a plain folder carries none
|
||||
RemoveDirectoryW(root.c_str());
|
||||
}
|
||||
|
||||
TEST_CASE("the real walk reaches an anti-cheat folder beside a nested executable", "[guard][prescan][real]") {
|
||||
// Wuthering Waves' layout, on disk (2026-10-13). From the root the real walk names `Win64` and never opens it — the
|
||||
// reach this test pins — and check 4's second walk, from the executable's own folder, finds `AntiCheatExpert\`.
|
||||
const std::wstring lib = MakeTempTree(L"nested");
|
||||
const std::wstring steamapps = lib + L"\\steamapps";
|
||||
const std::wstring root = steamapps + L"\\common\\Game";
|
||||
const std::wstring exeDir = root + L"\\Client\\Binaries\\Win64";
|
||||
const std::wstring ac = exeDir + L"\\AntiCheatExpert";
|
||||
for (const std::wstring& d : {lib, steamapps, steamapps + L"\\common", root, root + L"\\Client",
|
||||
root + L"\\Client\\Binaries", exeDir, ac}) {
|
||||
CreateDirectoryW(d.c_str(), nullptr);
|
||||
}
|
||||
const std::wstring exe = exeDir + L"\\Game-Win64-Shipping.exe";
|
||||
WriteText(exe, "MZ");
|
||||
WriteText(ac + L"\\ACE-Base64.dll", "MZ");
|
||||
|
||||
Sources s = SystemSources();
|
||||
REQUIRE(s.EnumerateDirEntries != nullptr);
|
||||
|
||||
std::vector<std::string> fromRoot;
|
||||
const DirEntrySink collect = [](void* ctx, const char* name, bool) {
|
||||
static_cast<std::vector<std::string>*>(ctx)->push_back(name);
|
||||
return true;
|
||||
};
|
||||
REQUIRE(s.EnumerateDirEntries(root.c_str(), collect, &fromRoot) == Collected::kOk);
|
||||
CHECK(std::find(fromRoot.begin(), fromRoot.end(), "Win64") != fromRoot.end());
|
||||
CHECK(std::find(fromRoot.begin(), fromRoot.end(), "AntiCheatExpert") == fromRoot.end());
|
||||
|
||||
// The pre-scan over the real walk and the real store seam (no manifest names this install), with the fixture's
|
||||
// rules: the floor carries ACE's folder whatever the file says.
|
||||
ResetFake();
|
||||
s.ReadRulesFile = &FakeReadRules;
|
||||
const Verdict v = StaticPreScanGameWithSources(exe.c_str(), s);
|
||||
REQUIRE_FALSE(v.Allowed());
|
||||
CHECK(v.reason == Reason::kAntiCheatDirectory);
|
||||
CHECK(std::strcmp(v.family, "Anti-Cheat Expert") == 0);
|
||||
|
||||
// The folder gone, the same tree is clean: the second walk refuses nothing it should not.
|
||||
DeleteFileW((ac + L"\\ACE-Base64.dll").c_str());
|
||||
RemoveDirectoryW(ac.c_str());
|
||||
CHECK(StaticPreScanGameWithSources(exe.c_str(), s).Allowed());
|
||||
|
||||
DeleteFileW(exe.c_str());
|
||||
for (const std::wstring& d :
|
||||
{exeDir, root + L"\\Client\\Binaries", root + L"\\Client", root, steamapps + L"\\common", steamapps, lib}) {
|
||||
RemoveDirectoryW(d.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("the real ImageDirectory names the executable's own folder", "[guard][prescan][real]") {
|
||||
// Not the install root (2026-10-13): the checks resolve that themselves, and check 4 walks both.
|
||||
wchar_t self[MAX_PATH] = {};
|
||||
REQUIRE(GetModuleFileNameW(nullptr, self, MAX_PATH) != 0);
|
||||
std::wstring folder(self);
|
||||
folder.resize(folder.find_last_of(L"\\/"));
|
||||
|
||||
wchar_t out[kMaxPreScanPathLen] = {};
|
||||
REQUIRE(SystemSources().ImageDirectory(GetCurrentProcessId(), out, kMaxPreScanPathLen) == Collected::kOk);
|
||||
CHECK(_wcsicmp(out, folder.c_str()) == 0);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// Check 2b against the REAL service control manager.
|
||||
//
|
||||
@@ -5887,6 +6040,26 @@ TEST_CASE("D33 -- the advisory pre-scan answers the same question the chokepoint
|
||||
CHECK(std::string(aniimo.family) == kKernelDriverInTreeFamily);
|
||||
}
|
||||
|
||||
TEST_CASE("D33 -- the executable's folder is walked under the same exception", "[guard][D33][prescan]") {
|
||||
// 2026-10-13: check 4's second walk takes the tolerance and the finding record exactly as the first does — the
|
||||
// family's file beside a nested executable is recorded, and a kernel driver there still refuses.
|
||||
const std::wstring root = LR"(D:\SteamLibrary\steamapps\common\Nested Yidun)";
|
||||
const std::wstring exeDir = root + LR"(\Game\Binaries\Win64)";
|
||||
const std::wstring exe = exeDir + LR"(\Game-Win64-Shipping.exe)";
|
||||
ResetFake();
|
||||
g.listingAt[root].entries = {{"Game", true}};
|
||||
g.listingAt[exeDir].entries = {{"Game-Win64-Shipping.exe", false}, {"NEP2.dll", false}};
|
||||
|
||||
const Verdict v = StaticPreScanGameWithSources(exe.c_str(), FakeSources(), kYidun);
|
||||
CHECK(v.reason == Reason::kAllowedUserModeException);
|
||||
CHECK(std::string(v.signal) == "NEP2.dll");
|
||||
|
||||
g.listingAt[exeDir].entries.push_back({"NEPKernel.sys", false});
|
||||
const Verdict driver = StaticPreScanGameWithSources(exe.c_str(), FakeSources(), kYidun);
|
||||
CHECK(driver.reason == Reason::kAntiCheatFile);
|
||||
CHECK(std::string(driver.family) == kKernelDriverInTreeFamily);
|
||||
}
|
||||
|
||||
TEST_CASE("D33 -- the excepted family's module loading late does not stop the Overlay; any other family still does",
|
||||
"[guard][inject][shm][loader][D33]") {
|
||||
// The Overlay's half. A decoy named `NEP2.dll` (NetEase Yidun's module, an exact floor match) loads 2.5 s after
|
||||
|
||||
@@ -36,6 +36,9 @@ public sealed class DiagReportTests
|
||||
}
|
||||
|
||||
report.Should().Contain(" capture.min_session_s = 30", "a key with no row reports its default");
|
||||
report.Should().Contain("render_tier: n/a", "no tier given");
|
||||
DiagReport.Build("1.2.3", @"C:\data", @"C:\data\logs", 2, values, agentBesideApp: true, now, renderTier: 0)
|
||||
.Should().Contain("render_tier: 0", "beta.21: software rendering, where every scroll is drawn on the CPU, is named");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -190,6 +190,7 @@ public sealed class FormatsTests
|
||||
Formats.EngineWithVersion("rpgmaker_rgss", "3.0.1", EngineVersionSource.Rgss3Library).Should().Be("RPG Maker VX Ace (RGSS 3.0.1)");
|
||||
Formats.EngineWithVersion("unity", "2022.3.39f1", EngineVersionSource.UnityPlayer).Should().Be("Unity 2022.3.39f1");
|
||||
Formats.EngineWithVersion("godot", "4.4.1", EngineVersionSource.GodotPack).Should().Be("Godot 4.4.1");
|
||||
Formats.EngineWithVersion("renpy", "8.5.0", EngineVersionSource.RenPyVcVersion).Should().Be("Ren'Py 8.5.0");
|
||||
Formats.EngineWithVersion("unreal", "5.4.4", EngineVersionSource.UnrealFileVersion).Should().Be("Unreal Engine 5.4.4");
|
||||
Formats.EngineWithVersion("unity", "6000.0", null).Should().Be("Unity 6000.0", "a version the user typed has no witness");
|
||||
Formats.EngineWithVersion("godot", null, null).Should().Be("Godot");
|
||||
|
||||
@@ -238,6 +238,35 @@ public sealed class GameDetailViewModelTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.21: a game the sweep has read and found none of the capability files in says so — the card read "not scanned yet"
|
||||
/// for every such game, as HELLO, HELLO WORLD!'s page did beside a Details card that had been read.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task TheSupportsCardSaysNotScannedOnlyUntilTheSweepHasReadTheExecutable()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
GameRow game = await s.GameAsync("Plain");
|
||||
|
||||
(GameDetailViewModel unread, _, _, _, _) = await BuildAsync(s, game.Id);
|
||||
unread.SupportsEmpty.Should().BeTrue();
|
||||
unread.SupportsEmptyText.Should().Be(Strings.GameDetail_Supports_Empty, "the sweep has not read this game yet");
|
||||
|
||||
(await s.Games.ApplyDetectionAsync(game.Id, new DetectionWrite
|
||||
{
|
||||
EngineId = "rpgmaker_mv",
|
||||
CapabilityIds = [],
|
||||
RulesVersion = "2026.10.4",
|
||||
ExeSizeBytes = 1,
|
||||
ExeMtimeMs = 1,
|
||||
ExeArchitecture = ExecutableArchitecture.X64,
|
||||
}, Ct)).Should().BeTrue();
|
||||
|
||||
(GameDetailViewModel read, _, _, _, _) = await BuildAsync(s, game.Id);
|
||||
read.SupportsEmpty.Should().BeTrue("the game ships none of the files the rules name");
|
||||
read.SupportsEmptyText.Should().Be(Strings.GameDetail_Supports_None);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task TheHeaderTheTwoRowsAndTheSessionsTabReadFromTheLedger()
|
||||
{
|
||||
@@ -630,7 +659,7 @@ public sealed class GameDetailViewModelTests
|
||||
|
||||
/// <summary>
|
||||
/// beta.19: a Unity, Godot or RPG Maker version says what it was read from, RPG Maker's witness names the maker in the
|
||||
/// header, and such a title whose files named no version says so once the sweep has read it.
|
||||
/// header, and such a title whose files named no version says so once the sweep has read it — Ren'Py's too since beta.20.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task TheDetailsCardSaysWhatAUnityGodotOrRpgMakerVersionWasReadFrom()
|
||||
@@ -650,6 +679,8 @@ public sealed class GameDetailViewModelTests
|
||||
("xiandie", "godot", "4.4.1", EngineVersionSource.GodotPack, "Godot 4.4.1", Strings.GameDetail_EngineVersion_GodotPack),
|
||||
("GF2", "unity", "2019.4.40", EngineVersionSource.UnityPlayerFile, "Unity 2019.4.40", Strings.GameDetail_EngineVersion_UnityPlayerFile),
|
||||
("Unread", "unity", null, null, "Unity", Strings.GameDetail_EngineVersion_NotFoundInFiles),
|
||||
("Bound Between Desks", "renpy", "8.5.0", EngineVersionSource.RenPyVcVersion, "Ren'Py 8.5.0", "From the version file of the game's Ren'Py engine (renpy/vc_version.py)."),
|
||||
("Older Novel", "renpy", null, null, "Ren'Py", Strings.GameDetail_EngineVersion_NotFoundInFiles),
|
||||
];
|
||||
foreach ((string name, string engine, string? version, string? source, string subtitle, string witness) in cases)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.IO;
|
||||
using FluentAssertions;
|
||||
using FrameLedger.App.Services;
|
||||
using FrameLedger.Application.Import;
|
||||
using FrameLedger.Application.Persistence;
|
||||
using FrameLedger.Application.Play;
|
||||
using FrameLedger.Application.Settings;
|
||||
using FrameLedger.Domain.Consent;
|
||||
using FrameLedger.Infrastructure.Ipc;
|
||||
using FrameLedger.Infrastructure.Persistence;
|
||||
using FrameLedger.Shared.Ipc;
|
||||
using Xunit;
|
||||
|
||||
namespace FrameLedger.App.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// beta.21 (owner decision D59): Play hands a game to the app of the store whose own records name its folder, or has the
|
||||
/// capture agent start it — directly when asked, and when no store installed it, GOG GALAXY is missing or the App runs as
|
||||
/// administrator — and says which happened.
|
||||
/// </summary>
|
||||
[Collection(StringsCultureCollection.Name)]
|
||||
public sealed class GamePlayerTests
|
||||
{
|
||||
private const string _steam = @"D:\SteamLibrary\steamapps\common\Wuthering Waves";
|
||||
|
||||
private static CancellationToken Ct => TestContext.Current.CancellationToken;
|
||||
|
||||
private sealed class Stores(params StoreGame[] games) : IStoreLibrarySource
|
||||
{
|
||||
public string Platform => "test";
|
||||
|
||||
public ValueTask<IReadOnlyList<StoreGame>> ListAsync(CancellationToken ct = default) => ValueTask.FromResult<IReadOnlyList<StoreGame>>(games);
|
||||
}
|
||||
|
||||
private sealed class BrokenStore : IStoreLibrarySource
|
||||
{
|
||||
public string Platform => "broken";
|
||||
|
||||
public ValueTask<IReadOnlyList<StoreGame>> ListAsync(CancellationToken ct = default) => throw new IOException("unreadable");
|
||||
}
|
||||
|
||||
private sealed class Galaxy(string? path) : IGogGalaxyLocator
|
||||
{
|
||||
public string? ClientPath() => path;
|
||||
}
|
||||
|
||||
private sealed class Shell(bool takes = true) : IShellStarter
|
||||
{
|
||||
public List<string> Opened { get; } = [];
|
||||
|
||||
public List<(string Path, string Arguments, string? Folder)> Started { get; } = [];
|
||||
|
||||
public bool OpenLink(string link)
|
||||
{
|
||||
Opened.Add(link);
|
||||
return takes;
|
||||
}
|
||||
|
||||
public bool StartProgram(string path, string arguments, string? workingDirectory)
|
||||
{
|
||||
Started.Add((path, arguments, workingDirectory));
|
||||
return takes;
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class Agent(bool connected = true, string outcome = "Accepted", Exception? fails = null) : IAgentRequests
|
||||
{
|
||||
public HelloAck? Hello => null;
|
||||
|
||||
public bool IsConnected => connected;
|
||||
|
||||
public List<LaunchGameRequest> Sent { get; } = [];
|
||||
|
||||
public Task<IpcEnvelope> RequestAsync<TRequest>(string type, TRequest payload, CancellationToken ct = default)
|
||||
where TRequest : class
|
||||
{
|
||||
type.Should().Be(IpcMessageType.LaunchGame);
|
||||
var request = (LaunchGameRequest)(object)payload;
|
||||
Sent.Add(request);
|
||||
if (fails is not null)
|
||||
{
|
||||
return Task.FromException<IpcEnvelope>(fails);
|
||||
}
|
||||
|
||||
bool accepted = string.Equals(outcome, "Accepted", StringComparison.Ordinal);
|
||||
return Task.FromResult(IpcCodec.Decode(IpcCodec.Encode(IpcMessageType.LaunchAck, "1",
|
||||
new LaunchAck(request.GameId, accepted, outcome, accepted ? Guid.NewGuid() : null))));
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ThroughTheStoreSteamGetsItsOwnLink()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
var shell = new Shell();
|
||||
var agent = new Agent();
|
||||
GamePlayer player = Player(s, shell, agent, new Stores(new StoreGame("steam", "3513350", "Wuthering Waves", _steam, null, null)));
|
||||
|
||||
PlayResult result = await player.PlayAsync(Game(_steam + @"\Client\Binaries\Win64\Client-Win64-Shipping.exe", "3513350"), Ct);
|
||||
|
||||
result.Should().Be(new PlayResult(PlayOutcome.HandedToStore, "steam"));
|
||||
shell.Opened.Should().Equal("steam://rungameid/3513350");
|
||||
agent.Sent.Should().BeEmpty("the store's app starts the game; the watcher records it as any start");
|
||||
GamePlayer.Describe(result, "Wuthering Waves").Text.Should().Contain("Steam").And.Contain("Wuthering Waves");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GogRunsGalaxyAndWithoutGalaxyTheAgentStartsTheGame()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
var record = new StoreGame("gog", "1125815775", "A Space for the Unbound", @"D:\another\gog\A Space for the Unbound - Prologue", null, null);
|
||||
GameRow game = Game(@"D:\another\gog\A Space for the Unbound - Prologue\A Space for the Unbound.exe", "1125815775");
|
||||
|
||||
var shell = new Shell();
|
||||
PlayResult handed = await Player(s, shell, new Agent(), new Stores(record), galaxy: @"C:\Program Files\GOG Galaxy\GalaxyClient.exe").PlayAsync(game, Ct);
|
||||
handed.Outcome.Should().Be(PlayOutcome.HandedToStore);
|
||||
shell.Started.Should().ContainSingle().Which.Arguments.Should().Contain("/command=runGame /gameId=1125815775");
|
||||
|
||||
var agent = new Agent();
|
||||
PlayResult direct = await Player(s, new Shell(), agent, new Stores(record), galaxy: null).PlayAsync(game, Ct);
|
||||
direct.Should().Be(new PlayResult(PlayOutcome.StartedByAgent, Fallback: PlayFallback.NoGalaxy));
|
||||
agent.Sent.Should().ContainSingle().Which.GameId.Should().Be(game.Id);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AGameNoStoreInstalledIsStartedDirectlyAndSaysWhy()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
var agent = new Agent();
|
||||
var shell = new Shell();
|
||||
|
||||
PlayResult result = await Player(s, shell, agent, new BrokenStore(), new Stores()).PlayAsync(Game(@"D:\Games\Loose\game.exe", null), Ct);
|
||||
|
||||
result.Should().Be(new PlayResult(PlayOutcome.StartedByAgent, Fallback: PlayFallback.NoStore), "a store whose records cannot be read costs its own records only");
|
||||
shell.Opened.Should().BeEmpty();
|
||||
agent.Sent.Should().ContainSingle();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AnElevatedAppNeverStartsAStoresAppAndHasTheAgentStartTheGame()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
var shell = new Shell();
|
||||
var agent = new Agent();
|
||||
GamePlayer player = Player(s, shell, agent, new Stores(new StoreGame("steam", "3513350", "W", _steam, null, null)), elevated: true);
|
||||
|
||||
PlayResult result = await player.PlayAsync(Game(_steam + @"\game.exe", "3513350"), Ct);
|
||||
|
||||
result.Fallback.Should().Be(PlayFallback.Elevated);
|
||||
result.Outcome.Should().Be(PlayOutcome.StartedByAgent);
|
||||
shell.Opened.Should().BeEmpty("a store's app started from an administrator would start the game as administrator too");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task DirectAsksTheAgentAndSaysEachOfItsAnswers()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
await new RegisteredSettings(new SqliteSettingsStore(s.Db)).SetAsync(SettingsRegistry.UiPlayMode, PlayMode.Direct, Ct);
|
||||
var steam = new Stores(new StoreGame("steam", "3513350", "W", _steam, null, null));
|
||||
GameRow game = Game(_steam + @"\game.exe", "3513350");
|
||||
|
||||
var shell = new Shell();
|
||||
var agent = new Agent();
|
||||
(await Player(s, shell, agent, steam).PlayAsync(game, Ct)).Should().Be(new PlayResult(PlayOutcome.StartedByAgent));
|
||||
shell.Opened.Should().BeEmpty("direct never asks the store, even for a store's game");
|
||||
|
||||
(await Player(s, new Shell(), new Agent(connected: false), steam).PlayAsync(game, Ct)).Outcome.Should().Be(PlayOutcome.AgentUnavailable);
|
||||
(await Player(s, new Shell(), new Agent(outcome: "RecordingOff"), steam).PlayAsync(game, Ct)).Outcome.Should().Be(PlayOutcome.RecordingOff);
|
||||
(await Player(s, new Shell(), new Agent(outcome: "SessionRunning"), steam).PlayAsync(game, Ct)).Outcome.Should().Be(PlayOutcome.AlreadyRunning);
|
||||
PlayResult failed = await Player(s, new Shell(), new Agent(outcome: "Unavailable"), steam).PlayAsync(game, Ct);
|
||||
failed.Should().Be(new PlayResult(PlayOutcome.Failed, Detail: "Unavailable"));
|
||||
|
||||
(await Player(s, shell, agent, steam).IsDirectAsync(Ct)).Should().BeTrue();
|
||||
GamePlayer.Describe(failed, "W").Warning.Should().BeTrue();
|
||||
GamePlayer.Describe(new PlayResult(PlayOutcome.RecordingOff), "W").Text.Should().Contain("Settings");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// From the review before the merge: the pipe fails a request in flight with an IOException when the agent stops (PipeClient),
|
||||
/// and a command's unhandled exception is the App's crash dialog. Each way the connection can go mid-request is "not running".
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task AConnectionThatGoesMidRequestIsTheAgentNotRunningNeverAnException()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
await new RegisteredSettings(new SqliteSettingsStore(s.Db)).SetAsync(SettingsRegistry.UiPlayMode, PlayMode.Direct, Ct);
|
||||
GameRow game = Game(@"D:\Games\Loose\game.exe", null);
|
||||
Exception[] gone =
|
||||
[
|
||||
new IOException("the pipe closed before the Agent answered"), new ObjectDisposedException("pipe"), new TimeoutException(),
|
||||
new InvalidOperationException("the Agent is not connected"), new IpcFramingException("truncated frame"),
|
||||
];
|
||||
foreach (Exception ex in gone)
|
||||
{
|
||||
PlayResult result = await Player(s, new Shell(), new Agent(fails: ex), new Stores()).PlayAsync(game, Ct);
|
||||
result.Should().Be(new PlayResult(PlayOutcome.AgentUnavailable), ex.GetType().Name);
|
||||
}
|
||||
|
||||
PlayResult refused = await Player(s, new Shell(), new Agent(fails: new IpcRequestException("UnknownType", "no such command")), new Stores())
|
||||
.PlayAsync(game, Ct);
|
||||
refused.Should().Be(new PlayResult(PlayOutcome.Failed, Detail: "UnknownType"));
|
||||
}
|
||||
|
||||
/// <summary>From the review before the merge: each notice is true on the path it is said on.</summary>
|
||||
[Fact]
|
||||
public async Task EachNoticeIsTrueOnThePathItIsSaidOn()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
|
||||
// A Steam record whose id is not a Steam id builds no link — and is not "GOG GALAXY is not installed".
|
||||
var odd = new Stores(new StoreGame("steam", "not-an-app-id", "W", _steam, null, null));
|
||||
PlayResult noLink = await Player(s, new Shell(), new Agent(), odd).PlayAsync(Game(_steam + @"\game.exe", null), Ct);
|
||||
noLink.Should().Be(new PlayResult(PlayOutcome.StartedByAgent, Fallback: PlayFallback.NoLink));
|
||||
GamePlayer.Describe(noLink, "W").Text.Should().NotContain("GOG").And.NotContain("store");
|
||||
|
||||
// The store mode fell back and recording is off: switching Play to the store is no advice.
|
||||
PlayResult storeModeOff = await Player(s, new Shell(), new Agent(outcome: "RecordingOff"), new Stores())
|
||||
.PlayAsync(Game(@"D:\Games\Loose\game.exe", null), Ct);
|
||||
storeModeOff.Should().Be(new PlayResult(PlayOutcome.RecordingOff, Fallback: PlayFallback.NoStore));
|
||||
GamePlayer.Describe(storeModeOff, "W").Text.Should().NotContain("Settings");
|
||||
|
||||
// The agent's UnknownGame is said in words, never as the token.
|
||||
PlayResult gone = await Player(s, new Shell(), new Agent(outcome: "UnknownGame"), new Stores())
|
||||
.PlayAsync(Game(@"D:\Games\Loose\game.exe", null), Ct);
|
||||
gone.Outcome.Should().Be(PlayOutcome.NotInLibrary);
|
||||
GamePlayer.Describe(gone, "W").Text.Should().NotContain("UnknownGame").And.Contain("W");
|
||||
GamePlayer.Describe(new PlayResult(PlayOutcome.AgentUnavailable, Fallback: PlayFallback.NoStore), "W").Text.Should().NotContain("its store");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AStoreAppWindowsWillNotOpenIsAFailureNamedAsSuch()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
PlayResult result = await Player(s, new Shell(takes: false), new Agent(), new Stores(new StoreGame("itch", "5015466", "H", @"D:\another\it\h", null, null)))
|
||||
.PlayAsync(Game(@"D:\another\it\h\H\h.exe", "5015466"), Ct);
|
||||
|
||||
result.Should().Be(new PlayResult(PlayOutcome.Failed, "itch"));
|
||||
GamePlayer.Describe(result, "H").Warning.Should().BeTrue();
|
||||
GamePlayer.Describe(result, "H").Text.Should().Contain("H").And.NotContain("{0}");
|
||||
}
|
||||
|
||||
private static GamePlayer Player(ScratchLedger s, Shell shell, Agent agent, IStoreLibrarySource store, string? galaxy = null, bool elevated = false) =>
|
||||
Player(s, shell, agent, galaxy, elevated, store);
|
||||
|
||||
private static GamePlayer Player(ScratchLedger s, Shell shell, Agent agent, IStoreLibrarySource first, IStoreLibrarySource second) =>
|
||||
Player(s, shell, agent, null, false, first, second);
|
||||
|
||||
private static GamePlayer Player(ScratchLedger s, Shell shell, Agent agent, string? galaxy, bool elevated, params IStoreLibrarySource[] stores) =>
|
||||
new(new RegisteredSettings(new SqliteSettingsStore(s.Db)), stores, new Galaxy(galaxy), shell, agent, () => elevated);
|
||||
|
||||
private static GameRow Game(string exe, string? storeId) => new()
|
||||
{
|
||||
Id = 7,
|
||||
Name = "Game",
|
||||
Fingerprint = new ExecutableFingerprint { ExePath = exe, SizeBytes = 1, MtimeUnixMs = 1 },
|
||||
HookEnabled = false,
|
||||
HookCrashCount = 0,
|
||||
AddedAt = DateTimeOffset.UnixEpoch,
|
||||
UpdatedAt = DateTimeOffset.UnixEpoch,
|
||||
StoreId = storeId,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using FluentAssertions;
|
||||
using FrameLedger.App.Controls;
|
||||
using Xunit;
|
||||
|
||||
namespace FrameLedger.App.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// beta.21 (owner request 2026-10-13: "scrolling the documents in the app is slow"): the wheel moves a document by Windows'
|
||||
/// lines at a browser's line instead of WPF's fixed 48 DIP, in proportion to the delta, and leaves its ends to the host; a
|
||||
/// page is rendered once, and a page shown before is not rendered again.
|
||||
/// </summary>
|
||||
public sealed class MarkdownViewTests
|
||||
{
|
||||
private static readonly string _longText = string.Join("\n\n", Enumerable.Range(1, 400).Select(static i => "Paragraph " + i + ": a few words that wrap."));
|
||||
|
||||
[Fact]
|
||||
public void TheWheelStepFollowsTheDeltaWindowsLinesAndTheZoom()
|
||||
{
|
||||
MarkdownView.WheelStep(-120, 3, 600, 100).Should().BeApproximately(100, 1e-9, "three lines at a browser's line, downwards");
|
||||
MarkdownView.WheelStep(120, 3, 600, 100).Should().BeApproximately(-100, 1e-9);
|
||||
MarkdownView.WheelStep(-15, 3, 600, 100).Should().BeApproximately(12.5, 1e-9, "a touchpad's small delta moves in proportion");
|
||||
MarkdownView.WheelStep(-120, 3, 600, 200).Should().BeApproximately(200, 1e-9, "zoomed in, a line is taller");
|
||||
MarkdownView.WheelStep(-120, -1, 600, 100).Should().BeApproximately(600, 1e-9, "Windows' \"one screen at a time\"");
|
||||
MarkdownView.WheelStep(-120, 0, 600, 100).Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task TheWheelMovesTheDocumentByItsStepAndLeavesItsEndsToTheHost()
|
||||
{
|
||||
(double notch, double touch, bool atEnd, bool withCtrl) = await PagesLoadTests.OnStaAsync(static () =>
|
||||
{
|
||||
var view = new MarkdownView { EaseWheel = false, WheelScrollLines = static () => 3, CurrentModifiers = static () => ModifierKeys.None };
|
||||
view.Show(_longText, isPlainText: false, path: "LIMITATIONS.md");
|
||||
Layout(view);
|
||||
ScrollViewer scroller = view.Scroller ?? throw new InvalidOperationException("the template has no PART_ContentHost");
|
||||
scroller.ScrollableHeight.Should().BeGreaterThan(1000, "the document is longer than its view");
|
||||
|
||||
Wheel(view, -120).Should().BeTrue();
|
||||
Layout(view);
|
||||
double afterNotch = scroller.VerticalOffset;
|
||||
|
||||
Wheel(view, -15).Should().BeTrue();
|
||||
Layout(view);
|
||||
double afterTouch = scroller.VerticalOffset;
|
||||
|
||||
scroller.ScrollToVerticalOffset(scroller.ScrollableHeight);
|
||||
Layout(view);
|
||||
bool handledAtEnd = Wheel(view, -120);
|
||||
|
||||
scroller.ScrollToVerticalOffset(0);
|
||||
Layout(view);
|
||||
view.CurrentModifiers = static () => ModifierKeys.Control;
|
||||
bool handledWithCtrl = Wheel(view, -120);
|
||||
return (afterNotch, afterTouch, handledAtEnd, handledWithCtrl);
|
||||
});
|
||||
|
||||
notch.Should().BeApproximately(100, 0.5, "one notch is three lines of 100/3 DIP, not WPF's fixed 48");
|
||||
touch.Should().BeApproximately(112.5, 0.5, "a delta of 15 is an eighth of a notch");
|
||||
atEnd.Should().BeFalse("at the end the wheel is the host's — the update notes' dialog scrolls instead");
|
||||
withCtrl.Should().BeFalse("Ctrl+wheel is the zoom's, never the scroll's");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task EasingAddsEveryNotchToTheTargetAndANewPageStopsIt()
|
||||
{
|
||||
(double first, double second, double afterShow) = await PagesLoadTests.OnStaAsync(static () =>
|
||||
{
|
||||
var view = new MarkdownView { EaseWheel = true, WheelScrollLines = static () => 3, CurrentModifiers = static () => ModifierKeys.None };
|
||||
view.Show(_longText, isPlainText: false, path: "LIMITATIONS.md");
|
||||
Layout(view);
|
||||
Wheel(view, -120).Should().BeTrue();
|
||||
double target1 = view.ScrollTarget;
|
||||
Wheel(view, -120).Should().BeTrue();
|
||||
double target2 = view.ScrollTarget;
|
||||
view.Show("# Another page", isPlainText: false, path: "guide/README.md");
|
||||
return (target1, target2, view.ScrollTarget);
|
||||
});
|
||||
|
||||
first.Should().BeApproximately(100, 0.5);
|
||||
second.Should().BeApproximately(200, 0.5, "a notch turned while easing adds to where the view is going, not to where it is");
|
||||
double.IsNaN(afterShow).Should().BeTrue("a new page ends the easing");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task APageIsRenderedOnceAndAPageShownBeforeIsNotRenderedAgain()
|
||||
{
|
||||
(int one, int two, int back, int evicted) = await PagesLoadTests.OnStaAsync(static () =>
|
||||
{
|
||||
var view = new MarkdownView();
|
||||
int start = view.Renders; // the constructor's empty document
|
||||
view.Show("# One\n\ntext", isPlainText: false, path: "guide/a.md");
|
||||
int afterOne = view.Renders - start;
|
||||
view.Show("# Two\n\ntext", isPlainText: false, path: "guide/b.md");
|
||||
int afterTwo = view.Renders - start;
|
||||
view.Show("# One\n\ntext", isPlainText: false, path: "guide/a.md");
|
||||
int afterBack = view.Renders - start;
|
||||
|
||||
for (int i = 0; i < MarkdownView.CacheCapacity; i++)
|
||||
{
|
||||
view.Show("# Page " + i, isPlainText: false, path: "guide/p" + i + ".md");
|
||||
}
|
||||
|
||||
int beforeEvicted = view.Renders;
|
||||
view.Show("# Two\n\ntext", isPlainText: false, path: "guide/b.md");
|
||||
return (afterOne, afterTwo, afterBack, view.Renders - beforeEvicted);
|
||||
});
|
||||
|
||||
one.Should().Be(1, "Show sets the three properties and renders once");
|
||||
two.Should().Be(2);
|
||||
back.Should().Be(2, "a page this view has rendered is kept");
|
||||
evicted.Should().Be(1, "past the cache's capacity the oldest page is rendered again");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task PropertiesSetOneByOneAreRenderedOnceAheadOfLayout()
|
||||
{
|
||||
(int beforePump, int afterPump, bool hasAnchor) = await PagesLoadTests.OnStaAsync(static () =>
|
||||
{
|
||||
var view = new MarkdownView();
|
||||
int start = view.Renders;
|
||||
view.DocumentPath = "guide/a.md";
|
||||
view.IsPlainText = false;
|
||||
view.MarkdownText = "# Heading\n\ntext";
|
||||
int before = view.Renders - start;
|
||||
Visuals.Pump();
|
||||
int after = view.Renders - start;
|
||||
return (before, after, view.Anchors.Count > 0);
|
||||
});
|
||||
|
||||
beforePump.Should().Be(0, "a binding's change asks for a render; it does not render the half-set page");
|
||||
afterPump.Should().Be(1, "three changes, one render");
|
||||
hasAnchor.Should().BeTrue();
|
||||
}
|
||||
|
||||
private static void Layout(FrameworkElement element)
|
||||
{
|
||||
element.Measure(new Size(700, 600));
|
||||
element.Arrange(new Rect(0, 0, 700, 600));
|
||||
element.UpdateLayout();
|
||||
}
|
||||
|
||||
private static bool Wheel(UIElement over, int delta)
|
||||
{
|
||||
var wheel = new MouseWheelEventArgs(Mouse.PrimaryDevice, Environment.TickCount, delta) { RoutedEvent = UIElement.PreviewMouseWheelEvent };
|
||||
over.RaiseEvent(wheel);
|
||||
return wheel.Handled;
|
||||
}
|
||||
}
|
||||
@@ -80,6 +80,8 @@ public sealed class ViewerModeTests
|
||||
provider.GetRequiredService<IUpdateClient>().IsInstalled.Should().BeFalse("a viewer never looks for, downloads or applies an update");
|
||||
(await provider.GetRequiredService<IAgentTool>().RunAsync("--install-task", TestContext.Current.CancellationToken)).ExitCode.Should().Be(ViewerAgentTool.ExitViewer);
|
||||
provider.GetRequiredService<UiMode>().Should().Be(_viewer);
|
||||
provider.GetRequiredService<IShellStarter>().Should().BeOfType<ViewerShellStarter>("beta.21: Play hands nothing to a store's app");
|
||||
provider.GetRequiredService<IShellStarter>().OpenLink("steam://rungameid/1").Should().BeFalse();
|
||||
provider.GetRequiredService<LiveSessions>().Should().NotBeNull();
|
||||
}
|
||||
|
||||
@@ -96,12 +98,14 @@ public sealed class ViewerModeTests
|
||||
services.Should().Contain(static d => d.ImplementationType == typeof(RunAtLogonRegistry));
|
||||
services.Should().Contain(static d => d.ImplementationType == typeof(AgentTool));
|
||||
services.Should().Contain(static d => d.ImplementationType == typeof(VelopackUpdateClient));
|
||||
services.Should().Contain(static d => d.ImplementationType == typeof(ShellStarter));
|
||||
}
|
||||
|
||||
/// <summary>Every control that asks the Agent or changes this PC binds the viewer's switch, page by page.</summary>
|
||||
[Theory]
|
||||
[InlineData("MainWindow.xaml", "Command", "UpdateRulesCommand")]
|
||||
[InlineData("MainWindow.xaml", "Command", "CheckForUpdatesCommand")]
|
||||
[InlineData("Pages/GameDetailPage.xaml", "Command", "PlayCommand")]
|
||||
[InlineData("Pages/GameDetailPage.xaml", "Command", "GrantExceptionCommand")]
|
||||
[InlineData("Pages/GameDetailPage.xaml", "Command", "WithdrawExceptionCommand")]
|
||||
[InlineData("Pages/GameDetailPage.xaml", "Command", "ReEnableHookingCommand")]
|
||||
@@ -125,6 +129,19 @@ public sealed class ViewerModeTests
|
||||
((string?)control.Attribute("IsEnabled")).Should().Be("{Binding ViewModel.ActsOnThisPc}", $"{file}: {binding}");
|
||||
}
|
||||
|
||||
/// <summary>beta.21 (D59): every Play on the library — a card's and a row's — binds the page's viewer switch too.</summary>
|
||||
[Fact]
|
||||
public void EveryPlayOnTheLibraryIsOffInAViewer()
|
||||
{
|
||||
const string Through = ", RelativeSource={RelativeSource AncestorType=Page}}";
|
||||
XDocument xaml = AccessibilityTests.AppXaml().Single(static x => string.Equals(x.File, Path.Combine("Pages", "GamesPage.xaml"), StringComparison.Ordinal)).Xaml;
|
||||
|
||||
List<XElement> plays = [.. xaml.Descendants().Where(static e => string.Equals((string?)e.Attribute("Command"), "{Binding DataContext.ViewModel.PlayCommand" + Through, StringComparison.Ordinal))];
|
||||
|
||||
plays.Should().HaveCount(2, "the card's and the row's");
|
||||
plays.Should().AllSatisfy(static e => ((string?)e.Attribute("IsEnabled")).Should().Be("{Binding DataContext.ViewModel.ActsOnThisPc" + Through));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.18: every setting the Agent reads is off in a viewer, which has no Agent — the exception option and the three
|
||||
/// Recording numbers stayed live, and a change said "Applied. The capture agent reads it at the next session start." The
|
||||
|
||||
@@ -87,6 +87,9 @@ public sealed class DetectionSweepTests
|
||||
|
||||
public ValueTask<RpgMakerBuildFacts?> ReadRpgMakerBuildAsync(GameFileSnapshot snapshot, CancellationToken ct = default) =>
|
||||
ValueTask.FromResult<RpgMakerBuildFacts?>(null);
|
||||
|
||||
public ValueTask<RenPyBuildFacts?> ReadRenPyBuildAsync(GameFileSnapshot snapshot, CancellationToken ct = default) =>
|
||||
ValueTask.FromResult<RenPyBuildFacts?>(null);
|
||||
}
|
||||
|
||||
private sealed class FakeIdentity : IExecutableIdentitySource
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using FluentAssertions;
|
||||
using FrameLedger.Application.Import;
|
||||
using FrameLedger.Application.Play;
|
||||
|
||||
namespace FrameLedger.Application.Tests.Play;
|
||||
|
||||
/// <summary>
|
||||
/// beta.21 (Play, owner decision D59): each store's own way to start a game it installed, in the forms the stores write —
|
||||
/// and nothing built from an id that does not look like that store's, because the link is handed to the shell.
|
||||
/// </summary>
|
||||
public sealed class StoreLaunchesTests
|
||||
{
|
||||
private const string _galaxy = @"C:\Program Files\GOG Galaxy\GalaxyClient.exe";
|
||||
|
||||
[Fact]
|
||||
public void SteamStartsItsGameByAppId()
|
||||
{
|
||||
StoreLaunch? launch = StoreLaunches.For(Record("steam", "3513350", @"D:\SteamLibrary\steamapps\common\Wuthering Waves"), null);
|
||||
|
||||
launch.Should().Be(new StoreLaunch("steam", StoreLaunchKind.OpenLink, "steam://rungameid/3513350"), "the link of Steam's own game shortcuts");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EpicNamesTheCatalogWhenTheManifestDoesAndTheAppNameOtherwise()
|
||||
{
|
||||
StoreGame withCatalog = Record("epic", "dc9d2e595d0e4650b35d659f90d41059", @"D:\Epic Games\AlanWake2") with
|
||||
{
|
||||
LaunchKey = "c4763f236d08423eb47b4c3008779c84:93f2a8c3547846eda966cb3c152a026e:dc9d2e595d0e4650b35d659f90d41059",
|
||||
};
|
||||
StoreLaunches.For(withCatalog, null)!.Target.Should().Be(
|
||||
"com.epicgames.launcher://apps/c4763f236d08423eb47b4c3008779c84%3A93f2a8c3547846eda966cb3c152a026e%3Adc9d2e595d0e4650b35d659f90d41059?action=launch&silent=true");
|
||||
|
||||
StoreLaunches.For(Record("epic", "Fortnite", @"D:\Epic Games\Fortnite"), null)!.Target
|
||||
.Should().Be("com.epicgames.launcher://apps/Fortnite?action=launch&silent=true", "a manifest with no catalog names the AppName alone");
|
||||
|
||||
StoreLaunches.For(withCatalog with { LaunchKey = "ns:item:another-app" }, null)!.Target
|
||||
.Should().Be("com.epicgames.launcher://apps/dc9d2e595d0e4650b35d659f90d41059?action=launch&silent=true", "a key naming another app is not this game's");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GogRunsGalaxysOwnShortcutCommandAndNothingWithoutGalaxy()
|
||||
{
|
||||
StoreGame record = Record("gog", "1125815775", @"D:\another\gog\A Space for the Unbound - Prologue\");
|
||||
|
||||
StoreLaunch? launch = StoreLaunches.For(record, _galaxy);
|
||||
|
||||
launch.Should().NotBeNull();
|
||||
launch!.Kind.Should().Be(StoreLaunchKind.RunProgram);
|
||||
launch.Target.Should().Be(_galaxy);
|
||||
launch.Arguments.Should().Be("/command=runGame /gameId=1125815775 /path=\"D:\\another\\gog\\A Space for the Unbound - Prologue\"",
|
||||
"GALAXY's shortcut on the owner's PC, and no trailing backslash to escape the closing quote");
|
||||
launch.WorkingDirectory.Should().Be(@"C:\Program Files\GOG Galaxy");
|
||||
StoreLaunches.For(record, null).Should().BeNull("a GOG game without GALAXY has no hand-off; it is started directly");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ItchAsksItsAppToLaunchTheGame()
|
||||
{
|
||||
StoreLaunches.For(Record("itch", "5015466", @"D:\another\it\hello-hello-world"), null)!.Target
|
||||
.Should().Be("itch://install?game_id=5015466&launch");
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("steam", "730&evil=1")]
|
||||
[InlineData("steam", "")]
|
||||
[InlineData("steam", "12345678901234567890123")]
|
||||
[InlineData("gog", "1207658924 /command=x")]
|
||||
[InlineData("itch", "../games/1")]
|
||||
[InlineData("epic", "app?action=uninstall")]
|
||||
[InlineData("epic", "app name")]
|
||||
[InlineData("none", "730")]
|
||||
[InlineData("xbox", "730")]
|
||||
public void AnIdThatIsNotThatStoresShapeBuildsNothing(string platform, string id)
|
||||
{
|
||||
StoreLaunches.For(Record(platform, id, @"D:\Games\Some Game"), _galaxy).Should().BeNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AGogFolderThatCannotStandInsideQuotesBuildsNothing()
|
||||
{
|
||||
StoreLaunches.For(Record("gog", "1", "relative\\folder"), _galaxy).Should().BeNull();
|
||||
StoreLaunches.For(Record("gog", "1", "D:\\a\"b"), _galaxy).Should().BeNull();
|
||||
}
|
||||
|
||||
private static StoreGame Record(string platform, string id, string folder) => new(platform, id, "Name", folder, null, null);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using FluentAssertions;
|
||||
using FrameLedger.Application.Import;
|
||||
using FrameLedger.Application.Play;
|
||||
|
||||
namespace FrameLedger.Application.Tests.Play;
|
||||
|
||||
/// <summary>beta.21 (Play): the store that installed a game is the one whose own record names the folder its executable is in.</summary>
|
||||
public sealed class StoreRecordsTests
|
||||
{
|
||||
[Fact]
|
||||
public void TheRecordWhoseFolderHoldsTheExecutableIsTheGamesStore()
|
||||
{
|
||||
StoreGame wuwa = new("steam", "3513350", "Wuthering Waves", @"D:\SteamLibrary\steamapps\common\Wuthering Waves", null, null);
|
||||
StoreGame other = new("steam", "1091500", "Cyberpunk 2077", @"D:\SteamLibrary\steamapps\common\Cyberpunk 2077", null, null);
|
||||
|
||||
StoreRecords.Owning(@"D:\SteamLibrary\steamapps\common\Wuthering Waves\Client\Binaries\Win64\Client-Win64-Shipping.exe", "3513350", [other, wuwa])
|
||||
.Should().BeSameAs(wuwa);
|
||||
StoreRecords.Owning(@"d:\steamlibrary\STEAMAPPS\common\wuthering waves\Client-Win64-Shipping.exe", null, [wuwa])
|
||||
.Should().BeSameAs(wuwa, "Windows paths are not case-sensitive, and an entry the user added has no store id");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AFolderThatOnlySharesAPrefixIsNotTheGames()
|
||||
{
|
||||
StoreGame half = new("steam", "1", "Half", @"D:\Games\Half", null, null);
|
||||
|
||||
StoreRecords.Owning(@"D:\Games\Half-Life 2\hl2.exe", null, [half]).Should().BeNull("`Half` is not the folder of `Half-Life 2`");
|
||||
StoreRecords.Owning(@"D:\Games\Elsewhere\game.exe", null, [half]).Should().BeNull("no store installed it");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheDeepestFolderWinsAndThenTheEntrysOwnStoreId()
|
||||
{
|
||||
StoreGame outer = new("itch", "10", "Bundle", @"D:\Games\Bundle", null, null);
|
||||
StoreGame inner = new("gog", "20", "Game", @"D:\Games\Bundle\Game", null, null);
|
||||
StoreRecords.Owning(@"D:\Games\Bundle\Game\game.exe", null, [outer, inner]).Should().BeSameAs(inner);
|
||||
|
||||
StoreGame steam = new("steam", "30", "Twin", @"D:\Games\Twin", null, null);
|
||||
StoreGame itch = new("itch", "40", "Twin", @"D:\Games\Twin\", null, null);
|
||||
StoreRecords.Owning(@"D:\Games\Twin\twin.exe", "40", [steam, itch]).Should().BeSameAs(itch, "two stores name one folder: the entry's own id decides");
|
||||
StoreRecords.Owning(@"D:\Games\Twin\twin.exe", "30", [itch, steam]).Should().BeSameAs(steam);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The case the entry's platform column cannot settle: detection rewrites a platform it finds (an itch build that ships
|
||||
/// Steam's API reads as Steam) while the store id stays the importer's — a Steam link built from that id would start some
|
||||
/// other game. The records decide, not the column.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AnItchBuildThatShipsSteamsApiIsStillItchs()
|
||||
{
|
||||
StoreGame itch = new("itch", "5015466", "Some Game", @"D:\another\it\some-game", null, null);
|
||||
|
||||
StoreGame? owner = StoreRecords.Owning(@"D:\another\it\some-game\Game\Game.exe", "5015466", [itch]);
|
||||
|
||||
owner.Should().BeSameAs(itch);
|
||||
StoreLaunches.For(owner!, null)!.Target.Should().StartWith("itch://");
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,8 @@ public sealed class StaticGameDetectorTests
|
||||
|
||||
public RpgMakerBuildFacts? RpgMaker { get; init; }
|
||||
|
||||
public RenPyBuildFacts? RenPy { get; init; }
|
||||
|
||||
/// <summary>Which of the beta.19 second reads was made, in order.</summary>
|
||||
public List<string> BuildReads { get; } = [];
|
||||
|
||||
@@ -68,6 +70,12 @@ public sealed class StaticGameDetectorTests
|
||||
BuildReads.Add("rpgmaker");
|
||||
return ValueTask.FromResult(RpgMaker);
|
||||
}
|
||||
|
||||
public ValueTask<RenPyBuildFacts?> ReadRenPyBuildAsync(GameFileSnapshot s, CancellationToken ct = default)
|
||||
{
|
||||
BuildReads.Add("renpy");
|
||||
return ValueTask.FromResult(RenPy);
|
||||
}
|
||||
}
|
||||
|
||||
private static SignalGroup Any(params string[] globs) => new()
|
||||
@@ -283,24 +291,28 @@ public sealed class StaticGameDetectorTests
|
||||
new EngineRule { Id = "unity", Name = "Unity", Signals = Any("UnityPlayer.dll"), Version = new VersionExtractor { Type = VersionExtractorType.UnityBuild } },
|
||||
new EngineRule { Id = "rpgmaker_mv", Name = "RPG Maker MV/MZ", Signals = Any("nw.dll"), Version = new VersionExtractor { Type = VersionExtractorType.RpgMakerBuild } },
|
||||
new EngineRule { Id = "godot", Name = "Godot", Signals = Any("*.pck"), Version = new VersionExtractor { Type = VersionExtractorType.GodotBuild } },
|
||||
new EngineRule { Id = "renpy", Name = "Ren'Py", Signals = Any("*.rpa"), Version = new VersionExtractor { Type = VersionExtractorType.RenPyBuild } },
|
||||
],
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// beta.19: Unity, Godot and RPG Maker decide their versions in code as Unreal does — one second read, for the engine that
|
||||
/// matched only, and the decider's witness reported (the owner's Dialoop, 衔蝶 and A Doll's Locket - Remake as measured).
|
||||
/// matched only, and the decider's witness reported (the owner's Dialoop, 衔蝶 and A Doll's Locket - Remake as measured);
|
||||
/// Ren'Py since beta.20 (Bound Between Desks).
|
||||
/// </summary>
|
||||
[Theory]
|
||||
[InlineData("UnityPlayer.dll", "unity", "6000.3.3f1", EngineVersionSource.UnityPlayer)]
|
||||
[InlineData("xiandie.pck", "godot", "4.4.1", EngineVersionSource.GodotPack)]
|
||||
[InlineData("css/nw.dll", "rpgmaker", "1.10.0", EngineVersionSource.RpgMakerMzCore)]
|
||||
public async Task UnityGodotAndRpgMakerReadTheirBuildFactsOnceForTheEngineThatMatched(string marker, string read, string version, string source)
|
||||
[InlineData("game/archive.rpa", "renpy", "8.5.0", EngineVersionSource.RenPyVcVersion)]
|
||||
public async Task EnginesDecidedInCodeReadTheirBuildFactsOnceForTheEngineThatMatched(string marker, string read, string version, string source)
|
||||
{
|
||||
var probe = new ScriptedProbe(Snapshot(marker))
|
||||
{
|
||||
Unity = new UnityBuildFacts { PlayerProductVersion = "6000.3.3f1 (ef04196de0d6)", PlayerFileVersion = [6000, 3, 3, 15664153] },
|
||||
Godot = new GodotBuildFacts { PackVersion = [4, 4, 1], ExeProductName = "xiandie", ExeProductVersion = "0.1.0.3" },
|
||||
RpgMaker = new RpgMakerBuildFacts { CoreScript = "rmmz_core.js", CoreScriptVersion = "1.10.0" },
|
||||
RenPy = new RenPyBuildFacts { VcVersion = "8.5.0.25111603" },
|
||||
};
|
||||
var detector = new StaticGameDetector(new ScriptedRules(BuildRules()), probe);
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using FluentAssertions;
|
||||
using FrameLedger.Domain.Detection;
|
||||
|
||||
namespace FrameLedger.Domain.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// The Ren'Py version (beta.20): the owner's one Ren'Py install as measured on 2026-10-12, the build number dropped as Ren'Py
|
||||
/// names its releases, and nothing guessed from a version line that is not one.
|
||||
/// </summary>
|
||||
public sealed class RenPyVersionTests
|
||||
{
|
||||
[Fact]
|
||||
public void TheMeasuredInstallReadsAsTheReleaseItWasBuiltWith() =>
|
||||
RenPyVersion.Decide(new RenPyBuildFacts { VcVersion = "8.5.0.25111603" })
|
||||
.Should().Be(new EngineVersionReading("8.5.0", EngineVersionSource.RenPyVcVersion), "Bound Between Desks: Ren'Py 8.5.0");
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.5.0.25111603", "8.5.0")]
|
||||
[InlineData("8.3.7.25031702", "8.3.7")]
|
||||
[InlineData("7.4.11.2266", "7.4.11")]
|
||||
[InlineData("8.5.0", "8.5.0")]
|
||||
[InlineData(" 8.5.0.25111603 ", "8.5.0")]
|
||||
[InlineData("08.05.00.1", "8.5.0")]
|
||||
[InlineData("8.5", null)]
|
||||
[InlineData("8.5.0+nightly", null)]
|
||||
[InlineData("In Good Health", null)]
|
||||
[InlineData("0.5.0.1", null)]
|
||||
[InlineData("", null)]
|
||||
[InlineData(null, null)]
|
||||
public void TheVersionLineGivesMajorMinorPatchOrNothing(string? vcVersion, string? expected)
|
||||
{
|
||||
EngineVersionReading r = RenPyVersion.Decide(new RenPyBuildFacts { VcVersion = vcVersion });
|
||||
|
||||
r.Version.Should().Be(expected);
|
||||
r.Source.Should().Be(expected is null ? null : EngineVersionSource.RenPyVcVersion);
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,8 @@ namespace FrameLedger.Infrastructure.Tests.Detection;
|
||||
/// <summary>
|
||||
/// beta.19's three readers over files the test writes in the shapes measured on the owner's installs (2026-10-12): a Unity
|
||||
/// data file's header, a Godot pack beside the executable and one appended to it, RPG Maker MZ/MV core scripts and a VX Ace
|
||||
/// <c>Game.ini</c>. Each reads a bounded head of one file and says nothing when the file is not what it expects.
|
||||
/// <c>Game.ini</c> — and since beta.20 Ren'Py's <c>renpy/vc_version.py</c>. Each reads a bounded head of one file and says
|
||||
/// nothing when the file is not what it expects.
|
||||
/// </summary>
|
||||
public sealed class EngineBuildReadersTests : IDisposable
|
||||
{
|
||||
@@ -166,4 +167,32 @@ public sealed class EngineBuildReadersTests : IDisposable
|
||||
RpgMakerBuildReader.Read(Path.Combine(plain, "Plain.exe"), rgssLibrary: Path.Combine(plain, "RGSS202E.dll"))
|
||||
.Should().Be(new RpgMakerBuildFacts { RgssLibrary = "RGSS202E.dll" }, "the walk's own find when no Game.ini names one");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.20: Ren'Py's version line, from the engine's <c>renpy/vc_version.py</c> beside the launcher, in the shape measured
|
||||
/// on Bound Between Desks — and nothing from a folder without the file, from a file whose lines name no version
|
||||
/// (<c>version_name</c> is not <c>version</c>), or from past the bounded head.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task RenPysVersionLineIsReadFromTheEngineBesideTheLauncher()
|
||||
{
|
||||
string game = Sub("Bound Between Desks");
|
||||
string engine = Sub("Bound Between Desks", "renpy");
|
||||
string exe = Path.Combine(game, "BoundBetweenDesks.exe");
|
||||
string versionFile = Path.Combine(engine, "vc_version.py");
|
||||
await File.WriteAllBytesAsync(exe, new byte[8], Ct);
|
||||
|
||||
RenPyBuildReader.Read(exe).Should().BeNull("no version file");
|
||||
|
||||
await File.WriteAllTextAsync(versionFile, "branch = 'master'\nnightly = False\nofficial = True\nversion = '8.5.0.25111603'\nversion_name = 'In Good Health'\n", Ct);
|
||||
RenPyBuildFacts? facts = RenPyBuildReader.Read(exe);
|
||||
facts.Should().Be(new RenPyBuildFacts { VcVersion = "8.5.0.25111603" });
|
||||
RenPyVersion.Decide(facts!).Should().Be(new EngineVersionReading("8.5.0", EngineVersionSource.RenPyVcVersion));
|
||||
|
||||
await File.WriteAllTextAsync(versionFile, "version_name = 'In Good Health'\nnightly = False\n", Ct);
|
||||
RenPyBuildReader.Read(exe).Should().BeNull("a version name is not a version");
|
||||
|
||||
await File.WriteAllTextAsync(versionFile, new string('#', RenPyBuildReader.VersionFileBytes) + "\nversion = '8.5.0.1'\n", Ct);
|
||||
RenPyBuildReader.Read(exe).Should().BeNull("only the bounded head is read");
|
||||
}
|
||||
}
|
||||
@@ -107,12 +107,49 @@ public sealed class StoreLibrarySourcesTests : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>beta.21 (Play): GOG GALAXY's program, from GOG's own registry entries, and only when the file is there.</summary>
|
||||
[Fact]
|
||||
public void GalaxysProgramIsWhereGogsKeysNameIt()
|
||||
{
|
||||
string own = @"SOFTWARE\FrameLedger.Test\" + Guid.NewGuid().ToString("N");
|
||||
string key = own + @"\GOG.com\GalaxyClient";
|
||||
string folder = Sub("GOG Galaxy");
|
||||
try
|
||||
{
|
||||
new GogGalaxyLocator(RegistryHive.CurrentUser, key).ClientPath().Should().BeNull("no key, no GALAXY");
|
||||
using (RegistryKey client = Registry.CurrentUser.CreateSubKey(key, writable: true))
|
||||
{
|
||||
client.SetValue("clientExecutable", "GalaxyClient.exe");
|
||||
}
|
||||
|
||||
using (RegistryKey paths = Registry.CurrentUser.CreateSubKey(key + @"\paths", writable: true))
|
||||
{
|
||||
paths.SetValue("client", folder);
|
||||
}
|
||||
|
||||
new GogGalaxyLocator(RegistryHive.CurrentUser, key).ClientPath().Should().BeNull("the keys name a file that is not there");
|
||||
File.WriteAllText(Path.Combine(folder, "GalaxyClient.exe"), "MZ");
|
||||
new GogGalaxyLocator(RegistryHive.CurrentUser, key).ClientPath().Should().Be(Path.Combine(folder, "GalaxyClient.exe"));
|
||||
|
||||
using (RegistryKey client = Registry.CurrentUser.CreateSubKey(key, writable: true))
|
||||
{
|
||||
client.SetValue("clientExecutable", @"..\elsewhere\GalaxyClient.exe");
|
||||
}
|
||||
|
||||
new GogGalaxyLocator(RegistryHive.CurrentUser, key).ClientPath().Should().BeNull("a program name, never a path out of its folder");
|
||||
}
|
||||
finally
|
||||
{
|
||||
Registry.CurrentUser.DeleteSubKeyTree(own, throwOnMissingSubKey: false);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task EpicReadsItemManifestsAndItchReadsGzippedReceipts()
|
||||
{
|
||||
string manifests = Sub("Manifests");
|
||||
await File.WriteAllTextAsync(Path.Combine(manifests, "A1.item"),
|
||||
"{\"DisplayName\":\"Alan Wake 2\",\"InstallLocation\":\"D:\\\\Epic Games\\\\AlanWake2\",\"LaunchExecutable\":\"AlanWake2.exe\",\"AppName\":\"dcbb1ebd\",\"AppVersionString\":\"1.2.3\"}", Ct);
|
||||
"{\"DisplayName\":\"Alan Wake 2\",\"InstallLocation\":\"D:\\\\Epic Games\\\\AlanWake2\",\"LaunchExecutable\":\"AlanWake2.exe\",\"AppName\":\"dcbb1ebd\",\"AppVersionString\":\"1.2.3\",\"CatalogNamespace\":\"c4763f23\",\"CatalogItemId\":\"93f2a8c3\"}", Ct);
|
||||
await File.WriteAllTextAsync(Path.Combine(manifests, "B2.item"), "{\"DisplayName\":\"No location\"}", Ct);
|
||||
await File.WriteAllTextAsync(Path.Combine(manifests, "C3.item"), "{ not json", Ct);
|
||||
IReadOnlyList<StoreGame> epic = await new EpicLibrarySource(manifests).ListAsync(Ct);
|
||||
@@ -121,6 +158,7 @@ public sealed class StoreLibrarySourcesTests : IDisposable
|
||||
aw.StoreId.Should().Be("dcbb1ebd");
|
||||
aw.ExePath.Should().Be(@"D:\Epic Games\AlanWake2\AlanWake2.exe");
|
||||
aw.Version.Should().Be("1.2.3");
|
||||
aw.LaunchKey.Should().Be("c4763f23:93f2a8c3:dcbb1ebd", "beta.21: what the launcher's own launch link names");
|
||||
|
||||
string itch = Sub("itch");
|
||||
string install = Sub("itch", "apps", "celeste");
|
||||
|
||||
Reference in new issue
Block a user