Skip to content

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

Debug builds only: HB_DEBUG_SETTINGS=<environment> opens the Settings window on that environment's settings page, and HB_DEBUG_NO_ENGINE_UPDATE keeps a scratch build from applying an engine update in the home it runs against. Used to see 1d8e920's page header on the test Mac without a click: Back alone in the Settings window, and the engine named Wine 10.0 or Wine 11.0 (2026-10-07).

Gauthier Piarrette16c9a346fed5
diff --git a/Sources/HighballApp/AppState.swift b/Sources/HighballApp/AppState.swift
index ace860f..935b2cd 100644
--- a/Sources/HighballApp/AppState.swift
+++ b/Sources/HighballApp/AppState.swift
@@ -200,6 +200,12 @@ final class AppState {
/// Steam client makes it wait for the next launch (EngineStore.autoUpdateAllowed).
private var autoUpdateTried = false
func maybeAutoUpdateEngine() {
+ #if DEBUG
+ // HB_DEBUG_NO_ENGINE_UPDATE=1 keeps a scratch build from downloading and applying an engine
+ // update in the home it is pointed at: one launched for screenshots on the test Mac pulled
+ // a whole engine into its real home (2026-10-06).
+ if ProcessInfo.processInfo.environment["HB_DEBUG_NO_ENGINE_UPDATE"] != nil { return }
+ #endif
guard !autoUpdateTried, !busy, !needsOnboarding, runningSessions.isEmpty,
let update = engineUpdate, let current = defaultEngine,
EngineStore.autoUpdateAllowed(from: current.manifest, to: update) else { return }
diff --git a/Sources/HighballApp/HighballApp.swift b/Sources/HighballApp/HighballApp.swift
index e7ceff5..841e0d5 100644
--- a/Sources/HighballApp/HighballApp.swift
+++ b/Sources/HighballApp/HighballApp.swift
@@ -182,6 +182,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
struct ContentView: View {
@Environment(AppState.self) private var state
+ #if DEBUG
+ @Environment(\.openSettings) private var openSettings
+ #endif
@State private var showAddGames = false
/// Where a dropped or chosen program runs: the environment page it came from, else the default.
@@ -260,6 +263,14 @@ struct ContentView: View {
guard let bottle = state.bottles.first(where: { $0.name == name }) else { return }
state.showSteam(in: bottle)
}
+ // HB_DEBUG_SETTINGS="<environment>" opens the Settings window on that environment's settings
+ // page (EnvironmentsPane pushes it), so a script can capture the page without a click.
+ .task {
+ guard ProcessInfo.processInfo.environment["HB_DEBUG_SETTINGS"] != nil else { return }
+ try? await Task.sleep(for: .seconds(4))
+ state.settingsTab = .environments
+ openSettings()
+ }
// HB_DEBUG_PLAY="<library item id>" presses Play on that tile, so a script can capture
// the questions Play asks (the engine ask, highball-db#318).
.task {
diff --git a/Sources/HighballApp/SettingsView.swift b/Sources/HighballApp/SettingsView.swift
index c79b440..bc7715b 100644
--- a/Sources/HighballApp/SettingsView.swift
+++ b/Sources/HighballApp/SettingsView.swift
@@ -141,6 +141,14 @@ struct EnvironmentsPane: View {
Button(L("Delete"), role: .destructive) { if let n = pendingDelete { state.deleteBottle(n) }; pendingDelete = nil }
Button(L("Cancel"), role: .cancel) { pendingDelete = nil }
}
+ #if DEBUG
+ // HB_DEBUG_SETTINGS="<environment>" (see ContentView) lands on that environment's page.
+ .task {
+ if let name = ProcessInfo.processInfo.environment["HB_DEBUG_SETTINGS"], navigationPath.isEmpty {
+ navigationPath.append(EnvironmentSettingsDestination(name: name))
+ }
+ }
+ #endif
}
}