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
nightly: installer step bounded (interactive installers recorded, not hung), missing recipe engines installed from the bundled manifest; game smoke: bottle column, r6 canary, Caretaker and Umamusume (DXMT) canaries, bottle-scoped Steam kills; bundled manifest tests
Gauthier Piarrette0607c6897a8f
diff --git a/Scripts/game-smoke.sh b/Scripts/game-smoke.shindex 19a92a2..d15365e 100755--- a/Scripts/game-smoke.sh+++ b/Scripts/game-smoke.sh@@ -37,23 +37,35 @@ GAMES=("319510|dxvk|Five Nights|fnaf|"# Canary set (2026-09-18): one title per graphics path, all installed here as demos or# verified rows, so a renderer or engine change cannot slip through on a path nobody ran.- # Not The Last Caretaker demo: after its first run it comes back fullscreen and black on- # D3DMetal, windowed arguments or not (three runs 2026-09-18, screen unlocked, 1% lit at- # display size), so it cannot be a canary; the finding lives in its db row.+ # The Last Caretaker demo went black after its first run because its 4K menu video kills a+ # D3DMetal thread through Media Foundation; the the-last-caretaker recipe (mfplat off for the+ # game's exe) fixes it and must be applied to the bottle, so this row guards the recipe too.+ "3916150|d3dmetal|Caretaker|caretaker|""1773210|d3dmetal|HumanitZ|humanitz|""3527290|dxvk|PEAK|peak|"+ # DXMT, the default mode, had no canary until 2026-09-19. Umamusume's title screen animates+ # and needs no sign-in (Cygames' EULA accepted once in Steam).+ "3224770|dxmt|Umamusume|umamusume|"+ # A sixth column names a bottle other than Gaming: canary-r6 is a clone of Gaming on the r6+ # engine (D3DMetal from GPTK 4), so an engine revision gets the same guard as the default.+ "1773210|d3dmetal|HumanitZ|humanitz-r6||canary-r6")only=("$@")results=(); passed=truefor row in "${GAMES[@]}"; do- IFS='|' read -r appid renderer winre name extra <<< "$row"- if [ ${#only[@]} -gt 0 ] && ! printf '%s\n' "${only[@]}" | grep -qx "$appid"; then continue; fi+ IFS='|' read -r appid renderer winre name extra bottle <<< "$row"+ bottle=${bottle:-Gaming}+ if [ ${#only[@]} -gt 0 ] && ! printf '%s\n' "${only[@]}" | grep -qxE "$appid|$name"; then continue; fi+ if [ ! -d "$H/bottles/$bottle" ]; then echo "[$name] bottle $bottle absent"; results+=("{\"appid\":$appid,\"name\":\"$name\",\"result\":\"bottle absent\"}"); continue; fi+ ST="$H/bottles/$bottle/drive_c/Program Files (x86)/Steam/steamapps"st=$(grep -E '"StateFlags"' "$ST/appmanifest_$appid.acf" 2>/dev/null | grep -oE '[0-9]+' | tail -1)if [ "$st" != "4" ]; then echo "[$name] not installed"; results+=("{\"appid\":$appid,\"name\":\"$name\",\"result\":\"not installed\"}"); continue; fiecho "[$(date +%H:%M:%S)] $name ($appid) under $renderer"- pkill -9 -f 'Steam.steam\.exe' 2>/dev/null; pkill -9 -f steamwebhelper 2>/dev/null; sleep 3- ($HB run Gaming 'C:\Program Files (x86)\Steam\steam.exe' --renderer $renderer -- -silent > /dev/null 2>&1 &); sleep 35- ($HB run Gaming 'C:\Program Files (x86)\Steam\steam.exe' -- -applaunch $appid $extra > "$OUT/$name.log" 2>&1 &)+ # Scoped to the row's bottle: a machine-wide Steam kill took down the launcher nightly's own+ # Steam when both ran (2026-09-19).+ $HB bottle kill "$bottle" >/dev/null 2>&1; sleep 3+ ($HB run "$bottle" 'C:\Program Files (x86)\Steam\steam.exe' --renderer $renderer -- -silent > /dev/null 2>&1 &); sleep 35+ ($HB run "$bottle" 'C:\Program Files (x86)\Steam\steam.exe' -- -applaunch $appid $extra > "$OUT/$name.log" 2>&1 &)n=0; until "$WINLIST" 2>/dev/null | grep -iE "wine.*($winre)" | grep -q 'on=true' || [ $n -ge 60 ]; do sleep 3; n=$((n+1)); doneid=$("$WINLIST" 2>/dev/null | grep -iE "wine.*($winre)" | grep on=true | head -1 | awk '{print $1}')if [ -z "$id" ]; then echo " FAIL: no window within $((n*3))s"; results+=("{\"appid\":$appid,\"name\":\"$name\",\"result\":\"no window\"}"); passed=false@@ -84,7 +96,7 @@ for row in "${GAMES[@]}"; do# kill the game by its window-owning wine process if still up (generic)for p in $(ps -axo pid,command | grep -E 'steamapps[/\\\\]common' | grep -vE 'grep|steam\.exe|steamwebhelper|gameoverlayui' | awk '{print $1}'); do kill -9 $p 2>/dev/null; donedone-pkill -9 -f 'Steam.steam\.exe' 2>/dev/null; pkill -9 -f steamwebhelper 2>/dev/null+for b in Gaming canary-r6; do $HB bottle kill "$b" >/dev/null 2>&1; done# Nothing installed is not a pass: say so and exit 3 so Scripts/gate.sh records "skipped".if ! printf '%s\n' "${results[@]}" | grep -qv '"not installed"'; thenecho "GAME SMOKE SKIPPED: none of the table's games is installed in the Gaming bottle"diff --git a/Scripts/launcher-nightly.sh b/Scripts/launcher-nightly.shindex 2b24185..a636feb 100755--- a/Scripts/launcher-nightly.sh+++ b/Scripts/launcher-nightly.sh@@ -38,7 +38,32 @@ PYecho "[$id] blocked by its recipe (expected)"; results+=("{\"id\":\"$id\",\"result\":\"blocked\"}"); continuefiengarg=(); [ "$engine" != default ] && engarg=(--engine "$engine")- if ! $HB bottle create "$b" "${engarg[@]}" --recipe "$f" > "$OUT/$id-install.log" 2>&1; then+ # A recipe may pin an engine this Mac has not installed (EA app pins r4, 2026-09-19). The app+ # downloads it before Play; the nightly does the same from the bundled manifest, so the+ # engine download path is exercised too and a missing engine is not counted as a failure.+ if [ "$engine" != default ] && ! $HB engine list 2>/dev/null | grep -q "^$engine "; then+ if [ -f "spike/engines/$engine.json" ]; then+ echo "[$id] installing engine $engine first"+ $HB engine install "spike/engines/$engine.json" --accept-d3dmetal-license > "$OUT/$id-engine-install.log" 2>&1 || { echo "[$id] engine install FAILED (see $OUT/$id-engine-install.log)"; results+=("{\"id\":\"$id\",\"result\":\"engine-install-failed\"}"); continue; }+ else+ echo "[$id] recipe engine $engine is not bundled"; results+=("{\"id\":\"$id\",\"result\":\"engine-unknown\"}"); continue+ fi+ fi+ # A launcher's installer may be interactive (Rockstar opens a language dialog and waits for a+ # person, 2026-09-19), which is right for the app's flow and endless here. The install gets+ # ten minutes; past that the installer's window title is recorded as the result and the run+ # moves on, so the nightly stays bounded and says exactly where the recipe needs a hand.+ ( $HB bottle create "$b" "${engarg[@]}" --recipe "$f" > "$OUT/$id-install.log" 2>&1; echo $? > "$OUT/$id-install.rc" ) &+ ipid=$!; rm -f "$OUT/$id-install.rc"; it=0+ while [ ! -f "$OUT/$id-install.rc" ] && [ $it -lt 600 ]; do sleep 10; it=$((it+10)); done+ if [ ! -f "$OUT/$id-install.rc" ]; then+ ipids=$($HB bottle ps "$b" 2>/dev/null | awk -F'\t' '$1 ~ /^[0-9]+$/ {print $1}' | paste -sd'|' -)+ title=$( [ -n "$winlist" ] && [ -n "$ipids" ] && $winlist 2>/dev/null | grep -E "pid=($ipids)[[:space:]]" | grep "on=true" | grep -v "||" | head -1 | cut -f4 | tr -d '|' )+ echo "[$id] installer still running after ${it}s, waiting for a person (window: ${title:-none})"+ results+=("{\"id\":\"$id\",\"result\":\"install-waits\",\"window\":\"${title:-none}\"}")+ $HB bottle kill "$b" >/dev/null 2>&1; kill $ipid 2>/dev/null; sleep 3; $HB bottle delete "$b" >/dev/null 2>&1; continue+ fi+ if [ "$(cat "$OUT/$id-install.rc")" != "0" ]; thenecho "[$id] install FAILED (see $OUT/$id-install.log)"; results+=("{\"id\":\"$id\",\"result\":\"install-failed\"}"); $HB bottle delete "$b" >/dev/null 2>&1; continuefi# Steam's first start is a chain of relaunches (exit 9 mid-download, exit 42 after thediff --git a/Tests/HighballKitTests/BundledEngineTests.swift b/Tests/HighballKitTests/BundledEngineTests.swiftnew file mode 100644index 0000000..e8e8323--- /dev/null+++ b/Tests/HighballKitTests/BundledEngineTests.swift@@ -0,0 +1,40 @@+import XCTest+@testable import HighballKit++/// Every engine manifest the app bundles must decode, and the ones with a purpose beyond the+/// default must carry the settings that purpose rests on: r6 exists to offer D3DMetal from+/// GPTK 4 on macOS 27 with its Metal 4 backend off (highball#85), and a manifest that lost any+/// of that would ship silently, since nothing else reads those fields before a user picks it.+final class BundledEngineTests: XCTestCase {+ private var engines: URL {+ URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent()+ .appending(path: "spike/engines")+ }++ private func manifests() throws -> [EngineManifest] {+ let files = try FileManager.default.contentsOfDirectory(at: engines, includingPropertiesForKeys: nil)+ .filter { $0.pathExtension == "json" }+ XCTAssertFalse(files.isEmpty, "no bundled manifests under spike/engines")+ return try files.map { try EngineManifest.load(from: $0) }+ }++ func testEveryBundledManifestDecodesWithAUniqueIdAndAFloor() throws {+ let all = try manifests()+ XCTAssertEqual(Set(all.map(\.id)).count, all.count, "duplicate engine ids among the bundled manifests")+ for m in all {+ XCTAssertFalse(m.minMacOS.isEmpty, "\(m.id) has no minMacOS")+ XCTAssertTrue(m.runs(onMacOS: "99.0"), "\(m.id): a floor nothing satisfies")+ }+ }++ func testR6CarriesGPTK4D3DMetalOnMacOS27WithTheMetal4BackendOff() throws {+ let r6 = try XCTUnwrap(try manifests().first { $0.id == "x64-sikarugir10.0_6-r6" }, "r6 manifest missing")+ XCTAssertEqual(r6.minMacOS, "27.0")+ XCTAssertFalse(r6.runs(onMacOS: "26.6.2"), "r6 was measured on 27 only and must not be offered below it")+ XCTAssertEqual(r6.baseEnv?["D3DM_MTL4"], "0", "the Metal 4 backend ends UE5 titles within a minute on 4.0b2")+ let d3dmetal = try XCTUnwrap(r6.components["d3dmetal"], "r6 has no d3dmetal component")+ XCTAssertEqual(d3dmetal.sha256, "96cbbe89b71cb07cc33bd761ae4b79452b9cdf3198593dfb779036caf85f07a9")+ XCTAssertEqual(d3dmetal.extract?.into, "renderers/d3dmetal", "rendererDir prefers the engine's own renderers/d3dmetal")+ XCTAssertEqual(d3dmetal.license, "apple-gptk-license-2023-08-17", "same licence text as GPTK 3, same gate")+ }+}