Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
chore: clean up dead code, tests, docs and the build (#1919)
Raymond Chinaa1c722ca7eb
diff --git a/AGENTS.md b/AGENTS.mdindex 23ce790..a61178a 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -4,8 +4,8 @@ Bridgeplay runs Windows-only Steam games on Apple Silicon Macs inside the nativeclient. It turns on Steam Play in Mac Steam and runs games through CodeWeavers' WineCX withApple's Game Porting Toolkit (D3DMetal), DXMT or DXVK. It is a GPL-3.0 fork of[NotProton](https://github.com/NotProtonNot/NotProton). The user-facing overview is in-[README.md](README.md). `docs/DEVELOPING.md` is still the upstream README, so don't take build-steps from it.+[README.md](README.md). `docs/DEVELOPING.md` is the developer guide, and `docs/UPSTREAM.md`+keeps the old upstream README.## Where code lives@@ -16,7 +16,7 @@ steps from it.| `signatures/macos.arm64/` | Byte signatures the dylib resolves per Steam build | Read by the dylib || `lsteamclient/`, `steam-shim/`, `bridge/` | Proton's steamclient bridge and `steam.exe`, built against the Wine tree that `bridge/` sets up | Wine || `ntdll-patch/` | Detours patched into the engine's `ntdll.dll`; the prebuilt `detour*.bin` live in `app/Sources/BridgeplayApp/Resources/` | Wine |-| `*-patch/` (win32u, winemac, winebus, winecoreaudio, wined3d, ws2_32, ngx-signer) | Patches for single WineCX/WineHQ files. The rebuilt binaries are committed in `app/Sources/BridgeplayApp/Resources/` | Wine |+| `*-patch/` (win32u, winemac, winebus, winecoreaudio, wined3d, ws2_32, ngx-signer, d3dx11, hide-wine-exports) | Patches for single WineCX/WineHQ files. The rebuilt binaries are committed in `app/Sources/BridgeplayApp/Resources/` | Wine || `nvapi-shim/` | Windows `nvapi64.dll` that lets games use DLSS (answered by MetalFX) | Wine || `overlay-shim/` | HDR, Metal 4 and frame generation | Game process || `native-launch/`, `native-shim/` | Launch wrapper and gamepad shim for native Mac games | Native game process |@@ -52,15 +52,17 @@ make fonts # needs fontforge, gpatch, afdkomake app-payload app # out/Bridgeplay.app```-The checks the workflows run (`make -s <target>`):+The checks the workflows run (`make -s <target>`). `make ci-checks` runs all of them except the+lint targets, and its list is `CI_CHECKS` in the Makefile:- **Lint:** `scriptcheck`, `runcheck`- **App:** `mincheck`, `l10ncheck`, `app-tests` (the Swift tests)-- **C and shell suites:** `sigcheck`, `callscheck`, `webpatch-fixtures`, `peicon-fixtures`,- `panel-behavior`, `spawn-env`, `activatecheck`, `compatcheck`, `compatsvc-check`, `prefixstate-check`,+- **C, shell and Python suites:** `sigcheck`, `callscheck`, `np-test-batch-check`, `webpatch-fixtures`, `peicon-fixtures`,+ `panel-behavior`, `spawn-env`, `activatecheck`, `compat-reported-import-check`, `compatcheck`, `compatsvc-check`, `prefixstate-check`,`shortcutcheck`, `launch-shell`, `envcheck`, `buildcheck`, `settingscheck`, `routecheck`,- `bridgecheck`, `envpasscheck`, `prefixnotecheck`, `powernotecheck`, `exitcheck`, `launchprogresscheck`, `gamedrivecheck`, `launchercheck`, `seedcheck`, `gamefixescheck`, `versioncheck`, `cicheck`,- `compat-reported-check`+ `bridgecheck`, `envpasscheck`, `prefixnotecheck`, `powernotecheck`, `exitcheck`, `anticheatcheck`, `launchprogresscheck`, `gamedrivecheck`, `launchercheck`, `seedcheck`, `gamefixescheck`, `versioncheck`, `cicheck`,+ `padcheck`, `detourcheck`, `compat-reported-check`, `np-inventory-check`, `np-native-tests`, `native-shim-tests`,+ `native-installercheck``make tests-list` prints the test paths. A check whose tool or input is missing prints`skipped` and exits 0: that is not a pass. Install the tool, or say the check didn't run.diff --git a/Makefile b/Makefileindex bdd1b29..d33d1e2 100644--- a/Makefile+++ b/Makefile@@ -99,7 +99,8 @@ dylib: $(TARGET)$(APP_PAYLOAD):@mkdir -p $(APP_PAYLOAD)-TEST_PATHS := dylib/tests overlay-shim/tests app/Tests scripts/tests ntdll-patch/tests+TEST_PATHS := dylib/tests overlay-shim/tests app/Tests scripts/tests ntdll-patch/tests \+ native-launch/tests native-shim/tests installer/teststests-list:@for p in $(TEST_PATHS); do echo $$p; done@@ -219,7 +220,7 @@ l10ncheck:# runcheck owns compat_run.sh, whose warnings wait for a change that can move# the embedded __text baseline-SCRIPTS := $(shell git ls-files '*.sh' 2>/dev/null | grep -v '^dylib/feats/compat_run\.sh$$')+SCRIPTS := $(shell git ls-files '*.sh' '*.command' 2>/dev/null | grep -v '^dylib/feats/compat_run\.sh$$')scriptcheck:@if ! command -v shellcheck >/dev/null 2>&1; then \@@ -499,9 +500,9 @@ ntdll-resolve:echo "==> ntdll-resolve: $(CX_ROOT) not present, skipped (set CX_ROOT)"; exit 0; fi; \python3 ntdll-patch/resolve.py "$(CX_ROOT)"-$(ARM64_DYLIB): $(OBJS)+$(ARM64_DYLIB): $(OBJS) $(DOBBY_LIBS)@mkdir -p $(dir $@)- $(CC) $(LDFLAGS) -o $@ $^ $(DOBBY_LIBS) $(FRAMEWORKS) -lc+++ $(CC) $(LDFLAGS) -o $@ $^ $(FRAMEWORKS) -lc++$(X86_STUB): dylib/stub_x86_64.c@mkdir -p $(dir $@)@@ -696,6 +697,8 @@ fonts:fonts/build.shapp-payload: $(TARGET) $(OVERLAY_SHIM) $(ICONMAKER) $(APPINFO)+ @# A signature file deleted from the repo must not ship from the last payload.+ @test -n "$(APP_PAYLOAD)" && rm -rf "$(APP_PAYLOAD)/signatures"@mkdir -p "$(APP_PAYLOAD)/signatures/macos.arm64"@mkdir -p "$(APP_PAYLOAD)/bridge"@# Staged by 0.7.51 and earlier; left behind they fail the PAYLOAD_SIGN_IDS check.diff --git a/app/Sources/BridgeplayApp/Model/BrandMigration.swift b/app/Sources/BridgeplayApp/Model/BrandMigration.swiftindex 1ffe3b5..5a3abdf 100644--- a/app/Sources/BridgeplayApp/Model/BrandMigration.swift+++ b/app/Sources/BridgeplayApp/Model/BrandMigration.swift@@ -458,7 +458,7 @@ struct BrandMigration: Sendable {// MARK: Text helpers- // A line holding only a quoted key, as in SteamDefaultTool.+ // A line holding only a quoted key, which is a section name.static func quotedKey(_ line: String) -> String? {let trimmed = line.trimmingCharacters(in: .whitespaces)guard trimmed.count >= 2, trimmed.hasPrefix("\""), trimmed.hasSuffix("\""),diff --git a/app/Sources/BridgeplayApp/Model/CrossOverRow.swift b/app/Sources/BridgeplayApp/Model/CrossOverRow.swiftindex 6928ed9..2408148 100644--- a/app/Sources/BridgeplayApp/Model/CrossOverRow.swift+++ b/app/Sources/BridgeplayApp/Model/CrossOverRow.swift@@ -19,7 +19,6 @@ struct CrossOverRow: Identifiable, Equatable {let unsupportedVersion: String?var id: String { install?.id ?? buildID }- var build: RunnerBuild? { SupportedRunners.build(id: buildID) }var title: String {if let install { return install.name }diff --git a/app/Sources/BridgeplayApp/Model/CrossOverSource.swift b/app/Sources/BridgeplayApp/Model/CrossOverSource.swiftindex 8516d42..14cb839 100644--- a/app/Sources/BridgeplayApp/Model/CrossOverSource.swift+++ b/app/Sources/BridgeplayApp/Model/CrossOverSource.swift@@ -40,8 +40,6 @@ enum CrossOverSource {SupportPaths.home.appending(path: "Applications", directoryHint: .isDirectory),]- static var engineRoot: URL { SupportPaths.engines }-private static let manualKey = "manualCrossOverPaths"// 1.0/1.0.1 kept a single chosen copy under this key.private static let legacyManualKey = "manualCrossOverPath"@@ -106,7 +104,7 @@ enum CrossOverSource {}}- let engines = (try? fm.contentsOfDirectory(at: engineRoot, includingPropertiesForKeys: nil)) ?? []+ let engines = (try? fm.contentsOfDirectory(at: SupportPaths.engines, includingPropertiesForKeys: nil)) ?? []for entry in engines where entry.pathExtension == "app" {consider(entry, isManual: false)}diff --git a/app/Sources/BridgeplayApp/Model/FreeEngineWinecx.swift b/app/Sources/BridgeplayApp/Model/FreeEngineWinecx.swiftindex c582534..36e68fb 100644--- a/app/Sources/BridgeplayApp/Model/FreeEngineWinecx.swift+++ b/app/Sources/BridgeplayApp/Model/FreeEngineWinecx.swift@@ -93,9 +93,6 @@ enum FreeEngineWinecx {static let previous = v1115static let releases = [current, previous]- // The runner build of the current release.- static var runnerBuild: RunnerBuild { current.runner }- static var ntdllPatches: [NtdllPatch] { current.ntdllPatches }static var runnerBuilds: [RunnerBuild] { releases.map(\.runner) }static func release(build id: String) -> WinecxRelease? {diff --git a/app/Sources/BridgeplayApp/Model/FreeEngineWinecxD3DMetal.swift b/app/Sources/BridgeplayApp/Model/FreeEngineWinecxD3DMetal.swiftindex 1ae9933..898fdea 100644--- a/app/Sources/BridgeplayApp/Model/FreeEngineWinecxD3DMetal.swift+++ b/app/Sources/BridgeplayApp/Model/FreeEngineWinecxD3DMetal.swift@@ -378,8 +378,4 @@ enum WinecxD3DMetal {return nil}}-- static func isWinecx(root: URL) -> Bool {- FreeEngineWinecx.release(forRoot: root) != nil- }}diff --git a/app/Sources/BridgeplayApp/Model/NtdllPatcher.swift b/app/Sources/BridgeplayApp/Model/NtdllPatcher.swiftindex cc664f6..e0c3906 100644--- a/app/Sources/BridgeplayApp/Model/NtdllPatcher.swift+++ b/app/Sources/BridgeplayApp/Model/NtdllPatcher.swift@@ -373,10 +373,6 @@ enum NtdllPatcher {byBuild[build.id] ?? []}- static func patch(for arch: WineArch, in build: RunnerBuild) -> NtdllPatch? {- patches(for: build).first { $0.arch == arch }- }-// Patchstatic func apply(_ patch: NtdllPatch, to image: Data, payload: Data) throws -> Data {var bytes = [UInt8](image)diff --git a/app/Sources/BridgeplayApp/Model/PrefixStore.swift b/app/Sources/BridgeplayApp/Model/PrefixStore.swiftindex e9a392a..db6971d 100644--- a/app/Sources/BridgeplayApp/Model/PrefixStore.swift+++ b/app/Sources/BridgeplayApp/Model/PrefixStore.swift@@ -47,7 +47,6 @@ struct WinePrefix: Sendable, Hashable, Identifiable {struct PrefixUsage: Sendable {let bytes: Int64- let profileFiles: Int}struct PrefixBackup: Sendable, Hashable, Identifiable {@@ -293,15 +292,7 @@ enum PrefixStore {}static func usage(of prefix: WinePrefix) -> PrefixUsage {- let bytes = directoryBytes(prefix.pfx)-- var files = 0- let users = prefix.pfx.appending(path: "drive_c/users").path(percentEncoded: false)- if let out = try? Shell.check("/usr/bin/find", [users, "-type", "f"]) {- files = out.split(separator: "\n").filter { !$0.isEmpty }.count- }-- return PrefixUsage(bytes: bytes, profileFiles: files)+ PrefixUsage(bytes: directoryBytes(prefix.pfx))}enum SizeMetric {diff --git a/app/Sources/BridgeplayApp/Model/RunnerPatcher.swift b/app/Sources/BridgeplayApp/Model/RunnerPatcher.swiftindex c4e4a75..0c7326f 100644--- a/app/Sources/BridgeplayApp/Model/RunnerPatcher.swift+++ b/app/Sources/BridgeplayApp/Model/RunnerPatcher.swift@@ -25,10 +25,6 @@ enum RunnerPatcher {return present.isEmpty ? ["x86_64-unix"] : present}- static func unixArch(in root: URL) -> String {- unixArches(in: root)[0]- }-struct Outcome: Sendable {var ntdll: [WineArch] = []var builtins: [String] = []diff --git a/app/Sources/BridgeplayApp/Model/SteamDefaultTool.swift b/app/Sources/BridgeplayApp/Model/SteamDefaultTool.swiftindex 7d6f7d2..1e91d12 100644--- a/app/Sources/BridgeplayApp/Model/SteamDefaultTool.swift+++ b/app/Sources/BridgeplayApp/Model/SteamDefaultTool.swift@@ -97,10 +97,10 @@ enum SteamDefaultTool {var ranges: [ClosedRange<Int>] = []var index = open + 1while index < close {- guard indent(lines[index]) == depth, key(lines[index]) != nil,+ guard indent(lines[index]) == depth, BrandMigration.quotedKey(lines[index]) != nil,let entryOpen = openBrace(lines, after: index), let entryClose = closeBrace(lines, open: entryOpen)else { index += 1; continue }- if key(lines[index]) != "0", lines[entryOpen + 1 ..< entryClose].contains(where: {+ if BrandMigration.quotedKey(lines[index]) != "0", lines[entryOpen + 1 ..< entryClose].contains(where: {guard let (field, value, _) = BrandMigration.keyValue($0) else { return false }return field.lowercased() == "name" && ToolName.isOurs(value)}) { ranges.append(index ... entryClose) }@@ -182,7 +182,7 @@ enum SteamDefaultTool {else { return nil }let entryDepth = indent(lines[mapping]) + 1guard let zero = (open + 1 ..< close).first(where: {- indent(lines[$0]) == entryDepth && key(lines[$0]) == "0"+ indent(lines[$0]) == entryDepth && BrandMigration.quotedKey(lines[$0]) == "0"}), let zeroOpen = openBrace(lines, after: zero), let zeroClose = closeBrace(lines, open: zeroOpen)else { return nil }return (zero, zeroClose)@@ -200,20 +200,11 @@ enum SteamDefaultTool {]}- // A line holding only a quoted key (a section name), compared case-insensitively as- // Steam's KeyValues does.- private static func key(_ line: String) -> String? {- let trimmed = line.trimmingCharacters(in: .whitespaces)- guard trimmed.count >= 2, trimmed.hasPrefix("\""), trimmed.hasSuffix("\""),- trimmed.dropFirst().dropLast().contains("\"") == false- else { return nil }- return String(trimmed.dropFirst().dropLast())- }-+ // Section names compare case-insensitively, as Steam's KeyValues does.private static func keyLine(_ lines: [String], _ name: String, from start: Int) -> Int? {guard start < lines.count else { return nil }return (start ..< lines.count).first {- key(lines[$0])?.caseInsensitiveCompare(name) == .orderedSame+ BrandMigration.quotedKey(lines[$0])?.caseInsensitiveCompare(name) == .orderedSame&& openBrace(lines, after: $0) == $0 + 1}}diff --git a/app/Sources/BridgeplayApp/Model/ValvePackageManifest.swift b/app/Sources/BridgeplayApp/Model/ValvePackageManifest.swiftindex 680fa59..f3930be 100644--- a/app/Sources/BridgeplayApp/Model/ValvePackageManifest.swift+++ b/app/Sources/BridgeplayApp/Model/ValvePackageManifest.swift@@ -30,10 +30,6 @@ struct ValvePackageManifest: Sendable {let files: [ValveFile]let bundle: ValveBundle?- func package(id: String) -> ValvePackage? {- packages.first { $0.id == id }- }-func innerPaths(package id: String) -> [String] {var seen = Set<String>()return files.filter { $0.package == id }.compactMap { seen.insert($0.innerPath).inserted ? $0.innerPath : nil }diff --git a/app/Sources/BridgeplayApp/PrefixesModel.swift b/app/Sources/BridgeplayApp/PrefixesModel.swiftindex a93ef00..6ecb0c8 100644--- a/app/Sources/BridgeplayApp/PrefixesModel.swift+++ b/app/Sources/BridgeplayApp/PrefixesModel.swift@@ -36,8 +36,6 @@ final class PrefixesModel {var outcome: String?private(set) var report: FailureReport?- var failure: String? { report?.message }-var selection = Set<WinePrefix.ID>()var pendingConfirmation: Confirmation?diff --git a/app/Sources/BridgeplayApp/SetupAssistant.swift b/app/Sources/BridgeplayApp/SetupAssistant.swiftindex d621cbd..44d2ce5 100644--- a/app/Sources/BridgeplayApp/SetupAssistant.swift+++ b/app/Sources/BridgeplayApp/SetupAssistant.swift@@ -51,7 +51,6 @@ final class SetupAssistant {// Graphicsvar gptk: WinecxD3DMetal.Payload?var gptkImages: [URL]- var skippedGraphics = false// "Installing the Game Porting Toolkit" once the components download is done.var gptkProgress: String?@ObservationIgnored private var componentsRate = DownloadRate()@@ -266,7 +265,7 @@ final class SetupAssistant {}.value} catch {AppLog.note("setup: components failed: \(error.localizedDescription)")- // The script's own reason, without the core's generic sentence in front of it.+ // The step's own reason, without the core's generic sentence in front of it.let detail = if case InstallerError.componentsFailure(let reason)? = error as? InstallerError { reason }else { error.localizedDescription }message = String(localized: "The Game Porting Toolkit wasn't added. \(detail)")diff --git a/app/Sources/BridgeplayApp/Support/GameDefaults.swift b/app/Sources/BridgeplayApp/Support/GameDefaults.swiftindex 5728836..86d820b 100644--- a/app/Sources/BridgeplayApp/Support/GameDefaults.swift+++ b/app/Sources/BridgeplayApp/Support/GameDefaults.swift@@ -203,10 +203,6 @@ enum GameDefaults {return lines.isEmpty ? "" : lines.joined(separator: "\n") + "\n"}- static func setting(_ setting: Setting, to on: Bool, in text: String, shipped: String = "") -> String {- Self.setting(setting, to: on ? "1" : "0", in: text, shipped: shipped)- }-// Every setting back to Bridgeplay's defaults; lines for other keys stay.static func resettingAll(in text: String) -> String {Setting.allCases.reduce(text) { Self.setting($1, to: nil, in: $0) }diff --git a/app/Sources/BridgeplayApp/Support/PostUpdateRefresh.swift b/app/Sources/BridgeplayApp/Support/PostUpdateRefresh.swiftindex e2ff48f..485f56e 100644--- a/app/Sources/BridgeplayApp/Support/PostUpdateRefresh.swift+++ b/app/Sources/BridgeplayApp/Support/PostUpdateRefresh.swift@@ -8,12 +8,14 @@ import Sparkle// once, and only when nothing would be interrupted or asked: Steam is closed, no game or// Wine tool is running, a compatibility tool exists (so no activation question), and the// installed content does not block installation. Otherwise the Status row keeps showing-// "Update available" with its install button, as before.+// "Update available" with its install button. While Steam or a game runs, SteamPatchKeeper+// also shows a banner and re-applies by itself once both close, with no relaunch.enum PostUpdateRefresh {enum Decision: Equatable, Sendable {case install- // Steam or a game is running; try again on the next launch.+ // Steam or a game is running. SteamPatchKeeper re-applies once both close, and this+ // tries again on the next launch.case waitcase nothing}diff --git a/app/Sources/BridgeplayApp/Support/SupportPaths.swift b/app/Sources/BridgeplayApp/Support/SupportPaths.swiftindex fea3e01..262d091 100644--- a/app/Sources/BridgeplayApp/Support/SupportPaths.swift+++ b/app/Sources/BridgeplayApp/Support/SupportPaths.swift@@ -58,7 +58,8 @@ enum SupportPaths {static var engines: URL { support.appending(path: "engines") }// Per-game defaults Bridgeplay ships. Replaced on every install; the user's own// overrides live in the sibling "gamefixes" directory. Bridgeplay writes there only the- // lines of default.conf that GameDefaults owns, and keeps everything else as it is.+ // lines GameDefaults owns, in default.conf and, on Use Defaults, in a game's <appid>.conf,+ // and keeps everything else as it is.static var gamefixesDefault: URL { support.appending(path: "gamefixes-default") }static var gamefixes: URL { support.appending(path: "gamefixes") }// Where Remove Everything moves the user's own overrides, outside the folder it deletes.diff --git a/app/Sources/BridgeplayApp/Support/UpdateEverything.swift b/app/Sources/BridgeplayApp/Support/UpdateEverything.swiftindex 96cf13b..cc3f36c 100644--- a/app/Sources/BridgeplayApp/Support/UpdateEverything.swift+++ b/app/Sources/BridgeplayApp/Support/UpdateEverything.swift@@ -2,10 +2,10 @@ import Foundation// Brings everything this Bridgeplay ships up to date in one go: the patch inside Steam, then// every engine that is unpacked but no longer matches this build's pins (a release that-// rebuilt a Wine file or moved to a newer runtime). It uses the Status page's own buttons, so-// it refuses what they refuse, and it does nothing while Steam, a game or a Wine tool runs;-// the Status rows keep offering the update until then. An engine the user never set up is-// left alone.+// rebuilt a Wine file). It uses the Status page's own buttons, so it refuses what they+// refuse, and it does nothing while Steam, a game or a Wine tool runs; the Status rows keep+// offering the update until then. An engine the user never set up is left alone, and so is+// a newer runtime: it has a new build id, so it reads as missing.extension SystemStatus {enum UpdatePlan: Equatable, Sendable {diff --git a/app/Sources/BridgeplayApp/SystemStatus.swift b/app/Sources/BridgeplayApp/SystemStatus.swiftindex 41678d0..5d08f6d 100644--- a/app/Sources/BridgeplayApp/SystemStatus.swift+++ b/app/Sources/BridgeplayApp/SystemStatus.swift@@ -157,6 +157,8 @@ final class SystemStatus {var id: Self { self }}+ // A second ask replaces the first rather than queueing behind it, so the dialog on screen+ // is always the one that will run if it is confirmed.var pendingConfirmation: Confirmation?var generation = 0@@ -377,10 +379,7 @@ final class SystemStatus {clearFailure()outcome = nil- func same(_ a: URL, _ b: URL) -> Bool {- a.standardizedFileURL.path(percentEncoded: false) == b.standardizedFileURL.path(percentEncoded: false)- }- guard !same(picked, current) else { return }+ guard !CrossOverSource.same(picked, current) else { return }if SupportPaths.Steam.isUnreachable(current) {let alert = NSAlert()alert.messageText = String(localized: "Steam at \(current.path(percentEncoded: false)) isn't connected.")@@ -398,7 +397,7 @@ final class SystemStatus {return}- if same(picked, SupportPaths.Steam.defaultApp) {+ if CrossOverSource.same(picked, SupportPaths.Steam.defaultApp) {UserDefaults.standard.removeObject(forKey: SupportPaths.Steam.appPathKey)} else {UserDefaults.standard.set(picked.path(percentEncoded: false), forKey: SupportPaths.Steam.appPathKey)diff --git a/app/Sources/BridgeplayApp/Views/SetupAssistantView.swift b/app/Sources/BridgeplayApp/Views/SetupAssistantView.swiftindex 14b0b2b..b33952d 100644--- a/app/Sources/BridgeplayApp/Views/SetupAssistantView.swift+++ b/app/Sources/BridgeplayApp/Views/SetupAssistantView.swift@@ -483,7 +483,7 @@ struct SetupAssistantView: View {.keyboardShortcut(.defaultAction)case .graphics:if model.gptk == nil {- Button("Skip") { go(forward: true) { model.skippedGraphics = true; model.advance() } }+ Button("Skip") { go(forward: true) { model.advance() } }.buttonStyle(.pillSecondaryLarge).disabled(model.isWorking)}diff --git a/app/Sources/BridgeplayInstallerCore/InstallerComponents.swift b/app/Sources/BridgeplayInstallerCore/InstallerComponents.swiftindex 509685a..1191dfa 100644--- a/app/Sources/BridgeplayInstallerCore/InstallerComponents.swift+++ b/app/Sources/BridgeplayInstallerCore/InstallerComponents.swift@@ -72,7 +72,7 @@ public struct InstallerComponents: Sendable, Equatable {}/// Download to a file in `directory` and verify it. Throws without leaving the file on failure.- public func download(to directory: URL, session: URLSession = .shared, control: InstallerDownloadControl? = nil,+ public func download(to directory: URL, control: InstallerDownloadControl? = nil,progress: @escaping @Sendable (InstallerDownloadProgress) -> Void = { _ in }) async throws -> URL {var request = URLRequest(url: archiveURL)request.timeoutInterval = 60@@ -124,21 +124,13 @@ public struct InstallerComponents: Sendable, Equatable {/// place (ComponentsPlacement). `status` gets each step as it starts.public static func install(archive: URL, work: URL, status: @escaping @Sendable (String) -> Void = { _ in },download: @escaping @Sendable (InstallerDownloadProgress) -> Void = { _ in }) throws {- try install(archive: archive, work: work, status: status, download: download) { _ in }- }-- static func install(archive: URL, work: URL, status: @escaping @Sendable (String) -> Void,- download: @escaping @Sendable (InstallerDownloadProgress) -> Void,- configure: (inout ComponentsPlacement) -> Void) throws {let unpacked = work.appending(path: "components")try? FileManager.default.removeItem(at: unpacked)try FileManager.default.createDirectory(at: unpacked, withIntermediateDirectories: true)try run("/usr/bin/ditto", ["-x", "-k", archive.path, unpacked.path])let source = unpacked.appending(path: "Bridgeplay")try verifyAppleSigned(gptk: source.appending(path: "gptk"))- var placement = ComponentsPlacement(source: source)- configure(&placement)- try placement.place(status: status, download: download)+ try ComponentsPlacement(source: source).place(status: status, download: download)}/// GPTK ships unmodified: D3DMetal.framework and every other Mach-O file must carry Apple's@@ -176,12 +168,11 @@ public struct InstallerComponents: Sendable, Equatable {}@discardableResult- static func run(_ executable: String, _ arguments: [String], environment: [String: String]? = nil,+ static func run(_ executable: String, _ arguments: [String],line: @escaping @Sendable (String) -> Void = { _ in }) throws -> String {let process = Process()process.executableURL = URL(fileURLWithPath: executable)process.arguments = arguments- if let environment { process.environment = environment }let pipe = Pipe()process.standardOutput = pipeprocess.standardError = pipe@@ -190,9 +181,7 @@ public struct InstallerComponents: Sendable, Equatable {var all = ""var pending = ""while case let chunk = pipe.fileHandleForReading.availableData, !chunk.isEmpty {- // Strip the script's colour codes before reading its lines.let text = String(decoding: chunk, as: UTF8.self)- .replacingOccurrences(of: #"\u{1B}\[[0-9;]*m"#, with: "", options: .regularExpression)all += textpending += textwhile let newline = pending.firstIndex(where: { $0 == "\n" || $0 == "\r" }) {@@ -202,8 +191,8 @@ public struct InstallerComponents: Sendable, Equatable {}process.waitUntilExit()guard process.terminationStatus == 0 else {- let reason = all.split(separator: "\n").last { $0.contains("Gagal:") || !$0.trimmingCharacters(in: .whitespaces).isEmpty }- throw InstallerError.componentsFailure(reason.map { String($0).replacingOccurrences(of: "Gagal: ", with: "") } ?? "exit \(process.terminationStatus)")+ let reason = all.split(separator: "\n").last { !$0.trimmingCharacters(in: .whitespaces).isEmpty }+ throw InstallerError.componentsFailure(reason.map(String.init) ?? "exit \(process.terminationStatus)")}return all}diff --git a/app/Sources/BridgeplayInstallerCore/InstallerRelease.swift b/app/Sources/BridgeplayInstallerCore/InstallerRelease.swiftindex a165179..1c45c75 100644--- a/app/Sources/BridgeplayInstallerCore/InstallerRelease.swift+++ b/app/Sources/BridgeplayInstallerCore/InstallerRelease.swift@@ -151,7 +151,6 @@ public struct InstallerRelease: Sendable, Equatable {/// (Reading the response byte by byte held a fast connection to about 0.5 MB/s.)public func download(to destination: URL,- session: URLSession = .shared,control: InstallerDownloadControl? = nil,progress: @escaping @Sendable (InstallerDownloadProgress) -> Void = { _ in }) async throws -> URL {@@ -173,7 +172,7 @@ public struct InstallerRelease: Sendable, Equatable {// 206: a resumed download (InstallerFileDownload).guard let http = response as? HTTPURLResponse, [200, 206].contains(http.statusCode),- let finalURL = http.url, Self.isArchiveResponseURL(finalURL) else {+ let finalURL = http.url, Self.isGitHubResponseURL(finalURL) else {throw InstallerError.invalidRelease}if response.expectedContentLength > Self.maximumArchiveLength { throw InstallerError.archiveTooLarge }@@ -241,10 +240,6 @@ public struct InstallerRelease: Sendable, Equatable {|| host.hasSuffix(".githubusercontent.com")}- private static func isArchiveResponseURL(_ url: URL) -> Bool {- isGitHubResponseURL(url)- }-private static func isVersion(_ text: String) -> Bool {let components = text.split(separator: ".", omittingEmptySubsequences: false)return (2...3).contains(components.count)diff --git a/app/Sources/BridgeplayUI/BridgeplayTheme.swift b/app/Sources/BridgeplayUI/BridgeplayTheme.swiftindex 261657c..1a0d375 100644--- a/app/Sources/BridgeplayUI/BridgeplayTheme.swift+++ b/app/Sources/BridgeplayUI/BridgeplayTheme.swift@@ -24,10 +24,6 @@ public enum BP {public static let iridescentDiagonal = LinearGradient(colors: [violet, blue, pink], startPoint: .topLeading, endPoint: .bottomTrailing)public static let radius: CGFloat = 12- public static let controlRadius: CGFloat = 8-- // cubic-bezier(0.16, 1, 0.3, 1), the site's --ease-out.- public static let easeOut = Animation.timingCurve(0.16, 1, 0.3, 1, duration: 0.5)public static func sans(_ size: CGFloat, _ weight: Font.Weight = .regular) -> Font {registerFonts()diff --git a/app/Tests/BridgeplayAppTests/FreeEngineTests.swift b/app/Tests/BridgeplayAppTests/FreeEngineTests.swiftindex 7a221ed..bddabb7 100644--- a/app/Tests/BridgeplayAppTests/FreeEngineTests.swift+++ b/app/Tests/BridgeplayAppTests/FreeEngineTests.swift@@ -246,6 +246,8 @@ struct FreeEngineTests {@Test("Stripping the builtin marker turns a builtin PE into a native one and refuses anything else")func stripsBuiltinMarker() throws {+ let dir = try scratchDirectory("pe")+ defer { try? FileManager.default.removeItem(at: dir) }var image = Data(repeating: 0, count: 0x80)image[0] = 0x4dimage[1] = 0x5a@@ -255,14 +257,14 @@ struct FreeEngineTests {#expect(Array(stripped[0x40 ..< 0x50]) == FreeEngine.dosStub)#expect(stripped.count == image.count)#expect(stripped[0x50...] == image[0x50...])- #expect(!WinecxD3DMetal.isBuiltin(try write(stripped)))- #expect(WinecxD3DMetal.isBuiltin(try write(image)))+ #expect(!WinecxD3DMetal.isBuiltin(try write(stripped, in: dir)))+ #expect(WinecxD3DMetal.isBuiltin(try write(image, in: dir)))// Already native: refused, so a pin mismatch cannot be papered over.#expect(throws: StepFailure.self) { try FreeEngine.stripBuiltinMarker(&stripped) }}- private func write(_ data: Data) throws -> URL {- let url = FileManager.default.temporaryDirectory.appending(path: "np-pe-\(UUID().uuidString).dll")+ private func write(_ data: Data, in dir: URL) throws -> URL {+ let url = dir.appending(path: "\(UUID().uuidString).dll")try data.write(to: url)return url}diff --git a/app/Tests/BridgeplayAppTests/FreeEngineWinecxTests.swift b/app/Tests/BridgeplayAppTests/FreeEngineWinecxTests.swiftindex 732aa67..d4670f4 100644--- a/app/Tests/BridgeplayAppTests/FreeEngineWinecxTests.swift+++ b/app/Tests/BridgeplayAppTests/FreeEngineWinecxTests.swift@@ -32,7 +32,6 @@ struct FreeEngineWinecxTests {func currentAndPrevious() throws {#expect(FreeEngineWinecx.current.build == "winecx-11.17")#expect(FreeEngineWinecx.previous.build == "winecx-11.15")- #expect(FreeEngineWinecx.runnerBuild == FreeEngineWinecx.current.runner)#expect(FreeEngineWinecx.current.runner.tools.map(\.name) == ["bridgeplay-proton-winecx-11.17"])#expect(FreeEngineWinecx.previous.runner.tools.map(\.name) == ["bridgeplay-proton-winecx"])let current = FreeEngineWinecx.current.runner@@ -76,7 +75,6 @@ struct FreeEngineWinecxTests {#expect(CrossOverLicense.freeBuild(at: root) == nil)#expect(!CrossOverLicense.check(crossOverRoot: root, searchDirs: []).licensed)#expect(!FreeEngineWinecx.isInstalled(release, engines: engines))- #expect(!WinecxD3DMetal.isWinecx(root: root))#expect(FreeEngineWinecx.release(forRoot: root) == nil)}}diff --git a/app/Tests/BridgeplayAppTests/GameDefaultsTests.swift b/app/Tests/BridgeplayAppTests/GameDefaultsTests.swiftindex a7da077..38d5e10 100644--- a/app/Tests/BridgeplayAppTests/GameDefaultsTests.swift+++ b/app/Tests/BridgeplayAppTests/GameDefaultsTests.swift@@ -13,16 +13,16 @@ import Testing@Test func keepsEveryOtherLineAndReplacesOnlyItsOwn() {let text = "# mine\nMTL_HUD_ENABLED=1\nRETINA=1\nBRIDGEPLAY_RETINA=1\nROSETTA_ADVERTISE_AVX=1\n"- let off = GameDefaults.setting(.highResolution, to: false, in: text)+ let off = GameDefaults.setting(.highResolution, to: "0", in: text)#expect(off == "# mine\nMTL_HUD_ENABLED=1\nROSETTA_ADVERTISE_AVX=1\n")- let on = GameDefaults.setting(.metalHUD, to: true, in: "# mine\nROSETTA_ADVERTISE_AVX=1")+ let on = GameDefaults.setting(.metalHUD, to: "1", in: "# mine\nROSETTA_ADVERTISE_AVX=1")#expect(on == "# mine\nROSETTA_ADVERTISE_AVX=1\nMTL_HUD_ENABLED=1\n")}@Test func startsANewFileWithItsHeaderAndEmptiesItWhenAllIsOff() {- let on = GameDefaults.setting(.metalHUD, to: true, in: "")+ let on = GameDefaults.setting(.metalHUD, to: "1", in: "")#expect(on == GameDefaults.header + "\nMTL_HUD_ENABLED=1\n")- #expect(GameDefaults.setting(.metalHUD, to: false, in: "MTL_HUD_ENABLED=1\n") == "")+ #expect(GameDefaults.setting(.metalHUD, to: "0", in: "MTL_HUD_ENABLED=1\n") == "")}@Test func writesAndReadsBackAFile() throws {@@ -41,11 +41,11 @@ import Testing@Test func offOverAShippedOnIsWrittenAsZero() {let shipped = "NVAPI=1\nROSETTA_ADVERTISE_AVX=1\n"#expect(GameDefaults.isOn(.nvapi, in: "", shipped: shipped))- let off = GameDefaults.setting(.nvapi, to: false, in: "", shipped: shipped)+ let off = GameDefaults.setting(.nvapi, to: "0", in: "", shipped: shipped)#expect(off == GameDefaults.header + "\nNVAPI=0\n")#expect(!GameDefaults.isOn(.nvapi, in: off, shipped: shipped))// Back on is what the shipped file already gives, so the line goes.- #expect(GameDefaults.setting(.nvapi, to: true, in: off, shipped: shipped) == GameDefaults.header + "\n")+ #expect(GameDefaults.setting(.nvapi, to: "1", in: off, shipped: shipped) == GameDefaults.header + "\n")}@Test func resetRemovesTheLineWhateverItSays() {@@ -57,8 +57,8 @@ import Testing@Test func choicesAndTheirFallbacks() {#expect(GameDefaults.setting(.backend, to: "dxvk", in: "") == GameDefaults.header + "\nBACKEND=dxvk\n")// Protect UI is on when unset, so on writes nothing and off writes 0.- #expect(GameDefaults.setting(.frameGenUI, to: true, in: "") == "")- #expect(GameDefaults.setting(.frameGenUI, to: false, in: "") == GameDefaults.header + "\nFRAMEGEN_UI=0\n")+ #expect(GameDefaults.setting(.frameGenUI, to: "1", in: "") == "")+ #expect(GameDefaults.setting(.frameGenUI, to: "0", in: "") == GameDefaults.header + "\nFRAMEGEN_UI=0\n")#expect(GameDefaults.setting(.frameGenQuality, to: "balanced", in: "") == "")#expect(GameDefaults.value(.frameGen, in: "BRIDGEPLAY_FRAMEGEN=1\n") == "2")}diff --git a/app/Tests/BridgeplayAppTests/NtdllPatcherTests.swift b/app/Tests/BridgeplayAppTests/NtdllPatcherTests.swiftindex 4991e84..c79987c 100644--- a/app/Tests/BridgeplayAppTests/NtdllPatcherTests.swift+++ b/app/Tests/BridgeplayAppTests/NtdllPatcherTests.swift@@ -321,9 +321,6 @@ struct NtdllPatcherTests {let patched = Set(NtdllPatcher.patches(for: build).map(\.arch))#expect(patched == Set(build.cleanNtdll.keys))#expect(patched == Set(build.patchedNtdll.keys))- for arch in patched {- #expect(NtdllPatcher.patch(for: arch, in: build) != nil)- }}#expect(!NtdllPatcher.patches(for: SupportedRunners.all[0]).isEmpty)}diff --git a/app/Tests/BridgeplayAppTests/PinnedDownloadTests.swift b/app/Tests/BridgeplayAppTests/PinnedDownloadTests.swiftindex e45dabc..3ea9f16 100644--- a/app/Tests/BridgeplayAppTests/PinnedDownloadTests.swift+++ b/app/Tests/BridgeplayAppTests/PinnedDownloadTests.swift@@ -221,6 +221,40 @@ struct PinnedDownloadTests {#expect(try String(contentsOf: got, encoding: .utf8) == body)}+ @Test("A cached archive that fails its pin is fetched again and replaced")+ func replacesBadCache() async throws {+ let work = try scratchDirectory("pinned")+ defer { try? FileManager.default.removeItem(at: work) }++ let body = "the real package"+ let serving = try host(work, named: "package.tar", serving: body)+ let downloads = work.appending(path: "downloads")+ try FileManager.default.createDirectory(at: downloads, withIntermediateDirectories: true)+ try Data("the real pack".utf8).write(to: downloads.appending(path: "package.tar"))++ let got = try await obtain(+ bases: [serving], into: downloads, sha256: Digest.sha256(of: Data(body.utf8))+ )++ #expect(try String(contentsOf: got, encoding: .utf8) == body)+ }++ @Test("A cached archive that fails its pin is refused when no host can replace it")+ func refusesBadCacheWithNoHost() async throws {+ let work = try scratchDirectory("pinned")+ defer { try? FileManager.default.removeItem(at: work) }++ let downloads = work.appending(path: "downloads")+ try FileManager.default.createDirectory(at: downloads, withIntermediateDirectories: true)+ try Data("the real pack".utf8).write(to: downloads.appending(path: "package.tar"))++ await #expect(throws: StepFailure.self) {+ try await obtain(+ bases: [], into: downloads, sha256: Digest.sha256(of: Data("the real package".utf8))+ )+ }+ }+@Test("An archive already on disk that matches is not fetched again")func reusesMatchingArchive() async throws {let work = try scratchDirectory("pinned")diff --git a/app/Tests/BridgeplayAppTests/PrefixStoreTests.swift b/app/Tests/BridgeplayAppTests/PrefixStoreTests.swiftindex f3c6b10..b8b0632 100644--- a/app/Tests/BridgeplayAppTests/PrefixStoreTests.swift+++ b/app/Tests/BridgeplayAppTests/PrefixStoreTests.swift@@ -221,11 +221,7 @@ struct PrefixStoreTests {at: profile.appending(path: "Documents"), withDestinationURL: outside)let prefix = try #require(PrefixStore.all(libraries: [library]).first)- let usage = PrefixStore.usage(of: prefix)-- // The one real file under the profile, and neither file behind the link.- #expect(usage.profileFiles == 1)- #expect(usage.bytes > 0)+ #expect(PrefixStore.usage(of: prefix).bytes > 0)}@Test("A linked folder outside the prefix adds nothing to its size")@@ -425,7 +421,6 @@ struct PrefixStoreTests {let clock = PrefixStore.backupClock()#expect(details[0].taken == clock.date(from: "20260101-120000"))#expect(details[1].taken == clock.date(from: "20260102-133000"))- #expect(PrefixStore.usage(of: prefix).profileFiles == 1)}@Test("A parked prefix with no readable stamp still lists, without a date")diff --git a/app/Tests/BridgeplayAppTests/PrefixesModelTests.swift b/app/Tests/BridgeplayAppTests/PrefixesModelTests.swiftindex ce3af91..673ace8 100644--- a/app/Tests/BridgeplayAppTests/PrefixesModelTests.swift+++ b/app/Tests/BridgeplayAppTests/PrefixesModelTests.swift@@ -406,7 +406,7 @@ struct PrefixesModelTests {await model.backUp([first])#expect(model.outcome == "Backed up the prefix for \(first.title).")- #expect(model.failure == nil)+ #expect(model.report?.message == nil)await model.backUp(targets)#expect(model.outcome == "Backed up 2 prefixes.")@@ -436,7 +436,7 @@ struct PrefixesModelTests {#expect(model.outcome == "Rebuilt 3 prefixes. Each original is kept beside the game's "+ "prefix. Check that your saves are present in the games, then delete the backups "+ "to save space.")- #expect(model.failure == nil)+ #expect(model.report?.message == nil)#expect(model.busy.isEmpty)#expect(!model.isBusy)}@@ -460,7 +460,7 @@ struct PrefixesModelTests {#expect(model.outcome == "Rebuilt 2 prefixes. Each original is kept beside the game's "+ "prefix. Check that your saves are present in the games, then delete the backups "+ "to save space.")- #expect(model.failure == "1649240 refused")+ #expect(model.report?.message == "1649240 refused")#expect(model.busy.isEmpty)}@@ -506,7 +506,7 @@ struct PrefixesModelTests {#expect(model.outcome == "Rebuilt the prefix for \(target.title). The original is at "+ "\(backup). Check that your save is present in the game, then delete the backup "+ "to save space.")- #expect(model.failure == nil)+ #expect(model.report?.message == nil)}@Test("A rebuild that parked nothing says nothing about a backup")@@ -555,7 +555,7 @@ struct PrefixesModelTests {await model.deleteBackups(model.backups)#expect(model.outcome == "Deleted 4 backups across 2 prefixes.")- #expect(model.failure == nil)+ #expect(model.report?.message == nil)#expect(model.backups.isEmpty)#expect(model.prefixes.allSatisfy { PrefixStore.backups(of: $0).isEmpty })}@@ -607,7 +607,7 @@ struct PrefixesModelTests {#expect(model.backups.isEmpty)#expect(model.outcome == nil)- #expect(model.failure == nil)+ #expect(model.report?.message == nil)}private func park(_ stamps: [String: [String]], in library: SteamLibrary) throws {@@ -699,7 +699,7 @@ struct PrefixesModelTests {await model.delete(model.selectedPrefixes)#expect(model.prefixes.map(\.appID) == ["253750"])- #expect(model.failure == nil)+ #expect(model.report?.message == nil)#expect(model.outcome== "Deleted 2 prefixes. Steam will make a new prefix if a game is launched again.")@@ -707,6 +707,33 @@ struct PrefixesModelTests {#expect(!model.isLoading)}+ @Test("A game in two libraries is two prefixes, and deleting one keeps the other")+ func sameGameInTwoLibraries() async throws {+ let (firstDir, first) = try makeLibrary(appIDs: ["1574480"])+ let (secondDir, second) = try makeLibrary(appIDs: ["1574480"])+ defer {+ try? FileManager.default.removeItem(at: firstDir)+ try? FileManager.default.removeItem(at: secondDir)+ }+ let saves = [first, second].map {+ $0.compatdata.appending(path: "1574480/pfx/drive_c/users/crossover/save.dat")+ }+ for save in saves { try write("save", to: save) }+ let model = PrefixesModel(libraries: { [first, second] })+ await model.load()+ #expect(model.prefixes.count == 2)++ let stale = try #require(model.prefixes.first { $0.library == second })+ model.selection = [stale.id]+ #expect(model.selectedPrefixes == [stale])++ await model.delete(model.selectedPrefixes)++ #expect(FileManager.default.fileExists(atPath: saves[0].path(percentEncoded: false)))+ #expect(!FileManager.default.fileExists(atPath: saves[1].path(percentEncoded: false)))+ #expect(model.prefixes.map(\.library) == [first])+ }+@Test("Deleting one prefix says which one")func deleteOfOneNamesIt() async throws {let (dir, library) = try makeLibrary(appIDs: ["1574480"])@@ -751,7 +778,7 @@ struct PrefixesModelTests {// there and still listed.#expect(model.prefixes.map(\.appID) == ["253750"])#expect(model.outcome?.contains("Deleted the prefix for App 1574480.") == true)- #expect(model.failure?.contains("is running. Quit the game first.") == true)+ #expect(model.report?.message.contains("is running. Quit the game first.") == true)#expect(model.busy.isEmpty)}@@ -781,7 +808,7 @@ struct PrefixesModelTests {#expect(model.prefixes.count == 1)#expect(model.outcome == "untouched")- #expect(model.failure == nil)+ #expect(model.report?.message == nil)#expect(!model.isLoading)}diff --git a/app/Tests/BridgeplayAppTests/RunnerPatcherTests.swift b/app/Tests/BridgeplayAppTests/RunnerPatcherTests.swiftindex e415d3b..0da7c1f 100644--- a/app/Tests/BridgeplayAppTests/RunnerPatcherTests.swift+++ b/app/Tests/BridgeplayAppTests/RunnerPatcherTests.swift@@ -35,7 +35,7 @@ struct RunnerPatcherTests {guard let (root, build) = try Self.healthyClone() else { return }defer { try? FileManager.default.removeItem(at: root) }- let arch = RunnerPatcher.unixArch(in: root)+ let arch = RunnerPatcher.unixArches(in: root)[0]let builtin = root.appending(path: "lib/wine/\(arch)/lsteamclient.so")try Data("not the bridge copy".utf8).write(to: builtin)@@ -181,10 +181,10 @@ struct RunnerPatcherTests {}try write("lib/wine/x86_64-unix/wine")- #expect(RunnerPatcher.unixArch(in: root) == "x86_64-unix")+ #expect(RunnerPatcher.unixArches(in: root)[0] == "x86_64-unix")try write("lib/wine/aarch64-unix/wine.app/Contents/MacOS/wine")- #expect(RunnerPatcher.unixArch(in: root) == "aarch64-unix")+ #expect(RunnerPatcher.unixArches(in: root)[0] == "aarch64-unix")#expect(RunnerPatcher.unixArches(in: root) == ["aarch64-unix", "x86_64-unix"])diff --git a/app/Tests/BridgeplayAppTests/SystemStatusTests.swift b/app/Tests/BridgeplayAppTests/SystemStatusTests.swiftindex ad416c6..82d21f4 100644--- a/app/Tests/BridgeplayAppTests/SystemStatusTests.swift+++ b/app/Tests/BridgeplayAppTests/SystemStatusTests.swift@@ -41,23 +41,6 @@ struct RunActivityTests {#expect(status.isIdle)}- @Test("A confirmation is remembered until it is answered")- func pendingConfirmationSurvivesUntilCleared() {- let status = SystemStatus()- #expect(status.pendingConfirmation == nil)-- status.pendingConfirmation = .blockUpdates- #expect(status.pendingConfirmation == .blockUpdates)-- // A second ask replaces the first rather than queueing behind it, so the dialog- // on screen is always the one that will run if it is confirmed.- status.pendingConfirmation = .replaceSteam- #expect(status.pendingConfirmation == .replaceSteam)-- status.pendingConfirmation = nil- #expect(status.pendingConfirmation == nil)- }-@Test("A finished run is not busy")func finishedRunIsIdle() {let status = SystemStatus()diff --git a/app/Tests/BridgeplayInstallerCoreTests/InstallerComponentsTests.swift b/app/Tests/BridgeplayInstallerCoreTests/InstallerComponentsTests.swiftindex df04132..69855d2 100644--- a/app/Tests/BridgeplayInstallerCoreTests/InstallerComponentsTests.swift+++ b/app/Tests/BridgeplayInstallerCoreTests/InstallerComponentsTests.swift@@ -58,11 +58,17 @@ struct InstallerComponentsTests {#expect(InstallerComponents.needed(home: home, applications: apps))}- @Test("A failing Install.command reports its last message")- func scriptFailure() throws {- #expect(throws: InstallerError.self) {- try InstallerComponents.run("/bin/sh", ["-c", "echo '==> step'; echo 'Gagal: disk full' >&2; exit 1"])+ @Test("A failing tool reports its last message, or its exit status when it says nothing")+ func toolFailure() throws {+ func reason(of script: String) throws -> String? {+ let failure = try #require(throws: InstallerError.self) {+ try InstallerComponents.run("/bin/sh", ["-c", script])+ }+ if case .componentsFailure(let reason) = failure { return reason }+ return nil}+ #expect(try reason(of: "echo step; echo 'disk full' >&2; echo >&2; exit 1") == "disk full")+ #expect(try reason(of: "exit 3") == "exit 3")let output = try InstallerComponents.run("/bin/sh", ["-c", "printf '==> one\\n==> two\\n'"])#expect(output == "==> one\n==> two\n")}diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.mdindex 90d61ae..67dbaeb 100644--- a/docs/ARCHITECTURE.md+++ b/docs/ARCHITECTURE.md@@ -13,7 +13,7 @@ each folder is, which process it ends up in, and where new code belongs.| `signatures/macos.arm64/` | Data the dylib reads to find Steam functions | Copied to Application Support; the highest-numbered file wins || `lsteamclient/`, `steam-shim/` | Wine: the steamclient bridge and the Windows `steam.exe` | Built against the Wine tree in `bridge/`, shipped in the app payload, put into runners || `ntdll-patch/` | Detours patched into the engine's `ntdll.dll` | Prebuilt `detour*.bin` in the app's Resources, applied by `NtdllPatcher.swift` |-| `win32u-patch/`, `winemac-patch/`, `winebus-patch/`, `winecoreaudio-patch/`, `wined3d-patch/`, `ws2_32-patch/`, `ngx-signer-patch/` | Replacement Wine files inside the engine | Rebuilt binaries are committed in the app's Resources and copied over the engine at setup |+| `win32u-patch/`, `winemac-patch/`, `winebus-patch/`, `winecoreaudio-patch/`, `wined3d-patch/`, `ws2_32-patch/`, `ngx-signer-patch/`, `d3dx11-patch/`, `hide-wine-exports-patch/` | Replacement Wine files inside the engine | Rebuilt binaries are committed in the app's Resources and copied over the engine at setup || `nvapi-shim/` | Windows `nvapi64.dll` in the game (reports an NVIDIA driver so games offer DLSS) | Prebuilt in the app's Resources || `overlay-shim/` | Mac dylib in the game process (HDR, Metal 4, frame generation) | `DYLD_INSERT_LIBRARIES` from the run script, or loaded by lsteamclient || `native-launch/` (`np-native`), `native-shim/` (`libnp_gamepad.dylib`) | Native Mac games | A Steam launch option re-execs the game with the shim inserted |diff --git a/docs/BUILD-LOCAL.md b/docs/BUILD-LOCAL.mdindex 8c427c7..68bd41b 100644--- a/docs/BUILD-LOCAL.md+++ b/docs/BUILD-LOCAL.md@@ -10,11 +10,12 @@ targets, in the same order, as `.github/workflows/app.yml`.active developer dir and you don't need `xcode-select`. To use a different Xcode, set`DEVELOPER_DIR` yourself.- Homebrew: `brew install cmake mingw-w64 bison flex fontforge gpatch` (bison must be- Homebrew's, at `/opt/homebrew/opt/bison/bin`), and the font tools:- `python3 -m pip install fonttools brotli`. `shellcheck` and `node` are optional; without+ Homebrew's, at `/opt/homebrew/opt/bison/bin`). `shellcheck` and `node` are optional; withoutthem the lint and panel checks skip.-- Network on the first run: Dobby, Wine 11.15 (gitlab.winehq.org), the Proton tarball- and Sparkle.+- Font tools: the script installs afdko and fonttools into `scratch/fontvenv`, at the versions+ in `FONT_TOOLS` in app.yml. A direct `make fonts` needs those tools on `PATH`.+- Network on the first run: Dobby, Wine 11.15 (gitlab.winehq.org), the Proton tarball,+ the font tools and Sparkle.## Commands@@ -108,10 +109,10 @@ instead of about 15m. When the bridge sources differ, the Wine source is clonedbridge is built in the worktree without the 8m30s clone: 3m21s, 4m05s for the whole build.`app/.build` is not seeded: SwiftPM records absolute paths, and a cold app build is 35s.-## Local deviation from CI+## Sparkle link for the Swift testsOn Xcode 27 beta 27A5218g, SwiftPM leaves `app/.build/out/Products/Debug/PackageFrameworks`empty. The Swift test bundle only looks for `Sparkle.framework` there, so it fails to-load before any test runs. With `--checks`, the script builds the tests and then links-`PackageFrameworks/Sparkle.framework` to `../Sparkle.framework`. That link is a-build-product fix-up; no source changes. After it, all 475 tests in 56 suites pass.+load before any test runs. `make app-tests`, which CI and `--checks` both run, builds the+tests and then links `PackageFrameworks/Sparkle.framework` to `../Sparkle.framework`. That+link is a build-product fix-up; no source changes.diff --git a/docs/DEVELOPING.md b/docs/DEVELOPING.mdindex 047c69a..754cc02 100644--- a/docs/DEVELOPING.md+++ b/docs/DEVELOPING.md@@ -17,12 +17,14 @@ Homebrew packages:```shbrew install cmake mingw-w64 bison flex fontforge gpatch shellcheck node-python3 -m pip install fonttools brotli````/opt/homebrew` is assumed (Homebrew's bison and the Wine tree setup look there). Without`shellcheck` or `node` the lint and panel checks skip.+`scripts/build-local.sh` installs the font tools (afdko and fonttools, pinned by `FONT_TOOLS` in+`.github/workflows/app.yml`) into `scratch/fontvenv`. A direct `make fonts` needs them on `PATH`.+## Build```shdiff --git a/docs/GAMEFIXES.md b/docs/GAMEFIXES.mdindex 64a2953..c8c5c65 100644--- a/docs/GAMEFIXES.md+++ b/docs/GAMEFIXES.md@@ -10,7 +10,9 @@ every game, and the last two are named after the game's Steam app id:A later file wins per key. A variable you set in the game's Steam launch options(`NAME=value %command%`) wins over all four files. Bridgeplay replaces the files in-`gamefixes-default/` on every install and never writes to your `<appid>.conf`.+`gamefixes-default/` on every install. It changes your `<appid>.conf` only if you click+Use Defaults for that game on the Game Defaults page, which saves a copy in `backups/` and+removes the file's lines for the settings that page shows.The Game Defaults page in the app edits file 2. It rewrites only the lines for the settingsit shows and keeps every other line and comment. When you pick what files below it already@@ -26,7 +28,7 @@ installed (`.installer/default.conf`) and writes `KEY=0` for a shipped `KEY=1` ydeleted, so your file keeps only your own changes.Bridgeplay's own variables are spelled `BRIDGEPLAY_*` (`BRIDGEPLAY_RETINA=1`). The-`NOTPROTON_*` spelling from before 3.0.0 still works, in launch options and in conf files.+`NOTPROTON_*` spelling from before 3.0.0 still works in launch options. Conf files reject it.## Format@@ -51,7 +53,7 @@ logged, when:| `FRAMEGEN_UI` | `0`, `1` | Same as `BRIDGEPLAY_FRAMEGEN_UI`, Protect UI: keeps static HUD and menus sharp. On when unset || `FRAMEGEN_FALLBACK` | `0`, `1` | Same as `BRIDGEPLAY_FRAMEGEN_FALLBACK`, Fast-motion fallback: skips generated frames that would smear. On when unset || `FRAMEGEN_ENGINE` | `own`, `metalfx` | Same as `BRIDGEPLAY_FRAMEGEN_ENGINE`: the built-in optical flow (`own`, the default) or MetalFX frame interpolation |-| `NVAPI` | `0`, `1` | `1` turns on Apple's `nvapi64` and `nvngx` (DLSS on MetalFX) on an engine with a linked Game Porting Toolkit, for `d3dmetal` only, and makes D3DMetal report an NVIDIA GeForce RTX 4090 (`D3DM_VENDOR_ID=0x10de`, `D3DM_DEVICE_ID=0x2684`, `D3DM_DEVICE_DESCRIPTION`; a `D3DM_*` from a conf or the launch options wins) and a driver version of 32.0.15.9541 (`NOTPROTON_DRIVER_VERSION`), since games offer DLSS only on an NVIDIA adapter. Without the key, the run script treats it as `0`. Bridgeplay's `gamefixes-default/default.conf` sets `NVAPI=1`, so it is on for every game unless a game's conf or launch options say `NVAPI=0`. An nvapi that answers sends some games down NVIDIA-only paths, which is the reason to turn it off |+| `NVAPI` | `0`, `1` | `1` turns on Apple's `nvapi64` and `nvngx` (DLSS on MetalFX) on an engine with a linked Game Porting Toolkit, for `d3dmetal` only, and makes D3DMetal report an NVIDIA GeForce RTX 4090 (`D3DM_VENDOR_ID=0x10de`, `D3DM_DEVICE_ID=0x2684`, `D3DM_DEVICE_DESCRIPTION`; a `D3DM_*` from a conf or the launch options wins) and a driver version of 32.0.15.9541 (`NOTPROTON_DRIVER_VERSION`), since games offer DLSS only on an NVIDIA adapter. Without the key, the run script treats it as `0`. Bridgeplay's `gamefixes-default/default.conf` sets `NVAPI=1`, so it is on for every game unless a later conf says `NVAPI=0`. It has no launch-option spelling. An nvapi that answers sends some games down NVIDIA-only paths, which is the reason to turn it off || `DLSS_FG` | `0`, `1` | With `NVAPI=1` on `d3dmetal`, `1` sets `CX_ACTIVE_GRAPHICS_BACKEND=d3dmetal` so WineCX reports hardware GPU scheduling, which DLSS frame generation requires. Experimental and off by default (`gamefixes-default/default.conf` leaves it out): [frankea/Whisky#231](https://github.com/frankea/Whisky/pull/231) saw MetalFX frame interpolation on an M5 with D3DMetal 4.0b2 hang WindowServer || `STDOUT_NULL` | `0`, `1` | `1` starts the game without a stdout handle, as Steam on Windows does. Source 2 treats any stdout as a console build (`Plat_IsConsoleApplication`) and then skips NGX, so Deadlock offers no DLSS || `VSYNC` | `0`, `1` | `1` makes the game's Metal layer wait for the display even when the game turns vsync off, like forcing vsync in the NVIDIA control panel. For games that lock vsync off with frame generation on (Resident Evil Requiem) and tear above the refresh rate |diff --git a/docs/NATIVE-INSTALLER.md b/docs/NATIVE-INSTALLER.mdindex 16d59aa..f0d7400 100644--- a/docs/NATIVE-INSTALLER.md+++ b/docs/NATIVE-INSTALLER.md@@ -45,8 +45,9 @@ refuses an active Bridgeplay/updater process, and keeps the prior app in the hidlocally before release discovery, including when the network is unavailable. Unexpectedbackup contents are preserved and reported instead of deleted. An older recovery bundle isrotated by rename before replacement. Retired copies owned by another account or containing-read-only directories stay intact as `.Bridgeplay.app.previous-<UUID>` siblings; an-administrator can remove them in Finder. They do not block subsequent updates.+read-only directories stay intact as hidden `.Bridgeplay.app.previous-<UUID>` siblings; an+administrator can remove them from Terminal, or in Finder after showing hidden files with+Cmd-Shift-Period. They do not block subsequent updates.Prefixes, saves and Steam libraries are never touched. The components step writes `gptk/`,`gamefixes-default/`, the cached DXMT/DXVK archives, and `gamecontrollerdb.txt` when there is@@ -89,7 +90,8 @@ For an isolated GUI test, a debug build also accepts `--test-destination` with a`Bridgeplay.app` path inside the macOS temporary directory. Release builds always useApplications. Do not open the installed test app unless you intend to exercise real setup.-States are `review`, `update`, `download`, `install`, `done`, `current`, and `error`.+States are `review`, `update`, `download`, `paused`, `components`, `install`, `steam`, `done`,+`current`, and `error`.Preview screenshots establish appearance; they do not establish install/update success.Before public rollout, exercise a fresh install, older/current/newer app, real componentdiff --git a/docs/RELEASING.md b/docs/RELEASING.mdindex 5844416..aee0c80 100644--- a/docs/RELEASING.md+++ b/docs/RELEASING.md@@ -125,9 +125,9 @@ Any other release in the repository (a DXMT build, say) must be created withthe background and installs it when Bridgeplay quits (`SUAutomaticallyUpdate`). Checkfor Updates… in the app menu does it on demand.- On the next launch, if the patch inside Steam is from an older Bridgeplay, the app- re-applies it by itself once Steam and every game are closed. If Steam is open, the- Status row shows "Update available" until the user installs it or relaunches with Steam- closed.+ re-applies it by itself once Steam and every game are closed. While Steam or a game is+ open, a banner says so and the Status row shows "Update available". The app looks again+ when it comes to the front and every five minutes, so no relaunch is needed.## Signingdiff --git a/dylib/AGENTS.md b/dylib/AGENTS.mdindex 023c545..8bdefd3 100644--- a/dylib/AGENTS.md+++ b/dylib/AGENTS.md@@ -23,7 +23,7 @@ down for the user. The constructor in `core/loader.c` only does work in `steam_oa passing `make gamefixescheck`.- Checks for the run script: `runcheck`, `envcheck`, `settingscheck`, `routecheck`,`gamedrivecheck`, `prefixnotecheck`, `powernotecheck`, `exitcheck`, `launchprogresscheck`,- `launchercheck`, `gamefixescheck`.+ `launchercheck`, `gamefixescheck`, `anticheatcheck`, `padcheck`.- **Tests** live in `dylib/tests/`. They run without Steam or Dobby; several `#include` the- `.c` file under test for that reason. Add a new check as a Makefile target and to the- check list in `.github/workflows/app.yml`.+ `.c` file under test for that reason. Add a new check as a Makefile target and to+ `CI_CHECKS` in the Makefile.diff --git a/dylib/tests/anticheatcheck.sh b/dylib/tests/anticheatcheck.shindex c5d33d7..9c5cbf4 100644--- a/dylib/tests/anticheatcheck.sh+++ b/dylib/tests/anticheatcheck.sh@@ -3,7 +3,7 @@# (kernel_anticheat_notice in compat_run.sh). Only Launch Anyway may start the game.set -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "anticheatcheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> anticheatcheck: $SRC not present, skipped"; exit 0; }extract() { sed -n "/^$1() {\$/,/^}\$/p" "$SRC"; }functions=$(grep '^kernel_anticheat_wait=' "$SRC") || { echo "FAIL: kernel_anticheat_wait not found in $SRC"; exit 1; }diff --git a/dylib/tests/bridgecheck.sh b/dylib/tests/bridgecheck.shindex e20bde9..9874436 100644--- a/dylib/tests/bridgecheck.sh+++ b/dylib/tests/bridgecheck.sh@@ -2,7 +2,7 @@# shellcheck disable=SC2016 # the sh -ec program expands its own variablesset -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "bridgecheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> bridgecheck: $SRC not present, skipped"; exit 0; }block=$(sed -n '/^bridge_files="steamclient64/,/^ verify_runner$/p' "$SRC")case "$block" indiff --git a/dylib/tests/buildcheck.sh b/dylib/tests/buildcheck.shindex 4110991..df39ade 100644--- a/dylib/tests/buildcheck.sh+++ b/dylib/tests/buildcheck.sh@@ -2,7 +2,7 @@# shellcheck disable=SC2034,SC2154set -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "buildcheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> buildcheck: $SRC not present, skipped"; exit 0; }extract() { sed -n "/^$1() {\$/,/^}\$/p" "$SRC"; }functions=""diff --git a/dylib/tests/envcheck.sh b/dylib/tests/envcheck.shindex 66fbcf5..c5e0553 100755--- a/dylib/tests/envcheck.sh+++ b/dylib/tests/envcheck.sh@@ -2,7 +2,7 @@# shellcheck disable=SC2034,SC2154set -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "envcheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> envcheck: $SRC not present, skipped"; exit 0; }strip() { sed 's/^[[:space:]]*//'; }dllpath_line=$(grep 'export WINEDLLPATH=' "$SRC" | grep 'x86_64-windows' | strip)diff --git a/dylib/tests/envpasscheck.sh b/dylib/tests/envpasscheck.shindex d0986d7..ba29c3d 100755--- a/dylib/tests/envpasscheck.sh+++ b/dylib/tests/envpasscheck.sh@@ -3,7 +3,7 @@# would replace something the launch sets for itself.set -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "envpasscheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> envpasscheck: $SRC not present, skipped"; exit 0; }block=$(sed -n '/^np_env_passed=/,/^done$/p' "$SRC")case "$block" indiff --git a/dylib/tests/exitcheck.sh b/dylib/tests/exitcheck.shindex 0e825c0..d36cf85 100644--- a/dylib/tests/exitcheck.sh+++ b/dylib/tests/exitcheck.sh@@ -3,7 +3,7 @@# which play reports quote.set -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "exitcheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> exitcheck: $SRC not present, skipped"; exit 0; }extract() { sed -n "/^$1() {\$/,/^}\$/p" "$SRC"; }functions=""diff --git a/dylib/tests/gamedrivecheck.sh b/dylib/tests/gamedrivecheck.shindex 42a1c43..35ab6b6 100644--- a/dylib/tests/gamedrivecheck.sh+++ b/dylib/tests/gamedrivecheck.sh@@ -2,7 +2,7 @@# shellcheck disable=SC2016 # the sh -ec program expands its own variablesset -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "gamedrivecheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> gamedrivecheck: $SRC not present, skipped"; exit 0; }body=$(sed -n '/^game_drive_record() {/,/^}/p;/^record_game_drive() {/,/^}/p;/^restart_for_drive() {/,/^}/p;/^unmap_game_drive() {/,/^}/p;/^map_game_drive() {/,/^}/p' "$SRC")[ -n "$body" ] || { echo "FAIL: map_game_drive not found in $SRC"; exit 1; }diff --git a/dylib/tests/gamefixescheck.sh b/dylib/tests/gamefixescheck.shindex e553f06..4b1a22c 100644--- a/dylib/tests/gamefixescheck.sh+++ b/dylib/tests/gamefixescheck.sh@@ -2,7 +2,7 @@# shellcheck disable=SC2016 # the sh -ec programs expand their own variablesset -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "gamefixescheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> gamefixescheck: $SRC not present, skipped"; exit 0; }functions=""for name in gamefix_log valid_dll_overrides gamefix_reason gamefix_read gamefix_apply_env \@@ -116,10 +116,10 @@ launch() {eval "$bridge_line"for v in backend WINEDLLOVERRIDES WINEMSYNC msync_from NOTPROTON_RETINA NOTPROTON_FRAMEGEN \NOTPROTON_FRAMEGEN_QUALITY NOTPROTON_FRAMEGEN_UI NOTPROTON_FRAMEGEN_FALLBACK NOTPROTON_FRAMEGEN_ENGINE CX_GRAPHICS_BACKEND \- DXVK_HUD VKD3D_CONFIG WINEDEBUG MTL_HUD_ENABLED D3DM_VENDOR_ID D3DM_DEVICE_ID D3DM_DEVICE_DESCRIPTION NOTPROTON_NGX_SIGNER NOTPROTON_DRIVER_VERSION CX_ACTIVE_GRAPHICS_BACKEND NOTPROTON_VSYNC NOTPROTON_HIDE_WINE_EXPORTS CX_FWD_COMPAT_GL_CTX gamefix_args; do+ DXVK_HUD VKD3D_CONFIG WINEDEBUG MTL_HUD_ENABLED D3DM_VENDOR_ID D3DM_DEVICE_ID D3DM_DEVICE_DESCRIPTION NOTPROTON_NGX_SIGNER NOTPROTON_DRIVER_VERSION CX_ACTIVE_GRAPHICS_BACKEND NOTPROTON_VSYNC NOTPROTON_HIDE_WINE_EXPORTS CX_FWD_COMPAT_GL_CTX gamefix_args PATH DYLD_INSERT_LIBRARIES; doeval "printf \"%s=%s\\n\" \$v \"\${$v-<unset>}\""done- ' launch "$target" > "$case_dir/out" 2>&1 || echo "launch exited $?" >> "$case_dir/out"+ ' launch "$target" > "$case_dir/out" 2>&1 || bad "the launch sequence ran to the end" "exit 0" "exit $? $(tail -1 "$case_dir/out")"}got() { sed -n "s/^$1=//p" "$case_dir/out"; }trio="steamclient=n;steamclient64=n;lsteamclient=b"@@ -185,6 +185,7 @@ is "MTL_HUD_ENABLED is allowed" "1" "$(got MTL_HUD_ENABLED)"is "CX_FWD_COMPAT_GL_CTX is allowed" "1" "$(got CX_FWD_COMPAT_GL_CTX)"is "PATH is not on the allow-list" "0" "$(grep -c '^PATH=/evil' "$case_dir/out" || true)"has "PATH is logged as rejected" "line 6 rejected PATH: not on the allow-list" "$case_dir/log"+is "DYLD_INSERT_LIBRARIES is not on the allow-list" "<unset>" "$(got DYLD_INSERT_LIBRARIES)"has "DYLD_INSERT_LIBRARIES is rejected" "rejected DYLD_INSERT_LIBRARIES: not on the allow-list" "$case_dir/log"has "a lower-case key is rejected" "line 8 rejected: not KEY=VALUE" "$case_dir/log"has "a line without = is rejected" "line 9 rejected: not KEY=VALUE" "$case_dir/log"diff --git a/dylib/tests/l10ncheck.py b/dylib/tests/l10ncheck.pyindex 5d07f8e..080cb21 100644--- a/dylib/tests/l10ncheck.py+++ b/dylib/tests/l10ncheck.py@@ -12,8 +12,6 @@ source_root = catalog.resolve().parents[2]datas = []for path in sorted(intermediates.rglob("*.stringsdata")):- if "BridgeplayAppTests" in path.parts:- continuesource = pathlib.Path(json.loads(path.read_text())["source"])if source.exists() and source.resolve().is_relative_to(source_root):datas.append(str(path))diff --git a/dylib/tests/launchercheck.sh b/dylib/tests/launchercheck.shindex 35947c8..94bf610 100644--- a/dylib/tests/launchercheck.sh+++ b/dylib/tests/launchercheck.sh@@ -2,7 +2,7 @@# shellcheck disable=SC2016,SC2034,SC2154set -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "launchercheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> launchercheck: $SRC not present, skipped"; exit 0; }funcs=$(sed -n '/^bundle_listing() {$/,/^install_bundle$/p' "$SRC" | sed '$d')name_lines=$(sed -n '/^bundle_name=\$(printf/,/^\[ -n "\$bundle_name" \] || bundle_name=/p' "$SRC")diff --git a/dylib/tests/launchprogresscheck.sh b/dylib/tests/launchprogresscheck.shindex d3fe7bf..463ec99 100644--- a/dylib/tests/launchprogresscheck.sh+++ b/dylib/tests/launchprogresscheck.sh@@ -5,7 +5,7 @@# shellcheck disable=SC2016 # the sh -ec programs expand their own variablesset -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "launchprogresscheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> launchprogresscheck: $SRC not present, skipped"; exit 0; }extract() { sed -n "/^$1() {\$/,/^}\$/p" "$SRC"; }functions=""diff --git a/dylib/tests/padcheck.sh b/dylib/tests/padcheck.shindex 1f87831..7a59216 100644--- a/dylib/tests/padcheck.sh+++ b/dylib/tests/padcheck.sh@@ -5,7 +5,7 @@set -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"UPDATE="${2:-$(dirname "$0")/../../scripts/update-gamecontrollerdb.sh}"-[ -f "$SRC" ] || { echo "padcheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> padcheck: $SRC not present, skipped"; exit 0; }block=$(sed -n '/^np_pad_mappings() {$/,/^}$/p' "$SRC")forward=$(sed -n '/^for name in $(env /,/^done$/p' "$SRC")@@ -167,6 +167,8 @@ $g2,Own Bluetooth,a:b0,b:b1,platform:Mac OS X," "$(grep -v '^#' "$out")"is "no CR left" "" "$(tr -d -c '\r' < "$out")"is "file readable by others" "-rw-r--r--" "$(stat -f %Sp "$out")"is "nothing else left in the output directory" "merged.txt" "$(ls -A "$work/out")"+else+ echo "==> padcheck: $UPDATE not present, the update script section is skipped"fiif [ "$fails" -eq 0 ]; thendiff --git a/dylib/tests/panel-behavior/migration.js b/dylib/tests/panel-behavior/migration.jsindex 3f00d3e..4c091ef 100644--- a/dylib/tests/panel-behavior/migration.js+++ b/dylib/tests/panel-behavior/migration.js@@ -40,6 +40,14 @@ const app = (id, o, over) => Object.assign((async () => {const t = runner('migration');+ // A hung migration leaves a promise that never settles, and Node then exits 0 here.+ let finished = false;+ process.on('exit', () => {+ if (finished) return;+ console.error('migration: stopped before the last check');+ process.exitCode = 1;+ });+const rule = [['MTL_HUD_ENABLED=1 -dx11', 'MTL_HUD_ENABLED=1 %command% -dx11'],['-dx11 WINEMSYNC=1', 'WINEMSYNC=1 %command% -dx11'],@@ -122,5 +130,6 @@ const app = (id, o, over) => Object.assign(t.ok(many.written.filter(x => x.appid).length === 45 && many.store.size === 1,'checks every app when there are more than one batch');+ finished = true;if (t.failed) process.exit(1);})();diff --git a/dylib/tests/powernotecheck.sh b/dylib/tests/powernotecheck.shindex a8ac89a..99a4bc0 100755--- a/dylib/tests/powernotecheck.sh+++ b/dylib/tests/powernotecheck.sh@@ -5,7 +5,7 @@# shellcheck disable=SC2016 # the sh -ec program expands its own variablesset -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "powernotecheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> powernotecheck: $SRC not present, skipped"; exit 0; }body=$(sed -n '/^low_power_mode() {/,/^}/p;/^low_power_notice() {/,/^}/p' "$SRC")case "$body" indiff --git a/dylib/tests/prefixnotecheck.sh b/dylib/tests/prefixnotecheck.shindex 2b35581..d6ccd39 100755--- a/dylib/tests/prefixnotecheck.sh+++ b/dylib/tests/prefixnotecheck.sh@@ -4,7 +4,7 @@# shellcheck disable=SC2016 # the sh -ec program expands its own variablesset -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "prefixnotecheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> prefixnotecheck: $SRC not present, skipped"; exit 0; }body=$(sed -n '/^volume_type() {/,/^}/p;/^note_prefix_volume() {/,/^}/p;/^steam_libraries() {/,/^}/p;/^note_other_prefixes() {/,/^}/p;/^refuse_broken_prefix() {/,/^}/p' "$SRC")case "$body" indiff --git a/dylib/tests/routecheck.sh b/dylib/tests/routecheck.shindex 5a9713c..33cdf64 100755--- a/dylib/tests/routecheck.sh+++ b/dylib/tests/routecheck.sh@@ -2,7 +2,7 @@# shellcheck disable=SC2016 # the sh -ec program expands its own variablesset -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "routecheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> routecheck: $SRC not present, skipped"; exit 0; }body=$(sed -n '/^target="\$1"$/,/^fi$/p' "$SRC")[ -n "$body" ] || { echo "FAIL: the launch routing not found in $SRC"; exit 1; }diff --git a/dylib/tests/seedcheck.sh b/dylib/tests/seedcheck.shindex c0be224..76fba0e 100644--- a/dylib/tests/seedcheck.sh+++ b/dylib/tests/seedcheck.sh@@ -667,7 +667,28 @@ wait "$builder"check test -f "$first_prefix/system.reg"seed_prefix_from_templatecheck test -f "$WINEPREFIX/system.reg"-check test "$(find "$template_dir/pfx" -name 'pfx.building.*' | wc -l | tr -d ' ')" = 0+check test "$(find "$template_dir" -maxdepth 2 -name 'pfx.building.*' | wc -l | tr -d ' ')" = 0++# A template that lands while this one builds is kept, and the build leaves nothing behind.+fixture+export ready_pipe="$case_root/ready" resume_pipe="$case_root/resume"+mkfifo "$ready_pipe" "$resume_pipe"+env functions="$functions" /bin/sh -ec "+ eval \"\$functions\"+ eval \"\$fake_initializer\"+ rm -rf \"\$template_dir/pfx\"+ build_prefix_template+" &+builder=$!+read -r ready < "$ready_pipe" || true+check test "$ready" = ready+mkdir -p "$template_dir/pfx"+printf existing > "$template_dir/pfx/system.reg"+printf 'continue\n' > "$case_root/resume"+wait "$builder"+unset ready_pipe resume_pipe+check test "$(cat "$template_dir/pfx/system.reg")" = existing+check test "$(find "$template_dir" -maxdepth 2 -name 'pfx.building.*' | wc -l | tr -d ' ')" = 0fixturechmod 500 "$case_root"diff --git a/dylib/tests/settingscheck.sh b/dylib/tests/settingscheck.shindex 7b5328e..41bb5e5 100644--- a/dylib/tests/settingscheck.sh+++ b/dylib/tests/settingscheck.sh@@ -2,7 +2,7 @@# shellcheck disable=SC2016 # the sh -ec program expands its own variablesset -eSRC="${1:-$(dirname "$0")/../feats/compat_run.sh}"-[ -f "$SRC" ] || { echo "settingscheck: $SRC not present, skipped"; exit 0; }+[ -f "$SRC" ] || { echo "==> settingscheck: $SRC not present, skipped"; exit 0; }body=$(sed -n '/^import_prefix_settings() {$/,/^}$/p' "$SRC")[ -n "$body" ] || { echo "FAIL: import_prefix_settings not found in $SRC"; exit 1; }diff --git a/gamefixes/README b/gamefixes/READMEindex 61c8761..93c21cd 100644--- a/gamefixes/README+++ b/gamefixes/README@@ -2,10 +2,10 @@ Per-game defaults shipped with Bridgeplay.One file per game, named <steam appid>.conf (for example 1245620.conf), in KEY=VALUE form.`make app-payload` bundles every *.conf here into the app, and the installer copies them-to ~/Library/Application Support/bridgeplay/gamefixes-default/, replacing that directory's-contents each time. Overrides belong in ~/Library/Application Support/bridgeplay/gamefixes/,-which Bridgeplay never touches.+to ~/Library/Application Support/bridgeplay/gamefixes-default/, replacing the files there+each time. Overrides belong in ~/Library/Application Support/bridgeplay/gamefixes/, which the+app's Game Defaults page edits. The format is in docs/GAMEFIXES.md.Example 1245620.conf:# Elden Ring- BACKEND=dxmt+ BACKEND=wined3ddiff --git a/gamefixes/README.md b/gamefixes/README.mdindex e24f15f..9b60191 100644--- a/gamefixes/README.md+++ b/gamefixes/README.md@@ -2,12 +2,11 @@Per-game overrides, one `<appid>.conf` per game, `KEY=VALUE` lines and `#` comments.-Allowed keys: `BACKEND` (dxmt|dxvk|wined3d|d3dmetal), `DLLOVERRIDES` (Wine syntax), `MSYNC`, `RETINA`, and-env vars starting `DXMT_`, `DXVK_`, `MVK_`, `VKD3D_`, `D3DM_`, or exactly `MTL_HUD_ENABLED`, `WINEDEBUG`,-`WINE_LARGE_ADDRESS_AWARE`, `WINE_CPU_TOPOLOGY`.+The allowed keys, the order the files are read in and the rest of the format are in+[docs/GAMEFIXES.md](../docs/GAMEFIXES.md).Rule: add a file only with evidence, and cite the source in a comment (PCGamingWiki page, a-umu-protonfixes `gamefixes-steam/<appid>.py`, or a test run in `compat/runs/`). Most umu-protonfixes-entries (launch arguments, file creation, winetricks) have no equivalent key here and are not seeded.-Checked 2026-10-09 against all appids in `compat/games.json`: only 782330, 1245620, 377160, 22380,-489830 have a protonfix, and none maps to the allowed keys.+umu-protonfixes `gamefixes-steam/<appid>.py`, or a test run in `compat/runs/`). Launch arguments+from umu-protonfixes go in `ARGS`. File creation and winetricks have no equivalent key here and+are not seeded. Checked 2026-10-09 against all appids in `compat/games.json`: only 782330,+1245620, 377160, 22380, 489830 have a protonfix.diff --git a/scripts/build-local.sh b/scripts/build-local.shindex cb8365e..259e27a 100755--- a/scripts/build-local.sh+++ b/scripts/build-local.sh@@ -4,7 +4,7 @@# scripts/build-local.sh build build/Bridgeplay.app and build/Bridgeplay.zip# scripts/build-local.sh --checks the same, then the CI check targets and Swift tests#-# Phases run in CI order: dobby, all, overlay-shim, iconmaker+appinfo, bridge,+# Phases run in CI order: dobby, all, overlay-shim, iconmaker+appinfo, bridge, fonts,# app-payload, app. Everything CI restores from actions/cache stays on disk here# instead, so a re-run only rebuilds what changed:# vendor/dobby, build/dobby Dobby source and build (rebuilt when the pinned commit moves)diff --git a/scripts/tests/compat-reported-commit.sh b/scripts/tests/compat-reported-commit.shindex cf26200..d5cd6df 100755--- a/scripts/tests/compat-reported-commit.sh+++ b/scripts/tests/compat-reported-commit.sh@@ -7,7 +7,7 @@ here=$(cd "$(dirname "$0")" && pwd)repo=$(cd "$here/../.." && pwd)script="$repo/scripts/compat-reported-commit.sh"workflow_src="$repo/.github/workflows/compat-reported.yml"-[ -f "$script" ] || { echo "compat-reported-commit: $script not present, skipped"; exit 0; }+[ -f "$script" ] || { echo "==> compat-reported-commit: $script not present, skipped"; exit 0; }work=$(mktemp -d)trap 'rm -rf "$work"' EXIT