WIP: feat(anr): offer an optional frame generation runtime download #50

Draft
brunobaccari wants to merge 1 commit from brunobaccari/LongshotLauncher:feat/optional-anr-download into main
Contributor

Players who opt into experimental ANR frame generation need a way to obtain its runtime during a normal Launcher build, alongside the existing DLSS/FSR options. This adds a separate, default-off download choice without enabling frame generation.

Changes

  • Add Download ANR FG runtime (experimental) to Settings under Frame generation, with availability and help text. Save the choice and preserve it when rebuilding/updating an installation.
  • Enable the checkbox only on Windows x64 when the selected builder contains scripts/anr_sdk.py. Older builders receive no unsupported flag; Linux/ARM64 stay unavailable.
  • Pass --fetch-anr-runtime to the compatible builder. Its implementation is in the companion Longshot ANR draft, commit ee004cfaf0eb01084855bb2d379a95e6a29f6118; merge/release that builder before enabling this path for users.
  • Keep the requested option separate from verified installation. Only @@anr-runtime ready followed by a successful build marks the runtime installed; the Home card does not claim that ANR is active or generating frames.
  • Add coverage for settings persistence, version/platform gating, arguments, unchanged environment/license handling, protocol parsing and registry confirmation. Update the README.

The builder downloads the official pinned ANR FG-V.B15 addon directly, verifies its size/SHA-256, caches it and stages only its 19-file runtime subtree into <game>/anr/. It preserves nr_fg.ini and modified packages, executes no upstream installer and changes no graphics setting. ANR needs the release's Microsoft Visual C++ 2015–2022 x64 runtime. No ANR binaries/models are mirrored or included in either PR.

Validation

Base: main @ 0e6e1d78210e4c79efecc04e8b27ba7a288ec3b7.
This PR: feat/optional-anr-download @ 6c4177b1bd82eefc162beffaf49a2f975bfef83a.

  • git diff --check: passed. Static review and AXAML XML parsing passed; the binding targets and builder/protocol contract were inspected.
  • Application and screenshot fixture compiled with the isolated official .NET 10.0.404 SDK: zero errors. The application reported the existing AVLN5001 obsolete-Watermark warning in BuildStepView; no production source change was needed.
  • Original supplementary checks: 67 assertions passed (Settings 17, Command 30, Replace 11, AnrRuntime 9). These invoke the existing test methods without editing or weakening them. The rendered fixture additionally checked the real checkbox binding, availability and OFF-to-ON PropertyChanged notification.
  • Full strict core suite: compiled with zero warnings/errors, but stopped in the unchanged SelfUpdateChecks before the ANR checks. Its Linux /apps/... absolute-path expectation fails Path.IsPathFullyQualified on a Windows host. Canonical LF Git content was used to preserve the signed fixtures; the 67 supplementary assertions are not a full-suite pass.
  • Release suite: 28 ran, 22 passed, 1 failed and 5 errored. Windows-generated CRLF data breaks the dynamic signature/newline expectations; a shell stub fails with WinError 193. These release sources/tests are unchanged. The separate clean-base run timed out, so no main-versus-PR equivalence is claimed.
  • Companion builder: 22 ANR downloader tests and 40 adjacent FFX/NGX/make_game tests passed. An isolated real-addon download/install/cache smoke passed; no DLL/installer was executed.

Still required before readiness: a passing full core/release suite, locked release builds on Windows and Linux, native Settings/rebuild/update UI runs, and a complete compatible builder-to-game installation. Actual ANR provider/GPU execution and generated output remain unvalidated in the companion draft.

Screenshots

Actual MainWindow and SettingsStepView from commit 6c4177b, rendered at 1200×850 with Avalonia/Skia in memory and isolated synthetic launcher/toolchain data. These UI previews do not demonstrate a completed install or provider execution. No OS input or desktop cursor was captured.

Default: download off

The optional ANR runtime download is off by default, beside the existing DLSS/FSR build choices.

Default: download off

Opt-in: download requested

