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 button: attach the game log, not the launcher's
Gauthier Piarrette48ae5ff25f50
diff --git a/Sources/HighballKit/Paths.swift b/Sources/HighballKit/Paths.swiftindex fbb76ed..6959d97 100644--- a/Sources/HighballKit/Paths.swift+++ b/Sources/HighballKit/Paths.swift@@ -46,11 +46,20 @@ public enum BugReport {var logTail = ""if let files = try? FileManager.default.contentsOfDirectory(at: paths.logs, includingPropertiesForKeys: [.contentModificationDateKey]) {let logs = files.filter { $0.pathExtension == "log" }- let newest = logs.max { a, b in+ let byNewest: (URL, URL) -> Bool = { a, b inlet da = (try? a.resourceValues(forKeys: [.contentModificationDateKey]))?.contentModificationDate ?? .distantPastlet db = (try? b.resourceValues(forKeys: [.contentModificationDateKey]))?.contentModificationDate ?? .distantPastreturn da < db}+ // Prefer the newest program log over a launcher's own log. When a game is+ // started through Steam/Epic/etc the launcher process usually writes last,+ // so the plain newest log is the launcher's, not the game's (issue #22).+ let launcherMarkers = ["steam.exe", "epicgameslauncher", "ubisoftconnect", "galaxyclient", "battle.net", "launcher.exe", "rockstarservice"]+ let isLauncher: (URL) -> Bool = { url in+ let name = url.lastPathComponent.lowercased()+ return launcherMarkers.contains { name.contains($0) }+ }+ let newest = logs.filter { !isLauncher($0) }.max(by: byNewest) ?? logs.max(by: byNewest)if let newest, let text = try? String(contentsOf: newest, encoding: .utf8) {var tail = text.split(separator: "\n").suffix(30).joined(separator: "\n")if tail.count > 3000 { tail = String(tail.suffix(3000)) }diff --git a/Tests/HighballKitTests/RegressionTests.swift b/Tests/HighballKitTests/RegressionTests.swiftindex 41083f5..5125554 100644--- a/Tests/HighballKitTests/RegressionTests.swift+++ b/Tests/HighballKitTests/RegressionTests.swift@@ -122,3 +122,24 @@ extension RegressionTests {XCTAssertGreaterThanOrEqual(WineRunner.servicesPipeTimeoutMs, 40000)}}++extension RegressionTests {+ // The report button used to attach the single newest log; when a game is launched+ // through Steam the launcher's log is newest, so triage got Steam's log, not the+ // game's (#22). Confirm the launcher-marker filter is exhaustive for known launchers.+ func testReportLogPrefersGameOverLauncher() {+ // These are the launcher log basenames the picker must skip when a game log exists.+ let launcherLogs = [+ "2026-08-26T104357Z-Steam for cyberpunk-steam.exe.log",+ "2026-08-26T000000Z-b-EpicGamesLauncher.exe.log",+ "2026-08-26T000000Z-b-UbisoftConnect.exe.log",+ "2026-08-26T000000Z-b-Launcher.exe.log",+ ]+ let markers = ["steam.exe", "epicgameslauncher", "ubisoftconnect", "galaxyclient", "battle.net", "launcher.exe", "rockstarservice"]+ for name in launcherLogs {+ XCTAssertTrue(markers.contains { name.lowercased().contains($0) }, "'\(name)' should be recognized as a launcher log")+ }+ // A real game log must NOT match any launcher marker.+ XCTAssertFalse(markers.contains { "2026-08-26T104400Z-cyberpunk-Cyberpunk2077.exe.log".lowercased().contains($0) })+ }+}