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 DLL override typed into the variables box is pointed out, with a button that moves it
Gauthier Piarrette9fb11fff08e9
diff --git a/Sources/HighballApp/BottleView.swift b/Sources/HighballApp/BottleView.swiftindex 1e6a4e4..a261469 100644--- a/Sources/HighballApp/BottleView.swift+++ b/Sources/HighballApp/BottleView.swift@@ -700,6 +700,11 @@ struct PinSettingsSheet: View {.overlay(RoundedRectangle(cornerRadius: 6).stroke(.quaternary))Text(L("One KEY=VALUE per line, applied only to this program.")).font(.caption).foregroundStyle(.secondary)+ let lookalikes = EnvText.dllOverrideLookalikes(in: EnvText.parse(envText).environment)+ if !lookalikes.isEmpty {+ Text(DllOverrideHint.text(for: lookalikes)).font(.caption).foregroundStyle(HB.amber)+ .fixedSize(horizontal: false, vertical: true)+ }}Picker(L("Renderer"), selection: $pin.renderer) {Text(L("Environment default")).tag(Renderer?.none)@@ -741,6 +746,7 @@ struct EnvEditor: View {let bottle: Bottle@State private var text: String = ""@State private var ignored: [String] = []+ @State private var lookalikes: [(key: String, value: String)] = []@State private var loaded = falsevar body: some View {@@ -752,15 +758,30 @@ struct EnvEditor: View {if !ignored.isEmpty {Text(L("Ignored, not KEY=VALUE: ") + ignored.joined(separator: ", ")).font(.caption).foregroundStyle(HB.amber)}+ // A DLL override typed here as a variable never reaches Wine (highball#202, #203).+ if !lookalikes.isEmpty {+ Text(DllOverrideHint.text(for: lookalikes)).font(.caption).foregroundStyle(HB.amber)+ .fixedSize(horizontal: false, vertical: true)+ Button(L("Move to DLL overrides")) {+ var copy = state.bottles.first { $0.name == bottle.name } ?? bottle+ copy.settings.adoptDllOverrideLookalikes()+ state.update(copy)+ text = EnvText.text(for: copy.settings.environment)+ }+ .controlSize(.small)+ }}.onAppear {guard !loaded else { return }loaded = true- text = EnvText.text(for: (state.bottles.first { $0.name == bottle.name } ?? bottle).settings.environment)+ let live = (state.bottles.first { $0.name == bottle.name } ?? bottle).settings.environment+ text = EnvText.text(for: live)+ lookalikes = EnvText.dllOverrideLookalikes(in: live)}.onChange(of: text) { _, newValue inlet parsed = EnvText.parse(newValue)ignored = parsed.ignored+ lookalikes = EnvText.dllOverrideLookalikes(in: parsed.environment)var copy = state.bottles.first { $0.name == bottle.name } ?? bottleguard copy.settings.environment != parsed.environment else { return }copy.settings.environment = parsed.environment@@ -769,6 +790,16 @@ struct EnvEditor: View {}}+/// The one sentence both variable editors show under a DLL override typed as a variable.+enum DllOverrideHint {+ static func text(for entries: [(key: String, value: String)]) -> String {+ let names = entries.map { "\($0.key)=\($0.value)" }.joined(separator: ", ")+ return names + " " + (entries.count == 1+ ? L("looks like a DLL override. Wine reads those only from the DLL overrides field, so as a variable it does nothing.")+ : L("look like DLL overrides. Wine reads those only from the DLL overrides field, so as variables they do nothing."))+ }+}+/// A small ⓘ (or ⚠) that explains one setting. Click opens a popover; hovering still shows/// the same text as a tooltip, so it works either way.private struct InfoButton: View {diff --git a/Sources/HighballApp/L10n.swift b/Sources/HighballApp/L10n.swiftindex 65091aa..a6bdb71 100644--- a/Sources/HighballApp/L10n.swift+++ b/Sources/HighballApp/L10n.swift@@ -435,6 +435,9 @@ enum L10n {"Log": "Journal","Ignored, not KEY=VALUE: ": "Ignoré, pas de la forme CLÉ=VALEUR : ","Ignored, not name=n,b: ": "Ignoré, pas de la forme nom=n,b : ",+ "looks like a DLL override. Wine reads those only from the DLL overrides field, so as a variable it does nothing.": "ressemble à une surcharge de DLL. Wine ne les lit que dans le champ Surcharges de DLL, donc en variable cela ne fait rien.",+ "look like DLL overrides. Wine reads those only from the DLL overrides field, so as variables they do nothing.": "ressemblent à des surcharges de DLL. Wine ne les lit que dans le champ Surcharges de DLL, donc en variables cela ne fait rien.",+ "Move to DLL overrides": "Déplacer vers les surcharges de DLL","Show the log": "Afficher le journal","Show the logs folder": "Afficher le dossier des journaux","Some files couldn't be removed": "Certains fichiers n'ont pas pu être supprimés",diff --git a/Sources/HighballKit/EnvText.swift b/Sources/HighballKit/EnvText.swiftindex 09f0677..ff26ba4 100644--- a/Sources/HighballKit/EnvText.swift+++ b/Sources/HighballKit/EnvText.swift@@ -32,6 +32,42 @@ public enum EnvText {}}+public extension EnvText {+ /// The entries of an environment that read as Wine DLL overrides typed into the wrong box: a+ /// lowercase name (a DLL, never a variable) with an override order for a value, "winhttp=n,b"+ /// or "mfplat=". Wine reads overrides from WINEDLLOVERRIDES and the registry only, so a+ /// variable named winhttp does nothing, and two reporters set one in a day (highball#202, #203).+ static func dllOverrideLookalikes(in environment: [String: String]) -> [(key: String, value: String)] {+ environment.filter { key, value in+ key == key.lowercased()+ && value.trimmingCharacters(in: .whitespaces)+ .range(of: "^((n|b|native|builtin)(,(n|b|native|builtin))?|d|disabled)?$", options: .regularExpression) != nil+ }+ .sorted { $0.key < $1.key }+ .map { (key: $0.key, value: $0.value) }+ }+}++public extension BottleSettings {+ /// Moves the override lookalikes of `environment` into `dllOverrides`, where Wine reads them.+ /// Returns what moved, "name=order" each, in name order.+ @discardableResult+ mutating func adoptDllOverrideLookalikes() -> [String] {+ let moved = EnvText.dllOverrideLookalikes(in: environment)+ guard !moved.isEmpty else { return [] }+ var parts = dllOverrides.split(separator: ";").map { $0.trimmingCharacters(in: .whitespaces) }.filter { !$0.isEmpty }+ var names: [String] = []+ for entry in moved {+ environment.removeValue(forKey: entry.key)+ let text = "\(entry.key)=\(entry.value.trimmingCharacters(in: .whitespaces))"+ if !parts.contains(text) { parts.append(text) }+ names.append(text)+ }+ dllOverrides = parts.joined(separator: ";")+ return names+ }+}+/// Launch logs by name: "<stamp>-<environment>-<executable>.log", "-2.log" when two launches/// share a second. The stamp sorts, so the newest name is the newest launch.public enum LaunchLogs {diff --git a/Tests/HighballKitTests/EnvTextTests.swift b/Tests/HighballKitTests/EnvTextTests.swiftindex 74484e8..49c8062 100644--- a/Tests/HighballKitTests/EnvTextTests.swift+++ b/Tests/HighballKitTests/EnvTextTests.swift@@ -24,6 +24,23 @@ final class EnvTextTests: XCTestCase {XCTAssertEqual(WineRunner.dllOverridesIgnored(""), [])}+ func testDllOverrideLookalikesAmongVariables() {+ // Lowercase name plus an override order reads as a DLL override, whatever the box (highball#202, #203).+ let env = ["winhttp": "n,b", "mfplat": "", "MVK_SHADOW_IMPORT": "1", "DXMT_METAL_HUD": "", "d3d11": "native", "path": "C:\\x"]+ XCTAssertEqual(EnvText.dllOverrideLookalikes(in: env).map { "\($0.key)=\($0.value)" }, ["d3d11=native", "mfplat=", "winhttp=n,b"])+ XCTAssertEqual(EnvText.dllOverrideLookalikes(in: ["WINEDEBUG": "-all"]).count, 0)+ }++ func testAdoptingLookalikesMovesThemIntoTheDllOverridesField() {+ var s = BottleSettings(name: "t", engineID: "e")+ s.dllOverrides = "version=n,b"+ s.environment = ["winhttp": "n,b", "MVK_SHADOW_IMPORT": "1", "version": "n,b"]+ XCTAssertEqual(s.adoptDllOverrideLookalikes(), ["version=n,b", "winhttp=n,b"])+ XCTAssertEqual(s.dllOverrides, "version=n,b;winhttp=n,b")+ XCTAssertEqual(s.environment, ["MVK_SHADOW_IMPORT": "1"])+ XCTAssertEqual(s.adoptDllOverrideLookalikes(), [])+ }+func testNewestLaunchLogByName() {let names = ["2026-09-11T154113Z-Gaming-steam.exe.log", "2026-09-11T153459Z-Gaming-steam.exe.log","2026-09-11T154110Z-Gaming-reg.exe.log", "2026-09-11T160000Z-cx-steam-steam.exe.log",