Checked means the player requested the optional runtime download; frame generation is enabled separately in the game.

Opt-in: download requested

Builder without ANR support

The checkbox is disabled and explains the missing builder capability, rather than sending an unsupported flag.

Builder without ANR support

Risks and rollback

Installed runtime files are distinct from a functioning frame-generation provider; the UI reports only the former. The capability guard deliberately keeps current incompatible releases disabled until a builder carrying the helper is selected. Leave the optional checkbox off to retain the existing build behavior. Neither the locally installed Launcher nor the user's running compilation, game files, settings or saves was modified.

Checklist

  • One topic, Conventional Commit title and AI assistance trailers.
  • Branch based on current Launcher main at publication.
  • No game files, saves, build output, secrets or provider binaries included.
  • Source-reading tests and documentation updated.
  • .NET 10 application compilation and rendered ANR binding checks.
  • 67 original supplementary assertions passed, including 9 ANR-specific checks.
  • Full core/release suites passing; current Windows failures are documented above.
  • Screenshots of the real Settings view with isolated data.
  • Native Windows/Linux UI validation.
  • Compatible builder-to-game installation and real ANR validation.
Players who opt into experimental ANR frame generation need a way to obtain its runtime during a normal Launcher build, alongside the existing DLSS/FSR options. This adds a separate, default-off download choice without enabling frame generation. ## Changes - Add **Download ANR FG runtime (experimental)** to Settings under **Frame generation**, with availability and help text. Save the choice and preserve it when rebuilding/updating an installation. - Enable the checkbox only on Windows x64 when the selected builder contains `scripts/anr_sdk.py`. Older builders receive no unsupported flag; Linux/ARM64 stay unavailable. - Pass `--fetch-anr-runtime` to the compatible builder. Its implementation is in the companion [Longshot ANR draft](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/244), commit `ee004cfaf0eb01084855bb2d379a95e6a29f6118`; merge/release that builder before enabling this path for users. - Keep the requested option separate from verified installation. Only `@@anr-runtime ready` followed by a successful build marks the runtime installed; the Home card does not claim that ANR is active or generating frames. - Add coverage for settings persistence, version/platform gating, arguments, unchanged environment/license handling, protocol parsing and registry confirmation. Update the README. The builder downloads the official pinned [ANR FG-V.B15 addon](https://github.com/apex-compute/ANR/releases/tag/FG-V.B15) directly, verifies its size/SHA-256, caches it and stages only its 19-file runtime subtree into `<game>/anr/`. It preserves `nr_fg.ini` and modified packages, executes no upstream installer and changes no graphics setting. ANR needs the release's Microsoft Visual C++ 2015–2022 x64 runtime. No ANR binaries/models are mirrored or included in either PR. ## Validation Base: `main @ 0e6e1d78210e4c79efecc04e8b27ba7a288ec3b7`. This PR: `feat/optional-anr-download @ 6c4177b1bd82eefc162beffaf49a2f975bfef83a`. - `git diff --check`: passed. Static review and AXAML XML parsing passed; the binding targets and builder/protocol contract were inspected. - Application and screenshot fixture compiled with the isolated official .NET 10.0.404 SDK: zero errors. The application reported the existing AVLN5001 obsolete-Watermark warning in BuildStepView; no production source change was needed. - Original supplementary checks: **67 assertions passed** (Settings 17, Command 30, Replace 11, AnrRuntime 9). These invoke the existing test methods without editing or weakening them. The rendered fixture additionally checked the real checkbox binding, availability and OFF-to-ON PropertyChanged notification. - Full strict core suite: compiled with zero warnings/errors, but stopped in the unchanged SelfUpdateChecks before the ANR checks. Its Linux `/apps/...` absolute-path expectation fails Path.IsPathFullyQualified on a Windows host. Canonical LF Git content was used to preserve the signed fixtures; the 67 supplementary assertions are not a full-suite pass. - Release suite: 28 ran, 22 passed, 1 failed and 5 errored. Windows-generated CRLF data breaks the dynamic signature/newline expectations; a shell stub fails with WinError 193. These release sources/tests are unchanged. The separate clean-base run timed out, so no main-versus-PR equivalence is claimed. - Companion builder: 22 ANR downloader tests and 40 adjacent FFX/NGX/make_game tests passed. An isolated real-addon download/install/cache smoke passed; no DLL/installer was executed. Still required before readiness: a passing full core/release suite, locked release builds on Windows and Linux, native Settings/rebuild/update UI runs, and a complete compatible builder-to-game installation. Actual ANR provider/GPU execution and generated output remain unvalidated in the companion draft. ## Screenshots Actual `MainWindow` and `SettingsStepView` from commit `6c4177b`, rendered at 1200×850 with Avalonia/Skia in memory and isolated synthetic launcher/toolchain data. These UI previews do not demonstrate a completed install or provider execution. No OS input or desktop cursor was captured. ### Default: download off The optional ANR runtime download is off by default, beside the existing DLSS/FSR build choices. ![Default: download off](https://git.magicbean.dev/attachments/d22e12ff-4752-44e9-93d0-58e8fba8dc48) ### Opt-in: download requested Checked means the player requested the optional runtime download; frame generation is enabled separately in the game. ![Opt-in: download requested](https://git.magicbean.dev/attachments/6cd266c1-a3a6-442f-b4e5-1d0a6a37ffe7) ### Builder without ANR support The checkbox is disabled and explains the missing builder capability, rather than sending an unsupported flag. ![Builder without ANR support](https://git.magicbean.dev/attachments/3bd2344c-5449-4e9b-b90a-c3f05b522414) ## Risks and rollback Installed runtime files are distinct from a functioning frame-generation provider; the UI reports only the former. The capability guard deliberately keeps current incompatible releases disabled until a builder carrying the helper is selected. Leave the optional checkbox off to retain the existing build behavior. Neither the locally installed Launcher nor the user's running compilation, game files, settings or saves was modified. ## Checklist - [x] One topic, Conventional Commit title and AI assistance trailers. - [x] Branch based on current Launcher `main` at publication. - [x] No game files, saves, build output, secrets or provider binaries included. - [x] Source-reading tests and documentation updated. - [x] .NET 10 application compilation and rendered ANR binding checks. - [x] 67 original supplementary assertions passed, including 9 ANR-specific checks. - [ ] Full core/release suites passing; current Windows failures are documented above. - [x] Screenshots of the real Settings view with isolated data. - [ ] Native Windows/Linux UI validation. - [ ] Compatible builder-to-game installation and real ANR validation.
feat(anr): offer an optional frame generation runtime download
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
6c4177b1bd
Expose a saved, default-off choice only for Windows x64 builders carrying
the ANR downloader. Preserve the request on updates and record installed
status only after the builder confirms verified deployment.

