WIP: feat(anr): offer an optional frame generation runtime download #50
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!50
Loading…
Reference in a new issue
No description provided.
Delete branch "brunobaccari/LongshotLauncher:feat/optional-anr-download"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
scripts/anr_sdk.py. Older builders receive no unsupported flag; Linux/ARM64 stay unavailable.--fetch-anr-runtimeto the compatible builder. Its implementation is in the companion Longshot ANR draft, commitee004cfaf0eb01084855bb2d379a95e6a29f6118; merge/release that builder before enabling this path for users.@@anr-runtime readyfollowed by a successful build marks the runtime installed; the Home card does not claim that ANR is active or generating frames.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 preservesnr_fg.iniand 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./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.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
MainWindowandSettingsStepViewfrom commit6c4177b, 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.
Opt-in: download requested
Checked means the player requested the optional runtime download; frame generation is enabled separately in the game.
Builder without ANR support
The checkbox is disabled and explains the missing builder capability, rather than sending an unsupported flag.
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
mainat publication.WIP: feat(anr): offer an optional frame generation runtime downloadto feat(anr): offer an optional frame generation runtime downloadfeat(anr): offer an optional frame generation runtime downloadto WIP: feat(anr): offer an optional frame generation runtime downloadCurrently, ANR doesn't have a license, so we're unsure how to distribute it. We will have to look into this
Reviewed the diff at
6c4177bagainst 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,ReplaceChecksandAnrRuntimeChecks, run early (right afterReleaseChecks): they pass. The full core run stops atSelfUpdateCheckson Windows, as the description says.Where it stands:
licenseis 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.--fetch-anr-runtimeand noscripts/anr_sdk.py. Longshot#244 is WIP and conflicts with main invk_framegen.cpp, and a HUD ghosting report on it is unanswered. Gating on the helper file means no builder gets an unknown switch (CommandCheckscovers v3.0.0 and v3.3.0).FolderOf), #119 (BuildJob.Older),Upscalers.Chosenbuilding the request, and the build's report lines.Does the approach still fit main? Mostly, with four changes when it's rebased (inline):
{c:T '…'},Tr.T) into 12 catalogs. The new label, checkbox, hints and home line are bare English here. They needTrand catalog entries, ortranslations.pyreports them and players see English.LauncherSettings, applied byUpscalers.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, throughUpscalers.Chosen) is simpler and matches the page.anr/in the folder. The home then says it isn't installed, though the game still has it. Either make_game removesanr/when the switch isn't passed, or the launcher says it's still there.AnrRuntimeChecksreads 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. TheMakeGameCommand, protocol and registry checks above it already test the behaviour, so the source-text checks can go.Smaller:
AnrRuntimeAvailablereads 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;Since #104 an update builds in place, so an update with the download off keeps the previous build's
anr/. This then recordsAnrRuntime = false, and the home stops listing it, while the game folder still has the runtime. Either make_game should removeanr/when--fetch-anr-runtimeisn't passed (Longshot#244), or this should say the runtime is still in the folder.@ -131,0 +144,4 @@}}public string AnrRuntimeLine => AnrRuntimeAvailableNit: 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 BuildJobVersion = version;Replaces = replaces;var s = main.Service;AnrRuntime = replaces?.AnrRuntimeRequested ?? s.Settings.AnrRuntime;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.Chosenon main. Doing ANR the same way dropsAnrRuntimeRequestedand this line. Also,FolderOfdecides the folder on main now, so this line conflicts anyway.@ -143,6 +143,14 @@</Grid></StackPanel></Border><TextBlock Classes="glabel" Text="FRAME GENERATION"/>On main every text here is translated (
{c:T '…'}, 12 catalogs, checked byscripts/translations.py). The label, the checkbox, the two hints (AnrRuntimeLinetoo) and the home's line needTr.Tand 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");This is the whole consent for a download from github.com/apex-compute/ANR, which declares no licence (the API's
licenseis 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"));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.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.