Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.
Swift apple-silicond3dmetaldxmtdxvkfexgame-porting-toolkitgamingmac-gamingmacosmetalmoltenvksteamswiftuivkd3d-protonwhisky-alternativewindows-gameswinewine-wrapper
Report a problem never attaches the app's own chores (registry writes, Steam's shutdown, winecfg): three reports came with a keyboard-mapping registry write instead of the game's log (highball#184, #135, #235)
Gauthier Piarrette0c4e57e254dd
diff --git a/Sources/HighballKit/Paths.swift b/Sources/HighballKit/Paths.swiftindex f3e2511..a763ba5 100644--- a/Sources/HighballKit/Paths.swift+++ b/Sources/HighballKit/Paths.swift@@ -445,7 +445,12 @@ public enum BugReport {let modified: (URL) -> Date = {(try? $0.resourceValues(forKeys: key))?.contentModificationDate ?? .distantPast}- let newestFirst = logs.sorted { modified($0) > modified($1) }.prefix(maxLogsExamined)+ // The app's own chores (a registry write, Steam's shutdown, winecfg) never show a game+ // failing, yet they are written after every launch setting change, so they were often the+ // newest file: three reports came with a keyboard-mapping registry write attached and+ // nothing else (highball#184, #135, #235). They are left out before the newest are taken,+ // so they cannot crowd the game's own log out either.+ let newestFirst = logs.filter { !isChore($0) }.sorted { modified($0) > modified($1) }.prefix(maxLogsExamined)// A wineboot log is the prefix booting, and it ends before the game starts, so it can// never show a game failing. It nonetheless matches a backend marker, because wineboot// creates a d3d adapter and Wine shouts `wined3d_adapter_create` while doing it — so the@@ -468,6 +473,14 @@ public enum BugReport {return fallback ?? bootFallback}+ /// A log of the app's own housekeeping, by the label in its name: `<stamp>-<bottle>-reg.log`,+ /// numbered `-reg-2.log` when two land in the same second. Pure, so it is tested by name.+ static func isChore(_ url: URL) -> Bool {+ var name = url.deletingPathExtension().lastPathComponent+ if let dash = name.lastIndex(of: "-"), Int(name[name.index(after: dash)...]) != nil { name = String(name[..<dash]) }+ return ["-reg", "-steam-shutdown", "-winecfg"].contains { name.hasSuffix($0) }+ }+/// `samplingLiveGames: false` skips the live-process sample (tests; callers that must not/// block for the ~5 s a sample takes).public static func url(version: String, paths: HighballPaths = HighballPaths(), samplingLiveGames: Bool = true) -> URL {diff --git a/Tests/HighballKitTests/RegressionTests.swift b/Tests/HighballKitTests/RegressionTests.swiftindex 90fa0c8..f48744a 100644--- a/Tests/HighballKitTests/RegressionTests.swift+++ b/Tests/HighballKitTests/RegressionTests.swift@@ -365,6 +365,25 @@ extension RegressionTests {XCTAssertTrue(digest.contains("dxvk.enableAsync = False"), "the effective config block must survive")}+ // highball#184, #135, #235: the newest log was a registry write the app made after the game,+ // and with no graphics marker in the game's log the picker fell back to the newest file.+ func testReportNeverAttachesTheAppsOwnChores() throws {+ let dir = FileManager.default.temporaryDirectory.appending(path: "hb-chores-\(UUID().uuidString)")+ try FileManager.default.createDirectory(at: dir, withIntermediateDirectories: true)+ defer { try? FileManager.default.removeItem(at: dir) }+ let game = dir.appending(path: "2026-10-02T101500Z-Games-TS4_x64.exe.log")+ try "# gin e bottle=Games renderer=dxmt\n# wine TS4_x64.exe\nerr: the launcher crashed\n".write(to: game, atomically: true, encoding: .utf8)+ try FileManager.default.setAttributes([.modificationDate: Date().addingTimeInterval(-120)], ofItemAtPath: game.path)+ for chore in ["2026-10-02T101700Z-Games-reg.log", "2026-10-02T101700Z-Games-reg-2.log",+ "2026-10-02T101701Z-Games-steam-shutdown.log", "2026-10-02T101702Z-Games-winecfg.log"] {+ try "reg add HKCU\\Software\\Wine\\Mac Driver /v RightOptionIsAlt\n".write(to: dir.appending(path: chore), atomically: true, encoding: .utf8)+ }+ XCTAssertEqual(BugReport.mostInformativeLog(in: [dir])?.url.lastPathComponent, game.lastPathComponent)+ XCTAssertTrue(BugReport.isChore(dir.appending(path: "x-Games-reg-12.log")))+ XCTAssertFalse(BugReport.isChore(dir.appending(path: "x-Games-regedit.exe.log")), "a program called reg-something is not a chore")+ XCTAssertFalse(BugReport.isChore(dir.appending(path: "x-Games-winetricks-corefonts.log")), "a winetricks log explains a failed dependency")+ }+// A blind suffix(30) is useless on a wine log: the end is MoltenVK warning spam while the// block that identifies the backend sits thousands of lines earlier (6547 of 8185 in #21).func testReportDigestKeepsTheBackendBlockBuriedMidLogAndCollapsesSpam() {