Assisted-by: Codex
Co-Authored-By: OpenAI <[email protected]>
brunobaccari changed title from WIP: feat(anr): offer an optional frame generation runtime download to feat(anr): offer an optional frame generation runtime download 2026-11-13 18:37:51 +00:00
brunobaccari changed title from feat(anr): offer an optional frame generation runtime download to WIP: feat(anr): offer an optional frame generation runtime download 2026-11-13 19:44:39 +00:00
Owner

Currently, ANR doesn't have a license, so we're unsure how to distribute it. We will have to look into this

Currently, ANR doesn't have a license, so we're unsure how to distribute it. We will have to look into this
madebyjordan left a comment

Reviewed the diff at 6c4177b against its base (0e6e1d7). I also read HumanBean's licence comment, Longshot#244, and main as it is now (bfa2448).

Run here (Windows 11, SDK 10.0.404, on its own base):

  • dotnet build App/LongshotLauncher.csproj: 0 errors, and the one AVLN5001 warning its base already has.
  • SettingsChecks, CommandChecks, ReplaceChecks and AnrRuntimeChecks, run early (right after ReleaseChecks): they pass. The full core run stops at SelfUpdateChecks on Windows, as the description says.

Where it stands:

  • The licence is still open. HumanBean wrote on 15 Nov that ANR has no licence. github.com/apex-compute/ANR still declares none: the API's license is null, and FG-V.B15's assets have no licence file. Until Apex Compute grants one, the launcher has no terms to show and nothing to point the player to. Here the tick is the only consent, and DLSS and FSR 4 show their vendor's licence first. That decides whether this can go in at all, so it comes before any rework.
  • Nothing reaches players yet, which is right. Longshot main has no --fetch-anr-runtime and no scripts/anr_sdk.py. Longshot#244 is WIP and conflicts with main in vk_framegen.cpp, and a HUD ghosting report on it is unanswered. Gating on the helper file means no builder gets an unknown switch (CommandChecks covers v3.0.0 and v3.3.0).
  • It is 59 commits behind main and conflicts in 9 files: BuildStepViewModel, HomeViewModel, WizardViewModel, BuildRegistry, LauncherSettings, MakeGameCommand, README, and the two test files. Most of that is main moving on: #104 (updates in place, FolderOf), #119 (BuildJob.Older), Upscalers.Chosen building the request, and the build's report lines.

