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 winetricks step stops the Steam client first, then the environment when only Wine's own processes are left, and says so when a program the owner started is still running. winetricks ends its verbs with 'wineserver -w', which waits for every Windows program in the environment to end, so with a Steam window open a .NET or fonts install never finished once it could start (a1d0713 let it start). Measured on the M4, 2026-10-26: 'winetricks win10' beside a running program still waited after 90 s, 28 s alone. With the change, through the CLI's recipe apply on a scratch environment: a program working outside C:\windows stops the step in 6 s with a message to quit it or use Stop all processes, and with only Wine's own processes the environment is stopped and win10 finishes in 9 s. Reported by scrilisk on Discord. 591 tests pass on the M4.
Gauthier Piarrette6140cbad0b59
diff --git a/Sources/HighballKit/Recipe.swift b/Sources/HighballKit/Recipe.swiftindex e6b8322..44a0634 100644--- a/Sources/HighballKit/Recipe.swift+++ b/Sources/HighballKit/Recipe.swift@@ -577,6 +577,22 @@ public struct RecipeRunner: Sendable {try await runner.regAdd(key: key, name: name, type: type, data: data)case let .winetricks(verbs, _):guard let wt = engine.winetricks else { throw HighballError.missing("winetricks in engine \(engine.id)") }+ // winetricks ends its verbs with `wineserver -w`, which waits for every Windows program in the+ // environment to end, so with a Steam window open the step never finished once it could start+ // (measured on the M4, 2026-10-26: `winetricks win10` beside a running program still waited after+ // 90 s, 28 s alone). The Steam client is stopped the way Play stops it, then the environment when+ // only Wine's own processes are left, and a program the owner started stops the step with a+ // message instead of a wait without end.+ if ProcessTable.liveServer(forPrefix: bottle.url) != nil {+ try? await runner.stopSteam()+ // Steam's web helpers can outlive the client by a moment.+ for _ in 0..<10 where !ProcessTable.isIdle(prefix: bottle.url) { try await Task.sleep(for: .milliseconds(500)) }+ guard ProcessTable.isIdle(prefix: bottle.url) else {+ throw HighballError.failed("A program is still running in \(bottle.name), and Windows components install only once it has closed. Quit it, or use Stop all processes, then try again.")+ }+ _ = try? runner.kill()+ log?("[\(recipe.id)] stopped \(bottle.name) first, since winetricks waits for every program in it to end")+ }// WINE_BIN/WINESERVER_BIN/WINE_BINDIR are winetricks' own overrides for setups where// its binary detection fails; without them dotnet48 and friends abort on this engine// (verified 2026-08-25, issue #16). bash rather than sh for the same reason winetricks