Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.
Swift apple-siliconcustom-formathomebrewiosipaipadipadosiphonemetalnative-portnintendo-switchnxnativeromfsswitch-games
Rename ContentView to LauncherView
v0lumehi25fc5ba7a861
diff --git a/frontend/ARCHITECTURE.md b/frontend/ARCHITECTURE.mdindex ca55963a..ff93d6e9 100644--- a/frontend/ARCHITECTURE.md+++ b/frontend/ARCHITECTURE.md@@ -15,11 +15,11 @@ The plan and the steps are in [LNPANDY/NX2Apple#387](https://github.com/LNPANDY/Step 1 of #387 made the targets and moved the files that already fit. Step 2 moved the language out of `BuildModel` into the `Localizer` store. Step 3 moved the build log into the `BuildLog` store. Step 4 moved the pure logic into `NXCore`. Step 5 added the first services. Step 6 added the first store, `AppUpdateStore`, the reference for the others. Step 7 moved the rest one store per PR: the repository, the engine sync, the dependencies, the devices, then the build. `BuildModel` is gone. The views still live in the app target and move with step 8.-- `LauncherStores` (app target, `LauncherStores.swift`) is the wiring and nothing else: it creates the services and the stores, connects them and hands them to the views. Every store is a `let`. It holds no logic and no `@Published` state. The views that still live in the app target (`ContentView`, `BuilderView`, the sheets) take the stores they show as parameters, so they cannot leave the app target before step 8.+- `LauncherStores` (app target, `LauncherStores.swift`) is the wiring and nothing else: it creates the services and the stores, connects them and hands them to the views. Every store is a `let`. It holds no logic and no `@Published` state. The views that still live in the app target (`LauncherView`, `BuilderView`, the sheets) take the stores they show as parameters, so they cannot leave the app target before step 8.- `NXCore` holds the value types and static functions that need only Foundation: app and engine update parsing, `Localization.swift`, the release notes, the device and signing tools, the cloud folder and saves migration, the bundled tools, input staging, the build target and the pipe reader. Step 4 added four types: `TitleID` (parse a title ID from a file name, its owner, the update version, the build key), `GameInputs` (classify files into the four rows, row mismatch, allowed file types), `BuildProgress` (stage lines, progress details, durations, the steps of Xcode and the install, failure info) and `Toolchain` (probing Python, the venv, dotnet and Xcode, and the dependency rows `Dep`). `Stage` and `StepState` moved with `BuildProgress`. Step 5 added the first services (step 6 added `ReleaseSource`, see below): `ProcessRunner` (a protocol, with `SystemProcessRunner` as the real one), `ProcessGroups` (the process groups that Stop and quitting end) and `GitCheckout` (a protocol, with `SystemGitCheckout`, plus `GitRules` for the decisions that need no git). `ProcessRunner` is where a build process starts: `capture` runs to the end and keeps the output, `stream` hands out lines, `start` returns at once and can lead a process group. `LauncherStores` creates a runner and a checkout and hands them to the stores that use them: the clone, fetch, pull and adoption of a ZIP copy (`RepoStore`), the build run, the tools of a stage, the archive step and `openOnDevice` (`BuildStore`). `Toolchain`, `Diagnostics`, `OlderTools`, `Uninstall`, `EngineLayout.runSync` and the update staging take a runner or a checkout as a parameter with the real one as default. Tests pass in a fake. These still start a `Process` themselves and move with the step that owns them: `EngineInstaller` (ditto, in `NXCore` since the engine sync store), the administrator prompt in `LiveOnboardingDriver` and the game start in `LiveConsoleDriver`. The tools of the device store (`DeviceTools`, `AppSignature`, `DeviceControl`, `ShellInstaller`) moved onto `ProcessRunner` with the device store, see below. What reads `OnboardingDefaults` (`needsIOSPlatform`, the platform choice that asks for a new dependency check) stays in the app target, in `LauncherStores`, because the guided setup owns those keys.- Step 6 moved the self-update out of `BuildModel`. `AppUpdate` (`NXCore`) now also holds the release parsing (`release(fromJSON:)`, `check(latest:current:)`), the version compare (`isNewer`), the asset names, the staging of a download (`stage`, `StageFailure`) and the install, which clears the quarantine flag through a `ProcessRunner`. `ReleaseSource` is the second service (a protocol, with `GitHubReleases` as the real one): the latest release and the download. `Uninstall` moved to `NXCore` too, because the store holds its plan. `AppUpdate.relaunch` still starts its detached shell itself, and the store gets it as a closure.- `NXCoreTests` tests `NXCore` alone. It links no other target, so these tests run without SwiftUI. New tests of pure logic go there.-- `NXModel` holds `Localizer`: `lang` and `t()`. `LauncherStores` creates one, and `ContentView` hands it to every view as an environment object. A view that shows text declares `@EnvironmentObject var loc: Localizer` and calls `loc.t(...)`. A language change redraws these views and nothing else.+- `NXModel` holds `Localizer`: `lang` and `t()`. `LauncherStores` creates one, and `LauncherView` hands it to every view as an environment object. A view that shows text declares `@EnvironmentObject var loc: Localizer` and calls `loc.t(...)`. A language change redraws these views and nothing else.- `NXModel` holds `AppUpdateStore`: the release check, the staged update, the update sheet, the uninstall plan and `appVersion`. `LauncherStores` creates it with its localizer, runner and release source, and the views that show the update (the launcher's top bar and activity line, the Settings section, the update sheet) observe it. `NXModelTests` tests it with a fake runner and a fake release source, without SwiftUI.- `NXModel` holds `RepoStore` (step 7, repository): the repository path, the status line under it, how far it is behind origin/main, the clone, the update check, the pull, the automatic update when the app opens and the adoption of a ZIP copy. `LauncherStores` creates it with its `Localizer` and `GitCheckout` and wires four closures: whether a build runs, whether this is a release app (which never clones or pulls), the build log, and `didMove`, which starts the engine sync after a clone, a pull or an adoption. The views that show the repository (Settings "Tools", the library's activity line, the setup hint) observe the store. `RepoLocation` is the narrow protocol (`path`, `isRepo`, `isGit`) for a store that needs only where the repository is. `NXCore` got the rules the store needs: `RepoLayout` (is it a repository, the tools a build needs, which checkout to use at start) and the file-system part of `EngineLayout` (`marker`, `root`, `isCheckout`, `hasEngineTool`). The stale check and the sync of `EngineLayout` stay in the app target with the engine.- `NXModel` holds `EngineSyncStore` (step 7, engine sync): the engine selection (channel, engine ID, version, the one kept), the sync of a checkout's `engine/` (`tools/engine.py sync`, its status line and its failure row with Try again, the calls that wait for a running sync) and the engine of the release app (seeding the app's own engine, the check of the selected channel, the install, the channel switch after a confirmation, an engine that waits for the running build). `LauncherStores` creates it with its localizer and runner, the `RepoStore` as the `RepoLocation` to read, the `DependencyStore` as the `PythonLocation` (a narrow protocol with `pythonPath`) and closures: where the build reads its tools from (`setRepoPath`, an installed engine tree), whether a build runs, the automatic update and the log. `RepoStore.didMove` starts its sync. The views that show the engine (Settings "Tools", the sync banner, the failure row's Try again, the launcher's checks after a sync) observe the store. `NXCore` got what the store needs: the stale check and the sync of `EngineLayout`, `EngineUpdater.swift` (`EngineChannel`, `EngineSelection`, `EngineUpdate`, `EngineInstaller`, `EngineTransport`) and `BuildFailureKind` with `BuildFailure` (the sync's failure row). The classifier `BuildFailureClassifier` moved to `NXCore` with the build store. `NXModelTests` tests the store with a fake runner, without SwiftUI.diff --git a/frontend/Console.md b/frontend/Console.mdindex 982b6b84..381de880 100644--- a/frontend/Console.md+++ b/frontend/Console.md@@ -46,7 +46,7 @@ The state includes games, decoded SwiftUI artwork images, versions, platforms, rPass a publisher of `ConsoleInput` to the view for future controller events: left/right/up/down, activate, back, options and controllers. This adapter is intentionally absent. Every interactive element registers with `padTarget` in `console`, `console.options`, `console.controllers`, `console.explanation` or `console.entry`. The future controller adapter must intercept an assigning controller's button and call `assignPlayer(controllerID:player:)`, rather than treating it as generic activation. The real driver supplies controller connect/disconnect snapshots, short localized toasts and clock ticks. The mock exposes `connect` and `disconnect` events with a three-second toast lifetime. It never flashes, rumbles or disconnects real hardware.-The desktop's `ContentView(enterConsole:controllerDriver:)` button and controller-connect prompt report the injected entry intent only. The default closure is inert until the coordinator is wired. The prompt uses the launcher's existing connection observation, without adding hardware APIs. `ConsoleConnectionPrompt` is also independently renderable. Exiting the mock renders an explicit desktop preview, never constructs the real build launcher. Production navigation and actual window transitions belong to the coordinator. Inject `AnyConsoleDriver(realDriver)` to show the same controller snapshot in the desktop chips and `ConsoleControllersSheet`. With no injection, the desktop controller snapshot is empty. It never guesses controller identity from the existing boolean connection flag. The desktop sheet uses `ConsoleControllerList`, the very same view as console mode. A fixed-height controller strip occupies the second row of the top bar so four chips fit even at 900 points. Narrow windows use accessible icon actions in the first row, preserving the logo and avoiding wrapped navigation labels.+The desktop's `LauncherView(enterConsole:controllerDriver:)` button and controller-connect prompt report the injected entry intent only. The default closure is inert until the coordinator is wired. The prompt uses the launcher's existing connection observation, without adding hardware APIs. `ConsoleConnectionPrompt` is also independently renderable. Exiting the mock renders an explicit desktop preview, never constructs the real build launcher. Production navigation and actual window transitions belong to the coordinator. Inject `AnyConsoleDriver(realDriver)` to show the same controller snapshot in the desktop chips and `ConsoleControllersSheet`. With no injection, the desktop controller snapshot is empty. It never guesses controller identity from the existing boolean connection flag. The desktop sheet uses `ConsoleControllerList`, the very same view as console mode. A fixed-height controller strip occupies the second row of the top bar so four chips fit even at 900 points. Narrow windows use accessible icon actions in the first row, preserving the logo and avoiding wrapped navigation labels.## Designdiff --git a/frontend/Onboarding.md b/frontend/Onboarding.mdindex 5abe7110..9d94487b 100644--- a/frontend/Onboarding.md+++ b/frontend/Onboarding.md@@ -54,7 +54,7 @@ Persist the current step and selections before handling `skipForLater`, then inj## The real driver-`LiveOnboardingDriver` (`LiveOnboardingDriver.swift`) implements the contract over the launcher's own `LauncherStores` (its `BuildStore` and `DependencyStore`) and `GameLibrary`, which `RootView` shares with `ContentView`. Everything it does to the machine goes through `OnboardingEnvironment`, so the tests use fakes.+`LiveOnboardingDriver` (`LiveOnboardingDriver.swift`) implements the contract over the launcher's own `LauncherStores` (its `BuildStore` and `DependencyStore`) and `GameLibrary`, which `RootView` shares with `LauncherView`. Everything it does to the machine goes through `OnboardingEnvironment`, so the tests use fakes.- When it shows: on launch, unless `onboarding.completed` is set or setup is already complete (all tools present, a keys file known, a games folder set, and a complete one is marked done without being shown). Settings has "Run setup again". Set up later stores the step, platform and an in-progress flag in `UserDefaults`, and the next launch resumes there and revalidates (a stored step past Xcode returns to Xcode when Xcode no longer holds).- Detection and installs are `DependencyStore.check` / `deps` / `install`, one install at a time (Python, .NET, then Homebrew and the formulas). Homebrew waits for Xcode to be ready. The xcode row asks for the iOS SDK only when the stored platform is not Mac-only or builds target an iPhone (`LauncherStores.needsIOSPlatform`).diff --git a/frontend/Sources/NX2Apple/ConsoleEntryView.swift b/frontend/Sources/NX2Apple/ConsoleEntryView.swiftindex 8c38309f..a3c739bf 100644--- a/frontend/Sources/NX2Apple/ConsoleEntryView.swift+++ b/frontend/Sources/NX2Apple/ConsoleEntryView.swift@@ -96,7 +96,7 @@ struct ConsoleConnectionPrompt: View {}}-/// The demo reads covers from the repository's docs/images (RepoLayout.find, as the launcher does) and is otherwise isolated from ContentView: no stores, library discovery, controller adapter or process is made.+/// The demo reads covers from the repository's docs/images (RepoLayout.find, as the launcher does) and is otherwise isolated from LauncherView: no stores, library discovery, controller adapter or process is made.@MainActor struct ConsoleDemoView: View {@StateObject private var driver: MockConsoleDriverinit(scenario: MockConsoleDriver.Scenario) { _driver = StateObject(wrappedValue: MockConsoleDriver(scenario: scenario, artworkRepo: Optional(RepoLayout.find()).flatMap { $0.isEmpty ? nil : $0 })) }diff --git a/frontend/Sources/NX2Apple/LauncherView.swift b/frontend/Sources/NX2Apple/LauncherView.swiftindex 65856f49..9928a7dc 100644--- a/frontend/Sources/NX2Apple/LauncherView.swift+++ b/frontend/Sources/NX2Apple/LauncherView.swift@@ -40,7 +40,7 @@ enum LibraryFilter: String, CaseIterable, Identifiable {}}-struct ContentView: View {+struct LauncherView: View {private let stores: LauncherStores // the wiring: the stores below are its, the views take what they show@StateObject private var m: BuildStore // the build: the stages, the failure, the inputs@ObservedObject private var devices: DeviceStore // the copy card and the activity line while the data goes overdiff --git a/frontend/Sources/NX2Apple/ManageMenu.swift b/frontend/Sources/NX2Apple/ManageMenu.swiftindex 4bb3c493..31ee262f 100644--- a/frontend/Sources/NX2Apple/ManageMenu.swift+++ b/frontend/Sources/NX2Apple/ManageMenu.swift@@ -54,7 +54,7 @@ struct ManageItem: Identifiable {var padID: String { "manage." + id }}-/// What a controller's button does around the Manage menu; the rest of the launcher's routing stays in ContentView.padAction.+/// What a controller's button does around the Manage menu; the rest of the launcher's routing stays in LauncherView.padAction.enum ManagePad {enum Route: Equatable {case open // Y: open the selected game's menudiff --git a/frontend/Sources/NX2Apple/OnboardingRoot.swift b/frontend/Sources/NX2Apple/OnboardingRoot.swiftindex ff228fe0..cd2c28d4 100644--- a/frontend/Sources/NX2Apple/OnboardingRoot.swift+++ b/frontend/Sources/NX2Apple/OnboardingRoot.swift@@ -36,7 +36,7 @@ struct RootView: View {.onAppear { shared.console.reloadCovers() }.transition(CalmTransition.console)} else {- ContentView(stores: stores, library: library, onRunSetup: runSetupAgain, enterConsole: { console.enter() },+ LauncherView(stores: stores, library: library, onRunSetup: runSetupAgain, enterConsole: { console.enter() },controllerDriver: AnyConsoleDriver(shared.console), controls: shared.controls).transition(CalmTransition.desktop)}diff --git a/frontend/Tests/NX2AppleTests/BuildNotificationsTests.swift b/frontend/Tests/NX2AppleTests/BuildNotificationsTests.swiftindex f86f59cd..5484b8e5 100644--- a/frontend/Tests/NX2AppleTests/BuildNotificationsTests.swift+++ b/frontend/Tests/NX2AppleTests/BuildNotificationsTests.swift@@ -63,7 +63,7 @@ import NXModelMainActor.assumeIsolated { modelStores.dependencies.checked = true }MainActor.assumeIsolated { modelStores.dependencies.deps = [Dep(id: "test", name: "Xcode", hint: "", present: true, installCmd: [])] }let library = GameLibrary(file: temporary.appendingPathComponent("preview.json"))- let host = NSHostingView(rootView: ContentView(stores: modelStores, library: library, initialPage: .settings, performStartupChecks: false))+ let host = NSHostingView(rootView: LauncherView(stores: modelStores, library: library, initialPage: .settings, performStartupChecks: false))let window = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 1440, height: 1500), styleMask: [.titled, .closable, .resizable], backing: .buffered, defer: false)window.contentView = hostwindow.orderFront(nil)diff --git a/frontend/Tests/NX2AppleTests/ConsolePadTests.swift b/frontend/Tests/NX2AppleTests/ConsolePadTests.swiftindex 6dc0dac8..d4b73ce6 100644--- a/frontend/Tests/NX2AppleTests/ConsolePadTests.swift+++ b/frontend/Tests/NX2AppleTests/ConsolePadTests.swift@@ -203,9 +203,9 @@ import NXModellet library = GameLibrary(file: output.appendingPathComponent("unused-library.json"))// the bottom right shows the Home hint and the Console mode button while a controller is connected (this Mac's, when one is)for width: CGFloat in [1280, 900] {- try shot(AnyView(ContentView(stores: LauncherStores(), library: library, performStartupChecks: false, enterConsole: {})), "desktop-bar-\(Int(width))", width, 720)+ try shot(AnyView(LauncherView(stores: LauncherStores(), library: library, performStartupChecks: false, enterConsole: {})), "desktop-bar-\(Int(width))", width, 720)}- try shot(AnyView(ContentView(stores: LauncherStores(), library: library, performStartupChecks: false, enterConsole: {}, qaPrompt: true)), "prompt-windowed", 1000, 720)+ try shot(AnyView(LauncherView(stores: LauncherStores(), library: library, performStartupChecks: false, enterConsole: {}, qaPrompt: true)), "prompt-windowed", 1000, 720)for lang in [Lang.en, .zh] {try shot(AnyView(ConsoleConnectionPrompt(lang: lang, enterConsole: {}, dismissPrompt: {}).environmentObject(PadFocus()).preferredColorScheme(.dark)), "prompt-\(lang.rawValue)", 900, 500)}diff --git a/frontend/Tests/NX2AppleTests/ConsoleTests.swift b/frontend/Tests/NX2AppleTests/ConsoleTests.swiftindex 4491cc77..d2804d8f 100644--- a/frontend/Tests/NX2AppleTests/ConsoleTests.swift+++ b/frontend/Tests/NX2AppleTests/ConsoleTests.swift@@ -212,7 +212,7 @@ import NXModellet library = GameLibrary(file: output.appendingPathComponent("unused-library.json"))let driver = MockConsoleDriver(scenario: .controllersMixed, lang: lang, animated: false)driver.back()- let view = ContentView(stores: modelStores, library: library, performStartupChecks: false, controllerDriver: AnyConsoleDriver(driver))+ let view = LauncherView(stores: modelStores, library: library, performStartupChecks: false, controllerDriver: AnyConsoleDriver(driver))let host = NSHostingView(rootView: view)let window = NSWindow(contentRect: NSRect(x: -10000, y: 0, width: width, height: 800), styleMask: [.borderless], backing: .buffered, defer: false)window.isReleasedWhenClosed = falsediff --git a/frontend/Tests/NX2AppleTests/KeyCheckTests.swift b/frontend/Tests/NX2AppleTests/KeyCheckTests.swiftindex bbb4d4f0..3d196a21 100644--- a/frontend/Tests/NX2AppleTests/KeyCheckTests.swift+++ b/frontend/Tests/NX2AppleTests/KeyCheckTests.swift@@ -183,7 +183,7 @@ import NXModelmodel.slots[0].paths = [base]model.slots[1].paths = withUpdate ? [update] : []model.slots[3].paths = [try keysFile(keys)]- let host = NSHostingView(rootView: ContentView(stores: modelStores, library: library, initialPage: .builds, performStartupChecks: false))+ let host = NSHostingView(rootView: LauncherView(stores: modelStores, library: library, initialPage: .builds, performStartupChecks: false))let window = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 1440, height: 1024), styleMask: [.titled, .closable, .resizable], backing: .buffered, defer: false)window.contentView = hostwindow.orderFront(nil)diff --git a/frontend/Tests/NX2AppleTests/LauncherControlWidthTests.swift b/frontend/Tests/NX2AppleTests/LauncherControlWidthTests.swiftindex 6fb4fa70..02a3941c 100644--- a/frontend/Tests/NX2AppleTests/LauncherControlWidthTests.swift+++ b/frontend/Tests/NX2AppleTests/LauncherControlWidthTests.swift@@ -162,7 +162,7 @@ import NXModeltry scenario.set(modelStores, library, directory)model.lang = langlet samples = Samples()- let view = ContentView(stores: modelStores, library: library, initialPage: scenario.page, activeBuildID: nil, performStartupChecks: false,+ let view = LauncherView(stores: modelStores, library: library, initialPage: scenario.page, activeBuildID: nil, performStartupChecks: false,search: nil, olderTools: [], manageOpen: false, padRing: false).environment(\.measuresLauncherControls, true).onPreferenceChange(LauncherControlSamples.self) { samples.all = $0 }diff --git a/frontend/Tests/NX2AppleTests/LauncherPerformanceTests.swift b/frontend/Tests/NX2AppleTests/LauncherPerformanceTests.swiftindex 854ced6a..2d9608d4 100644--- a/frontend/Tests/NX2AppleTests/LauncherPerformanceTests.swift+++ b/frontend/Tests/NX2AppleTests/LauncherPerformanceTests.swift@@ -140,7 +140,7 @@ import NXModellet library = GameLibrary(file: world.libraryFile)library.selectedID = world.selectedlet pad = LauncherGamepad()- let host = NSHostingView(rootView: ContentView(stores: modelStores, library: library, performStartupChecks: false, gamepad: pad))+ let host = NSHostingView(rootView: LauncherView(stores: modelStores, library: library, performStartupChecks: false, gamepad: pad))let window = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 1280, height: 900), styleMask: [.titled, .closable, .resizable],backing: .buffered, defer: false)window.isReleasedWhenClosed = false@@ -201,7 +201,7 @@ import NXModel}if plists > step.plistReads {failures.append("\(step.name): \(plists) Info.plist reads, budget \(step.plistReads). LibraryGame.isReady and "- + "ContentView.status read the app bundle on every call. Call them less often per redraw or cache the result.")+ + "LauncherView.status read the app bundle on every call. Call them less often per redraw or cache the result.")}if parses > 0 {failures.append("\(step.name): \(parses) frame time recordings parsed on the main thread, budget 0. "diff --git a/frontend/Tests/NX2AppleTests/LibraryTests.swift b/frontend/Tests/NX2AppleTests/LibraryTests.swiftindex 9878a226..e6e028d3 100644--- a/frontend/Tests/NX2AppleTests/LibraryTests.swift+++ b/frontend/Tests/NX2AppleTests/LibraryTests.swift@@ -584,7 +584,7 @@ import NXModelmodel.slots[0].paths = [base.path]model.slots[3].paths = [keys.path]let library = GameLibrary(file: temporary.appendingPathComponent("library.json"))- let host = NSHostingView(rootView: ContentView(stores: modelStores, library: library, initialPage: .builds, performStartupChecks: false))+ let host = NSHostingView(rootView: LauncherView(stores: modelStores, library: library, initialPage: .builds, performStartupChecks: false))let window = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 1100, height: 800), styleMask: [.titled], backing: .buffered, defer: false)window.contentView = hostwindow.orderFront(nil)@@ -703,7 +703,7 @@ import NXModelStage(id: 3, name: "rewrite", state: .done, detail: "main, subsdk0, sdk"),Stage(id: 4, name: "shader split", state: .running, detail: "splitting · 10,577 / 41,062 files · 41s left", percent: 26)]library.selectedID = botwID- try shot("library", ContentView(stores: modelStores, library: library, activeBuildID: totkID, performStartupChecks: false), size: window)+ try shot("library", LauncherView(stores: modelStores, library: library, activeBuildID: totkID, performStartupChecks: false), size: window)model.running = false; model.stages = []// The build page, ready to start: example paths, not the user's@@ -716,7 +716,7 @@ import NXModelmodel.slots[0].paths = [nsp.path]; model.slots[1].paths = [update.path]; model.slots[3].paths = [keys.path]model.gameDir = "/Volumes/Games/Tears of the Kingdom"model.outDir = "/Volumes/Games"- try shot("build", ContentView(stores: modelStores, library: library, initialPage: .builds, performStartupChecks: false), size: NSSize(width: 1280, height: 940))+ try shot("build", LauncherView(stores: modelStores, library: library, initialPage: .builds, performStartupChecks: false), size: NSSize(width: 1280, height: 940))if let upscale = LaunchSetting.read(app: library.games.first { $0.id == botwID }!.appPath)?.first(where: { $0.env == "DM_PRESENT_UPSCALE" }) {SavedChoices(app: library.games.first { $0.id == botwID }!.appPath, titleID: "01007EF00011E000").set(upscale, "metalfx")@@ -760,7 +760,7 @@ import NXModelfunc capture(_ name: String, width: CGFloat = 1440, height: CGFloat = 1024, page: LauncherPage = .library, activeID: UUID? = nil, empty: Bool = false,search: String? = nil, older: Set<UUID> = [], manageOpen: Bool = false, padRing: Bool = false, only: GameLibrary? = nil) throws {let store = only ?? (empty ? GameLibrary(file: temporary.appendingPathComponent("empty.json")) : library)- let view = ContentView(stores: modelStores, library: store, initialPage: page, activeBuildID: activeID, performStartupChecks: false, search: search,+ let view = LauncherView(stores: modelStores, library: store, initialPage: page, activeBuildID: activeID, performStartupChecks: false, search: search,olderTools: older, manageOpen: manageOpen, padRing: padRing)let host = NSHostingView(rootView: view)let window = NSWindow(contentRect: NSRect(x: 0, y: 0, width: width, height: height),@@ -927,7 +927,7 @@ import NXModel_ = crowded.rememberInputs(model)}model.slots[0].paths = []- let view = ContentView(stores: modelStores, library: crowded, performStartupChecks: false)+ let view = LauncherView(stores: modelStores, library: crowded, performStartupChecks: false)let crowdedHost = NSHostingView(rootView: view)let crowdedWindow = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 1280, height: 900), styleMask: [.titled], backing: .buffered, defer: false)crowdedWindow.contentView = crowdedHost