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
A game its publisher blocks on macOS is blocked like an anti-cheat one, and says whose choice it is
Gauthier Piarrette9db84fe375e0
diff --git a/Sources/HighballApp/GameDetailView.swift b/Sources/HighballApp/GameDetailView.swiftindex bc998f8..2112c6b 100644--- a/Sources/HighballApp/GameDetailView.swift+++ b/Sources/HighballApp/GameDetailView.swift@@ -105,7 +105,7 @@ struct GameDetailView: View {private var verdictColor: Color {switch entry?.status {case "verified-local": return HB.good- case "blocked-anticheat": return HB.bad+ case let s? where s.hasPrefix("blocked-"): return HB.badcase nil: return .secondarydefault: return HB.amber}@@ -195,7 +195,9 @@ struct GameDetailView: View {// The row put the Windows build first (a Mac build missing content); the Mac one stays a click away.Button(L("Play on Mac")) { state.playOnMac(item) }.controlSize(.large)} else {- Text(blocked ? L("Its anti-cheat does not run on macOS.") : L("Highball will ask how it went when you finish."))+ Text(!blocked ? L("Highball will ask how it went when you finish.")+ : entry?.status == "blocked-publisher" ? L("Its publisher stops it on macOS on purpose.")+ : L("Its anti-cheat does not run on macOS.")).font(.callout).foregroundStyle(.secondary)}} else if item.source == .epic {diff --git a/Sources/HighballApp/L10n.swift b/Sources/HighballApp/L10n.swiftindex 4fe0c8d..bb0ed3e 100644--- a/Sources/HighballApp/L10n.swift+++ b/Sources/HighballApp/L10n.swift@@ -415,6 +415,7 @@ enum L10n {"It played fine": "Ça a bien marché","It was running with %@ and quit after %d seconds without an error the app could read.": "Il tournait avec %@ et s'est fermé après %d secondes sans erreur lisible par l'app.","Its anti-cheat does not run on macOS.": "Son anti-triche ne fonctionne pas sur macOS.",+ "Its publisher stops it on macOS on purpose.": "Son éditeur l'arrête volontairement sur macOS.","Launch arguments": "Arguments de lancement","New environment…": "Nouvel environnement…","No row in the compatibility database yet.": "Pas encore d'entrée dans la base de compatibilité.",diff --git a/Sources/HighballApp/LibraryView.swift b/Sources/HighballApp/LibraryView.swiftindex f9086d4..e63c9a3 100644--- a/Sources/HighballApp/LibraryView.swift+++ b/Sources/HighballApp/LibraryView.swift@@ -343,7 +343,7 @@ func verdictLabel(_ status: String?) -> (String, Color)? {case "verified-local": return (L("Verified"), HB.good)case "reported-upstream": return (L("Reported"), Color(red: 0.55, green: 0.70, blue: 0.90))case "community": return (L("Community"), HB.warn)- case "blocked-anticheat": return (L("Blocked"), HB.bad)+ case let s? where s.hasPrefix("blocked-"): return (L("Blocked"), HB.bad)default: return nil}}diff --git a/Sources/HighballKit/GamePageCopy.swift b/Sources/HighballKit/GamePageCopy.swiftindex 2181a30..07e621b 100644--- a/Sources/HighballKit/GamePageCopy.swift+++ b/Sources/HighballKit/GamePageCopy.swift@@ -21,6 +21,9 @@ public enum GamePageCopy {let name = entry.anticheat?.names.first ?? "its anti-cheat"return Verdict(headline: "Can't run: \(name).",detail: entry.anticheat?.note ?? "Its anti-cheat does not run on macOS.")+ case "blocked-publisher":+ return Verdict(headline: "Can't run: its publisher blocks macOS.",+ detail: "The game stops itself when it finds macOS, whatever the engine or graphics mode.")case "verified-local":let chip = entry.verified?.chip.map(shortChip)var head = chip.map { "Verified on an \($0)." } ?? "Verified on this project's own Mac."diff --git a/Sources/HighballKit/SteamLibrary.swift b/Sources/HighballKit/SteamLibrary.swiftindex 2b50641..12c82dd 100644--- a/Sources/HighballKit/SteamLibrary.swift+++ b/Sources/HighballKit/SteamLibrary.swift@@ -81,7 +81,7 @@ public struct GameDBEntry: Codable, Sendable {/// Legendary's app name for the Epic copy (#63: an Epic copy of a row's game matched nothing,/// so Play never asked for D3DMetal and DXMT refused the DirectX 12 game).public var epic_app_name: String?- public var status: String // verified-local | reported-upstream | community | blocked-anticheat+ public var status: String // verified-local | reported-upstream | community | blocked-anticheat | blocked-publisherpublic var renderer: Renderer?/// The game draws with Vulkan directly (The Sims Legacy Collection): every graphics mode is a/// Direct3D layer, so none applies, and the page must say so instead of offering a choice (#44).@@ -129,7 +129,9 @@ public struct GameDBEntry: Codable, Sendable {/// false` marks a Mac port that no longer runs, which outranks the store's flag (MacSteamBuild).public var nativeMac: NativeMacInfo?- public var isBlocked: Bool { status == "blocked-anticheat" }+ /// Any kind of block: kernel anti-cheat, or a publisher that stops the game on macOS on purpose+ /// (World of Warships). The game cannot run, so no renderer advice and no Play.+ public var isBlocked: Bool { status.hasPrefix("blocked-") }/// The renderer the row recommends on the given OS version, nil for "the bottle's own".public func effectiveRenderer(osMajor: Int = ProcessInfo.processInfo.operatingSystemVersion.majorVersion) -> Renderer? {diff --git a/Tests/HighballKitTests/GamePageCopyTests.swift b/Tests/HighballKitTests/GamePageCopyTests.swiftindex 233c2a3..69edad3 100644--- a/Tests/HighballKitTests/GamePageCopyTests.swift+++ b/Tests/HighballKitTests/GamePageCopyTests.swift@@ -38,6 +38,18 @@ final class GamePageCopyTests: XCTestCase {XCTAssertEqual(GamePageCopy.verdict(e, myChip: "Apple M1", today: today).headline, "Can't run: Vanguard.")}+ /// World of Warships stops itself on macOS on purpose: blocked like an anti-cheat game (no+ /// Play, no renderer), but the page must not blame an anti-cheat it does not have.+ func testAPublisherBlockIsBlockedAndSaysWhose() throws {+ let e = try entry(#"{"id":"x","title":"X","steam_appid":1,"status":"blocked-publisher","renderer":null}"#)+ XCTAssertTrue(e.isBlocked)+ XCTAssertEqual(GamePageCopy.verdict(e, myChip: "Apple M1", today: today).headline, "Can't run: its publisher blocks macOS.")+ let anticheat = try entry(#"{"id":"y","title":"Y","steam_appid":2,"status":"blocked-anticheat"}"#)+ XCTAssertTrue(anticheat.isBlocked, "the anti-cheat block keeps its behaviour")+ let community = try entry(#"{"id":"z","title":"Z","steam_appid":3,"status":"community"}"#)+ XCTAssertFalse(community.isBlocked)+ }+/// An opt-in fix is never Play's to apply (highball-db#60): the page says so instead of/// listing steps Play will not take, and decoding keeps the flag.func testAnOptInFixIsLeftToTheOwner() throws {diff --git a/Tests/HighballKitTests/RecipeDBTests.swift b/Tests/HighballKitTests/RecipeDBTests.swiftindex 6b24b52..007ef51 100644--- a/Tests/HighballKitTests/RecipeDBTests.swift+++ b/Tests/HighballKitTests/RecipeDBTests.swift@@ -49,7 +49,7 @@ final class RecipeDBTests: XCTestCase {do {let e = try JSONDecoder.highball.decode(GameDBEntry.self, from: Data(contentsOf: f))XCTAssertFalse(e.id.isEmpty, f.lastPathComponent)- XCTAssertTrue(["verified-local", "reported-upstream", "community", "blocked-anticheat"].contains(e.status),+ XCTAssertTrue(["verified-local", "reported-upstream", "community", "blocked-anticheat", "blocked-publisher"].contains(e.status),"\(f.lastPathComponent): unknown status '\(e.status)'")} catch {XCTFail("\(f.lastPathComponent) failed to decode: \(error)")