Does the approach still fit main? Mostly, with four changes when it's rebased (inline):

  1. Texts: main translates every text in the views ({c:T '…'}, Tr.T) into 12 catalogs. The new label, checkbox, hints and home line are bare English here. They need Tr and catalog entries, or translations.py reports them and players see English.
  2. Where the choice lives: DLSS and FSR 4 are one launcher-wide choice (LauncherSettings, applied by Upscalers.Chosen). This adds a second, per-build choice (AnrRuntimeRequested) that overrides it on updates, while the checkbox also writes the launcher-wide one. Those two can disagree, and the player can't see which applies. Doing it the way the upscalers do (one setting, through Upscalers.Chosen) is simpler and matches the page.
  3. Updates build in place now (#104). Turning it off for an update leaves the previous build's anr/ in the folder. The home then says it isn't installed, though the game still has it. Either make_game removes anr/ when the switch isn't passed, or the launcher says it's still there.
  4. Tests: AnrRuntimeChecks reads the source files and looks for exact lines of code. A rename breaks it while the behaviour stays the same, and a broken behaviour with the same line passes. The MakeGameCommand, protocol and registry checks above it already test the behaviour, so the source-text checks can go.

Smaller:

  • The Linux hint says "Unavailable on Linux" while ANR's release ships a Linux kit. If Linux is just not done yet, "not on Linux yet" is truer.
  • AnrRuntimeAvailable reads the disk on each binding. That's fine for one file.

Verdict: comment, since it's WIP. The licence question is the blocker, not the code.

Reviewed the diff at 6c4177b against its base (0e6e1d7). I also read HumanBean's licence comment, Longshot#244, and main as it is now (bfa2448). **Run here (Windows 11, SDK 10.0.404, on its own base):** - `dotnet build App/LongshotLauncher.csproj`: 0 errors, and the one AVLN5001 warning its base already has. - `SettingsChecks`, `CommandChecks`, `ReplaceChecks` and `AnrRuntimeChecks`, run early (right after `ReleaseChecks`): they pass. The full core run stops at `SelfUpdateChecks` on Windows, as the description says. **Where it stands:** - **The licence is still open.** HumanBean wrote on 15 Nov that ANR has no licence. github.com/apex-compute/ANR still declares none: the API's `license` is null, and FG-V.B15's assets have no licence file. Until Apex Compute grants one, the launcher has no terms to show and nothing to point the player to. Here the tick is the only consent, and DLSS and FSR 4 show their vendor's licence first. That decides whether this can go in at all, so it comes before any rework. - **Nothing reaches players yet, which is right.** Longshot main has no `--fetch-anr-runtime` and no `scripts/anr_sdk.py`. Longshot#244 is WIP and conflicts with main in `vk_framegen.cpp`, and a HUD ghosting report on it is unanswered. Gating on the helper file means no builder gets an unknown switch (`CommandChecks` covers v3.0.0 and v3.3.0). - **It is 59 commits behind main and conflicts in 9 files:** BuildStepViewModel, HomeViewModel, WizardViewModel, BuildRegistry, LauncherSettings, MakeGameCommand, README, and the two test files. Most of that is main moving on: #104 (updates in place, `FolderOf`), #119 (`BuildJob.Older`), `Upscalers.Chosen` building the request, and the build's report lines. **Does the approach still fit main?** Mostly, with four changes when it's rebased (inline): 1. **Texts:** main translates every text in the views (`{c:T '…'}`, `Tr.T`) into 12 catalogs. The new label, checkbox, hints and home line are bare English here. They need `Tr` and catalog entries, or `translations.py` reports them and players see English. 2. **Where the choice lives:** DLSS and FSR 4 are one launcher-wide choice (`LauncherSettings`, applied by `Upscalers.Chosen`). This adds a second, per-build choice (`AnrRuntimeRequested`) that overrides it on updates, while the checkbox also writes the launcher-wide one. Those two can disagree, and the player can't see which applies. Doing it the way the upscalers do (one setting, through `Upscalers.Chosen`) is simpler and matches the page. 3. **Updates build in place now (#104).** Turning it off for an update leaves the previous build's `anr/` in the folder. The home then says it isn't installed, though the game still has it. Either make_game removes `anr/` when the switch isn't passed, or the launcher says it's still there. 4. **Tests:** `AnrRuntimeChecks` reads the source files and looks for exact lines of code. A rename breaks it while the behaviour stays the same, and a broken behaviour with the same line passes. The `MakeGameCommand`, protocol and registry checks above it already test the behaviour, so the source-text checks can go. **Smaller:** - The Linux hint says "Unavailable on Linux" while ANR's release ships a Linux kit. If Linux is just not done yet, "not on Linux yet" is truer. - `AnrRuntimeAvailable` reads the disk on each binding. That's fine for one file. Verdict: comment, since it's WIP. The licence question is the blocker, not the code.
@ -325,2 +332,4 @@
entry.Dlss = s.Dlss && s.DlssLicense;
entry.Fsr = fsr;
entry.AnrRuntimeRequested = job.AnrRuntime;
entry.AnrRuntime = anrRuntime && progress.AnrRuntimeReady;
Member

Since #104 an update builds in place, so an update with the download off keeps the previous build's anr/. This then records AnrRuntime = false, and the home stops listing it, while the game folder still has the runtime. Either make_game should remove anr/ when --fetch-anr-runtime isn't passed (Longshot#244), or this should say the runtime is still in the folder.

Since #104 an update builds in place, so an update with the download off keeps the previous build's `anr/`. This then records `AnrRuntime = false`, and the home stops listing it, while the game folder still has the runtime. Either make_game should remove `anr/` when `--fetch-anr-runtime` isn't passed (Longshot#244), or this should say the runtime is still in the folder.
@ -131,0 +144,4 @@
}
}
public string AnrRuntimeLine => AnrRuntimeAvailable
Member

