Skip to content

Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.

The Engine pickers name what each engine carries. They listed bare ids, so a player looking for Game Porting Toolkit 4 saw x64-crossover26.3-r26 and r27 side by side with nothing to tell them apart (highball#546). A row now reads the manifest's display name and the id, 'Wine 11.0 (CrossOver 26.3) r26, D3DMetal 4.0 beta 3 · x64-crossover26.3-r26', the same name and id the game page shows when only one engine is offered, so the ids replies and recipes refer to stay visible. A missing engine has no manifest left and keeps its id.

Gauthier Piarrette665b08d0ac87
diff --git a/Sources/HighballApp/BottleView.swift b/Sources/HighballApp/BottleView.swift
index ab2832b..1524314 100644
--- a/Sources/HighballApp/BottleView.swift
+++ b/Sources/HighballApp/BottleView.swift
@@ -560,7 +560,7 @@ struct EnvironmentSettingsPage: View {
state.engineTransition = AppState.EngineTransition(bottleName: current.name, targetID: newID)
})) {
ForEach(offered, id: \.id) { e in
- Text(verbatim: e.missing ? "\(e.id) (\(L("missing")))" : e.installed ? e.id : "\(e.id) (\(L("download")))").tag(e.id)
+ Text(verbatim: e.missing ? "\(e.label) (\(L("missing")))" : e.installed ? e.label : "\(e.label) (\(L("download")))").tag(e.id)
}
}
.disabled(state.busy)
diff --git a/Sources/HighballApp/GameDetailView.swift b/Sources/HighballApp/GameDetailView.swift
index 73d5bd6..21a032e 100644
--- a/Sources/HighballApp/GameDetailView.swift
+++ b/Sources/HighballApp/GameDetailView.swift
@@ -526,7 +526,7 @@ struct GameDetailView: View {
state.engineTransition = AppState.EngineTransition(bottleName: bottle.name, targetID: newID)
})) {
ForEach(offered, id: \.id) { e in
- Text(verbatim: e.missing ? "\(e.id) (\(L("missing")))" : e.installed ? e.id : "\(e.id) (\(L("download")))").tag(e.id)
+ Text(verbatim: e.missing ? "\(e.label) (\(L("missing")))" : e.installed ? e.label : "\(e.label) (\(L("download")))").tag(e.id)
}
}.labelsHidden().frame(maxWidth: 360).disabled(state.busy)
} else {
diff --git a/Sources/HighballKit/EngineStore.swift b/Sources/HighballKit/EngineStore.swift
index c6d4309..7ea786c 100644
--- a/Sources/HighballKit/EngineStore.swift
+++ b/Sources/HighballKit/EngineStore.swift
@@ -200,7 +200,16 @@ public struct EngineStore: Sendable {
public let id: String
public let installed: Bool
public let missing: Bool
- public init(id: String, installed: Bool, missing: Bool = false) { self.id = id; self.installed = installed; self.missing = missing }
+ /// The manifest's display name, which says what sets revisions apart (a D3DMetal 4 beta, say).
+ /// The pickers showed bare ids, so a player looking for Game Porting Toolkit 4 could not tell
+ /// r26 from r27 (highball#546). Nil for a missing engine, whose manifest is gone with it.
+ public let displayName: String?
+ public init(id: String, installed: Bool, missing: Bool = false, displayName: String? = nil) {
+ self.id = id; self.installed = installed; self.missing = missing; self.displayName = displayName
+ }
+ /// What a picker row says: the display name and the id players and replies refer to, the same
+ /// "name · id" the game page shows when only one engine is offered.
+ public var label: String { displayName.map { "\($0) · \(id)" } ?? id }
}
public static func offeredEngines(installed: [InstalledEngine], known: [EngineManifest], current: String? = nil,
macOS: String = EngineManifest.currentMacOS) -> [OfferedEngine] {
@@ -208,12 +217,12 @@ public struct EngineStore: Sendable {
let ids = Set(installed.map(\.id))
let arch = installed.first { $0.id == current }?.manifest.arch ?? known.first { $0.id == current }?.arch
let have = installed.filter { sameArch(current: arch, target: $0.manifest.arch) }
- .sorted { newestFirst($0.id, $1.id) }.map { OfferedEngine(id: $0.id, installed: true) }
+ .sorted { newestFirst($0.id, $1.id) }.map { OfferedEngine(id: $0.id, installed: true, displayName: $0.manifest.displayName) }
// A manifest with a macOS floor above this Mac is not offered: it would download and
// then run untested (r6's D3DMetal was measured on 27 only). Installed engines stay listed.
let more = known.filter { !ids.contains($0.id) && $0.runs(onMacOS: macOS) && sameArch(current: arch, target: $0.arch) }
.sorted { newestFirst($0.id, $1.id) }
- .map { OfferedEngine(id: $0.id, installed: false) }
+ .map { OfferedEngine(id: $0.id, installed: false, displayName: $0.displayName) }
var rows = have + more
if let current, !rows.contains(where: { $0.id == current }) { rows.append(OfferedEngine(id: current, installed: false, missing: true)) }
return rows
diff --git a/Tests/HighballKitTests/RegressionTests.swift b/Tests/HighballKitTests/RegressionTests.swift
index c6785c6..1d3af1c 100644
--- a/Tests/HighballKitTests/RegressionTests.swift
+++ b/Tests/HighballKitTests/RegressionTests.swift
@@ -1086,6 +1086,9 @@ extension RegressionTests {
XCTAssertEqual(withMissing.map(\.id), ["x64-a-r1", "x64-gone-r0"], "a bottle on an engine that is gone still sees its own row")
XCTAssertEqual(withMissing.last?.missing, true)
XCTAssertEqual(EngineStore.offeredEngines(installed: [r1], known: [], current: r1.id).count, 1, "current engine present: no extra row")
+ // Rows carry the display name, so a picker can say which revision has what (highball#546).
+ XCTAssertEqual(offered.map(\.label), ["e x64-a-r1 · x64-a-r1", "e x64-a-r0 · x64-a-r0", "e x64-a-r10 · x64-a-r10", "e x64-a-r2 · x64-a-r2"])
+ XCTAssertEqual(withMissing.last?.label, "x64-gone-r0", "a missing engine has no manifest, so its row is the id")
}
func testEnginesAboveTheMacOSFloorAreNotOffered() throws {