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
winetricks steps find a bundled cabextract, so the core fonts tweak works without Homebrew (#96)
Gauthier Piarretted95630fe4c48
diff --git a/.gitignore b/.gitignoreindex 3f3dbde..40b69f4 100644--- a/.gitignore+++ b/.gitignore@@ -13,3 +13,5 @@ private/*.swiftdepsScripts/winlistspike/epic-stub/EpicGamesLauncher.exe+spike/tools/cabextract+spike/tools/cabextract.LICENSEdiff --git a/Scripts/make-app.sh b/Scripts/make-app.shindex 5769652..c60e92e 100755--- a/Scripts/make-app.sh+++ b/Scripts/make-app.sh@@ -24,6 +24,12 @@ cp spike/engine-manifest.json "$APP/Contents/Resources/engine-manifest.json"# Other engines the app can offer (previous ones for rollback, candidates for Advanced).if ls spike/engines/*.json >/dev/null 2>&1; then mkdir -p "$APP/Contents/Resources/engines"; cp spike/engines/*.json "$APP/Contents/Resources/engines/"; ficp spike/d3dmetal-license.txt "$APP/Contents/Resources/d3dmetal-license.txt"+# cabextract for winetricks (the core fonts tweak needs it and macOS has none, highball#96), built+# from its pinned source by spike/tools/build-cabextract.sh, GPL-3.0-or-later, licence shipped beside it.+spike/tools/build-cabextract.sh >/dev/null 2>&1 || { echo "error: could not build cabextract (spike/tools/build-cabextract.sh)" >&2; exit 1; }+mkdir -p "$APP/Contents/Resources/tools"+cp spike/tools/cabextract "$APP/Contents/Resources/tools/cabextract"+cp spike/tools/cabextract.LICENSE "$APP/Contents/Resources/tools/cabextract.LICENSE"# The EpicGamesLauncher.exe stand-in for Rockstar games bought on Epic (highball#93), built from# spike/epic-stub/EpicGamesLauncher.c with mingw. A release must carry it; a debug build without# mingw goes on without it and the Epic launch path says so in the log.diff --git a/Sources/HighballKit/Recipe.swift b/Sources/HighballKit/Recipe.swiftindex 7283782..714b2a3 100644--- a/Sources/HighballKit/Recipe.swift+++ b/Sources/HighballKit/Recipe.swift@@ -411,13 +411,22 @@ public struct RecipeRunner: Sendable {// 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// documents on macOS.- let env = try bottle.environment(engine: engine, renderer: .wined3d, extra: [+ var env = try bottle.environment(engine: engine, renderer: .wined3d, extra: ["WINE": engine.wineBinary.path,"WINESERVER": engine.wineserverBinary.path,"WINE_BIN": engine.wineBinary.path,"WINESERVER_BIN": engine.wineserverBinary.path,"WINE_BINDIR": engine.wineBinary.deletingLastPathComponent().path,])+ // winetricks shells out to cabextract for Microsoft's cabinet installers (the core+ // fonts among them) and macOS does not ship it, so the app bundles one under+ // Resources/tools (highball#96). HIGHBALL_TOOLS names another directory, for the CLI.+ let tools = [ProcessInfo.processInfo.environment["HIGHBALL_TOOLS"].map { URL(fileURLWithPath: $0) },+ Bundle.main.resourceURL?.appending(path: "tools", directoryHint: .isDirectory)]+ .compactMap { $0 }.filter { FileManager.default.fileExists(atPath: $0.path) }+ if !tools.isEmpty {+ env["PATH"] = (tools.map(\.path) + [env["PATH"] ?? ProcessInfo.processInfo.environment["PATH"] ?? "/usr/bin:/bin"]).joined(separator: ":")+ }try Shell.run("/bin/bash", [wt.path, "--unattended"] + verbs, env: env)case let .environment(name, value):bottle.settings.environment[name] = valuediff --git a/spike/tools/build-cabextract.sh b/spike/tools/build-cabextract.shnew file mode 100755index 0000000..a442de8--- /dev/null+++ b/spike/tools/build-cabextract.sh@@ -0,0 +1,20 @@+#!/bin/bash+# Builds cabextract (GPL-3.0-or-later, https://www.cabextract.org.uk) from its pinned source+# tarball for the app bundle. winetricks needs it to unpack Microsoft's cabinet installers,+# the core fonts among them, and macOS does not ship it (highball#96). Output: spike/tools/cabextract.+set -euo pipefail+cd "$(dirname "$0")"+VERSION=1.11+SHA=b5546db1155e4c718ff3d4b278573604f30dd64c3c5bfd4657cd089b823a3ac6+URL="https://www.cabextract.org.uk/cabextract-$VERSION.tar.gz"+WORK="$(mktemp -d)"; trap 'rm -rf "$WORK"' EXIT+curl -sSL -o "$WORK/src.tar.gz" "$URL"+echo "$SHA $WORK/src.tar.gz" | shasum -a 256 -c - >/dev/null+tar -xzf "$WORK/src.tar.gz" -C "$WORK"+cd "$WORK/cabextract-$VERSION"+./configure --prefix="$WORK/out" >/dev/null+make -j4 >/dev/null+cp cabextract "$OLDPWD/cabextract"+cd "$OLDPWD"+cp "$WORK/cabextract-$VERSION/COPYING" cabextract.LICENSE+ls -la cabextract | awk '{print $5, $9}'; ./cabextract --version | head -1