Nit: ANR's FG-V.B15 ships a Linux kit, so "Unavailable on Linux" reads as never. If it's only that this builder's Linux side isn't done, "Not on Linux yet" is truer.

Nit: ANR's FG-V.B15 ships a Linux kit, so "Unavailable on Linux" reads as never. If it's only that this builder's Linux side isn't done, "Not on Linux yet" is truer.
@ -18,6 +18,7 @@ public sealed class BuildJob
Version = version;
Replaces = replaces;
var s = main.Service;
AnrRuntime = replaces?.AnrRuntimeRequested ?? s.Settings.AnrRuntime;
Member

This makes a per-build choice that overrides the launcher-wide one on updates. The checkbox (SettingsStepViewModel) writes both, so they can disagree without the player seeing which applies. DLSS and FSR 4 are one launcher-wide choice applied by Upscalers.Chosen on main. Doing ANR the same way drops AnrRuntimeRequested and this line. Also, FolderOf decides the folder on main now, so this line conflicts anyway.

This makes a per-build choice that overrides the launcher-wide one on updates. The checkbox (SettingsStepViewModel) writes both, so they can disagree without the player seeing which applies. DLSS and FSR 4 are one launcher-wide choice applied by `Upscalers.Chosen` on main. Doing ANR the same way drops `AnrRuntimeRequested` and this line. Also, `FolderOf` decides the folder on main now, so this line conflicts anyway.
@ -143,6 +143,14 @@
</Grid>
</StackPanel>
</Border>
<TextBlock Classes="glabel" Text="FRAME GENERATION"/>
Member

On main every text here is translated ({c:T '…'}, 12 catalogs, checked by scripts/translations.py). The label, the checkbox, the two hints (AnrRuntimeLine too) and the home's line need Tr.T and catalog entries when this is rebased, or they show in English.

On main every text here is translated (`{c:T '…'}`, 12 catalogs, checked by `scripts/translations.py`). The label, the checkbox, the two hints (`AnrRuntimeLine` too) and the home's line need `Tr.T` and catalog entries when this is rebased, or they show in English.
@ -59,6 +62,7 @@ public sealed record MakeGameCommand(
// Vulkan FSR 4 library beside the game, and the build compiles its own Vulkan back end, as with DLSS)
var fsr = r.Fsr && r.FsrLicense && FsrBuilds(tools, platform, directoryExists);
if (fsr) args.AddRange(windows ? new[] { "--fsr", "--fetch-fsr-runtime", "--accept-amd-license" } : new[] { "--fsr" });
if (r.AnrRuntime && AnrRuntimeAvailable(tools, platform, fileExists, architecture)) args.Add("--fetch-anr-runtime");
Member

This is the whole consent for a download from github.com/apex-compute/ANR, which declares no licence (the API's license is null, and FG-V.B15 has no licence file). DLSS and FSR 4 show their vendor's licence before their switch goes on (DlssLicense, FsrLicense). Here there is nothing to show yet. HumanBean's comment of 15 Nov still stands: this needs a licence from Apex Compute before the launcher offers it.

This is the whole consent for a download from github.com/apex-compute/ANR, which declares no licence (the API's `license` is null, and FG-V.B15 has no licence file). DLSS and FSR 4 show their vendor's licence before their switch goes on (`DlssLicense`, `FsrLicense`). Here there is nothing to show yet. HumanBean's comment of 15 Nov still stands: this needs a licence from Apex Compute before the launcher offers it.
@ -570,0 +589,4 @@
var legacy = BuildRegistry.Load(Path.Combine(Folder("anr-registry"), "builds.json")).Add("/g", "v3.0.0", "stable");
Require(legacy.AnrRuntime == null && legacy.AnrRuntimeRequested == null, "An older build's ANR state remains unknown.");
var wizard = File.ReadAllText(Path.Combine(repo, "App", "ViewModels", "WizardViewModel.cs"));
Member

These read the source files and look for exact lines (wizard.Contains("AnrRuntime = replaces?...")). A rename or reformat fails them while the behaviour stays the same, and a behaviour change that keeps the line passes them. The command, protocol and registry checks already cover the behaviour, so this part can go.

These read the source files and look for exact lines (`wizard.Contains("AnrRuntime = replaces?...")`). A rename or reformat fails them while the behaviour stays the same, and a behaviour change that keeps the line passes them. The command, protocol and registry checks already cover the behaviour, so this part can go.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
This pull request has changes conflicting with the target branch.
  • App/ViewModels/BuildStepViewModel.cs
  • App/ViewModels/HomeViewModel.cs
  • App/ViewModels/WizardViewModel.cs
  • Core/BuildRegistry.cs
  • Core/LauncherSettings.cs
  • Core/MakeGameCommand.cs
  • README.md
  • tests/launcher_core/Program.cs
  • tests/launcher_core/ScreenChecks.cs
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/optional-anr-download:brunobaccari-feat/optional-anr-download'
git switch 'brunobaccari-feat/optional-anr-download'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!50
No description provided.