Skip to content

armgit / soju

Public Imported from GitHub
0

Play Windows games on Apple Silicon Macs. Free, open-source app that installs the official Battle.net, Steam, Epic and GOG launchers and lists your games in one library.

Epic Games Launcher support + fix engine lookup in install.sh

mikey926bcf89535fe1
diff --git a/README.ko.md b/README.ko.md
index 77d561d0ba3..6e0f271c917 100644
--- a/README.ko.md
+++ b/README.ko.md
@@ -2,7 +2,7 @@
> *Wine → Whisky → Kegworks… 그리고 한국의 차례: **Soju** 🍶*
-**Apple Silicon 맥에서 Battle.net과 디아블로 II: 레저렉션을 — 완전 무료 오픈소스 Wine 스택으로.**
+**Apple Silicon 맥에서 Battle.net·디아블로 II: 레저렉션·Epic Games Launcher·Steam을 — 완전 무료 오픈소스 Wine 스택으로.**
CodeWeavers가 GPL로 공개한 소스(Wine 11.0, CrossOver 26.3 소스 드롭)를 이 레포의 스크립트로 직접 빌드·조립합니다. 유료 소프트웨어 불필요.
@@ -67,6 +67,18 @@ scripts/play.sh kill # 전부 종료
이미 CrossOver 보틀에 게임이 설치돼 있다면 `scripts/setup-bottle.sh`로 복제하세요 (28GB 재다운로드 회피).
+## Epic Games Launcher
+
+같은 엔진, 별도 보틀, 추가 트릭 없음: Epic의 CEF는 이 빌드에서 GPU 프로세스가 죽지 않아 런처가 기본 커맨드라인 그대로 뜹니다. 검증 2026-08-29: 공식 MSI 무인 설치(~30초), 런처 UI, 로그인.
+
+```bash
+scripts/create-epic-bottle.sh # 공식 Epic MSI, 무인 설치
+scripts/play.sh epic # 로그인 → 게임 설치·플레이
+scripts/play.sh epic-kill # Epic 보틀 종료 (창을 닫아도 런처는 살아 있고, Dock 아이콘 클릭으로 복귀, Exit로 종료)
+```
+
+게임은 아직 폭넓게 테스트하지 않았습니다. 커널 안티치트(EAC/BattlEye)가 필요한 게임은 Wine에서 돌지 않습니다.
+
## Steam 지원 (Steam판 D2R 포함)
D2R은 2026년 2월 Steam에도 *Infernal Edition*으로 출시됐습니다. Steam은 **다른 무료 엔진**을 씁니다: 최신 Steam 클라이언트의 CEF UI는 CrossOver 소스 계열 빌드에서 렌더링되지 않지만(검은 창 — 크로스 프로세스 스왑체인 + CEF 샌드박스 문제), homebrew `wine-stable` 11 + `steamwebhelper` 래퍼(`--disable-gpu --single-process` 강제)로는 동작합니다. 이 해법은 [notpop/steam-on-m1-wine](https://github.com/notpop/steam-on-m1-wine)(MIT, 래퍼 소스는 `third_party/`에 동봉)에서 왔습니다. Steam은 별도 보틀이라 두 스택이 서로 간섭하지 않습니다:
diff --git a/README.md b/README.md
index 6c4da6f2368..953fd7c8590 100644
--- a/README.md
+++ b/README.md
@@ -2,11 +2,11 @@
> *Wine → Whisky → Kegworks… and now a Korean round: **Soju** 🍶*
-**Run Battle.net and Diablo II: Resurrected on Apple Silicon Macs — with a fully free, open-source Wine stack.**
+**Run Battle.net, Diablo II: Resurrected, the Epic Games Launcher and Steam on Apple Silicon Macs — with a fully free, open-source Wine stack.**
Built from CodeWeavers' published GPL sources (Wine 11.0, CrossOver 26.3 source drop), compiled and assembled by scripts in this repo. No paid software required.
-> Status (2026-08): **Working end-to-end** — Battle.net login, Agent, and D2R in-game rendering (D3DMetal), verified on an M4 Pro running macOS 26.5.
+> Status (2026-08): **Working end-to-end** — Battle.net login, Agent, and D2R in-game rendering (D3DMetal); Epic Games Launcher login; Steam client + D3D11 games. Verified on an M4 Pro running macOS 26.5.
*[한국어 README](README.ko.md)*
@@ -36,7 +36,7 @@ Or via Homebrew:
```bash
brew install BCD1210/soju/soju
-soju install # then: soju battlenet / soju d2r / soju steam
+soju install # then: soju battlenet / soju d2r / soju epic / soju steam
```
Downloads the prebuilt engine (~350 MB), walks you through Apple's free GPTK download (the one file Apple forbids redistributing), auto-installs Battle.net with Blizzard's official installer, and drops a `Battle.net.app` in `~/Applications`. Log in and play.
@@ -71,6 +71,18 @@ scripts/play.sh kill # stop everything
Already have a CrossOver bottle with games installed? `scripts/setup-bottle.sh` clones it (28 GB game re-download avoided).
+## Epic Games Launcher
+
+Same engine, own bottle, no extra tricks: Epic's CEF keeps its GPU process alive on this build, so the launcher runs with its stock command line. Verified 2026-08-29: unattended install from the official MSI (~30 s), launcher UI, login.
+
+```bash
+scripts/create-epic-bottle.sh # official Epic MSI, unattended
+scripts/play.sh epic # log in -> install & play
+scripts/play.sh epic-kill # stop the Epic bottle (closing the window keeps the launcher running; click the Dock icon to bring it back, Exit quits)
+```
+
+Games have not been broadly tested yet; anything that needs kernel anti-cheat (EAC/BattlEye) will not run under Wine.
+
## Steam (including the Steam version of D2R)
D2R shipped on Steam in Feb 2026 as the *Infernal Edition*. Steam support uses a **different free engine**: the modern Steam client's CEF UI does not render on CrossOver-source builds (black window — cross-process swapchain + CEF sandbox issues), but it works on Homebrew's `wine-stable` 11 with a tiny `steamwebhelper` wrapper that forces `--disable-gpu --single-process`. That fix comes from [notpop/steam-on-m1-wine](https://github.com/notpop/steam-on-m1-wine) (MIT — wrapper source vendored in `third_party/`). Steam gets its own bottle so the two stacks never interfere:
diff --git a/docs/DIAGNOSIS.md b/docs/DIAGNOSIS.md
index ffa39759749..3e0f45ed1cc 100644
--- a/docs/DIAGNOSIS.md
+++ b/docs/DIAGNOSIS.md
@@ -78,6 +78,18 @@ CrossOver 바이너리 의존 0.
해결: Launcher.exe를 거치지 않고 `Battle.net.exe --disable-gpu-compositing --from-launcher --in-process-gpu --use-gl=swiftshader`를
직접 실행 (`install.sh` 런처, `scripts/play.sh`). 검증: GPU 프로세스 0, GLES 컨텍스트 생성, 렌더러 6, 로그인·메인창, **화면 표시·게임 실행 사용자 확인**.
+## Epic Games Launcher — 같은 엔진에서 추가 조치 없이 동작 (2026-08-29)
+
+벽 1/1-b가 배틀넷 고유 문제인지 CEF 일반 문제인지 확인하려고 Epic Games Launcher(UE5 + CEF3 `EpicWebHelper.exe`, Chrome/90)를 같은 엔진·같은 env(`WINE_SIMULATE_WRITECOPY=1` 포함)로 돌렸다.
+
+- 설치: 공식 `EpicGamesLauncherInstaller.msi`를 `msiexec /i … /qn`으로 무인 설치, 26초. 메뉴빌더 에러(`cx_wineshelllink`)만 나고 무해.
+- 실행: `EpicGamesLauncher.exe` 기본 인자 그대로. CEF가 `--type=gpu-process`를 별도 프로세스로 띄우는데 **죽지 않는다** — 배틀넷과 달리 `--in-process-gpu --use-gl=swiftshader`가 필요 없었다. 1826×857 메인창, 로그인, 스토어 UI 렌더링 확인.
+- wined3d는 `Using the Vulkan renderer for d3d10/11`(MoltenVK) 경로를 탔다. 런처 UI 자체는 이걸로 충분.
+- 로그의 `LogDPoP: Failed to create persistent DPoP key (0x80090029)`는 Linux Wine에서도 나오는 것으로 로그인에 영향 없음.
+- 트레이 UX: 창 닫기 = 트레이 상주(Windows와 동일). Dock 클릭 복귀는 `WINE_DOCK_REOPEN_CMD`로 exe를 다시 실행(싱글 인스턴스라 기존 창만 올라옴). 이를 위해 winemac 패치를 CX 엔진 빌드에도 적용(`build-engine.sh`가 `patches/winemac-no-dock-icon.patch`를 적용).
+
+결론: 벽 1(`WRITECOPY`)은 libcef 버전에 따라 걸리는 일반 문제일 수 있지만, 벽 1-b(GPU 프로세스 사망)는 Battle.net의 CEF 빌드/설정 고유. 다른 CEF 런처(GOG Galaxy·EA app·Ubisoft Connect)도 같은 절차로 먼저 "그냥 돌려보는" 것이 맞다.
+
## 벽 2 — Battle.net Agent caller 서명 검증 실패 (해결됨)
### 증상
diff --git a/install.sh b/install.sh
index 42255a62c65..c12029592c6 100644
--- a/install.sh
+++ b/install.sh
@@ -27,7 +27,9 @@ if [ -x "$ENGINE/bin/wine" ]; then
say "[1/4] Engine already present - skipping"
else
say "[1/4] Downloading prebuilt engine (~350MB, GPL - built from CodeWeavers' published Wine sources)"
- URL=$(curl -fsSL "https://api.github.com/repos/$REPO/releases/latest" \
+ # The engine ships on its own "engine-*" release, which is not necessarily the
+ # newest release — scan all releases and take the first (newest) engine asset.
+ URL=$(curl -fsSL "https://api.github.com/repos/$REPO/releases?per_page=30" \
| grep -o '"browser_download_url": *"[^"]*soju-engine[^"]*"' | head -1 | grep -o 'https[^"]*')
[ -n "$URL" ] || { echo "Could not find the engine release asset."; exit 1; }
curl -fL "$URL" -o "$BASE/engine.tar.xz"
diff --git a/scripts/build-engine.sh b/scripts/build-engine.sh
index c68e304a71d..651b6578b20 100755
--- a/scripts/build-engine.sh
+++ b/scripts/build-engine.sh
@@ -27,6 +27,13 @@ echo "==> Downloading CrossOver 26.3 sources + freetype"
[ -f "$WORK/cx-src.tar.gz" ] || curl -fL "$SRC_URL" -o "$WORK/cx-src.tar.gz"
tar -xzf "$WORK/cx-src.tar.gz" -C "$WORK" sources/wine
WINE="$WORK/sources/wine"
+# Soju winemac patch: WINE_NO_DOCK_ICON (hide helper-process Dock icons) and
+# WINE_DOCK_REOPEN_CMD (Dock click brings a tray-parked launcher back). Used by
+# the Epic and Steam modes of play.sh.
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+if ! grep -q WINE_DOCK_REOPEN_CMD "$WINE/dlls/winemac.drv/cocoa_app.m"; then
+ patch -p1 -d "$WINE" < "$SCRIPT_DIR/../patches/winemac-no-dock-icon.patch"
+fi
echo "==> Building x86_64 freetype (Rosetta)"
[ -f "$WORK/ft.tar.gz" ] || curl -fL "$FT_URL" -o "$WORK/ft.tar.gz"
diff --git a/scripts/create-epic-bottle.sh b/scripts/create-epic-bottle.sh
new file mode 100755
index 00000000000..c9b74431730
--- /dev/null
+++ b/scripts/create-epic-bottle.sh
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+# Create a bottle for the Epic Games Launcher on the free CX-source engine and
+# install it with Epic's official MSI.
+# Verified 2026-08-29 (M4 Pro / macOS 26.5): unattended install (~30 s), launcher
+# UI renders, login works. No launcher-specific hacks were needed beyond the
+# Battle.net environment — Epic's CEF (EpicWebHelper) keeps its GPU process
+# alive on this engine, so no --in-process-gpu switch either.
+set -euo pipefail
+
+ENGINE="${ENGINE:-$HOME/.battlenet-macos/cx26-engine}"
+export WINEPREFIX="${WINEPREFIX:-$HOME/.battlenet-macos/epic-bottle}"
+export WINEDEBUG="${WINEDEBUG:-fixme-all}"
+export WINEMSYNC=1 ROSETTA_ADVERTISE_AVX=1 WINE_SIMULATE_WRITECOPY=1
+export CX_APPLEGPTK_LIBD3DSHARED_PATH="$ENGINE/lib/external/libd3dshared.dylib"
+export DYLD_FALLBACK_LIBRARY_PATH="$ENGINE/lib:/usr/lib"
+
+[ -x "$ENGINE/bin/wine" ] || { echo "Engine not found — run install.sh (or build-engine.sh) first"; exit 1; }
+[ -f "$CX_APPLEGPTK_LIBD3DSHARED_PATH" ] || { echo "libd3dshared not found — run get-gptk.sh first"; exit 1; }
+
+WORK="${WORK:-$HOME/.battlenet-macos/build}"; mkdir -p "$WORK"
+W="$ENGINE/bin/wine"
+
+echo "==> Initializing the prefix: $WINEPREFIX"
+"$W" wineboot -u >/dev/null 2>&1 || true
+"$ENGINE/bin/wineserver" -w
+"$W" reg add "HKCU\\Software\\Wine\\WineDbg" /v ShowCrashDialog /t REG_DWORD /d 0 /f >/dev/null 2>&1
+"$ENGINE/bin/wineserver" -w
+
+echo "==> Downloading the Epic Games Launcher installer (official Epic MSI)"
+MSI="$WORK/EpicGamesLauncherInstaller.msi"
+[ -f "$MSI" ] || curl -fL "https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncherInstaller.msi" -o "$MSI"
+
+echo "==> Running the installer (unattended, about half a minute)"
+"$W" msiexec /i "$MSI" /qn >/dev/null 2>&1 || true
+"$ENGINE/bin/wineserver" -w
+
+EXE="$WINEPREFIX/drive_c/Program Files/Epic Games/Launcher/Portal/Binaries/Win64/EpicGamesLauncher.exe"
+[ -f "$EXE" ] || { echo "Install failed — try: WINEDEBUG=+msi $W msiexec /i \"$MSI\""; exit 1; }
+echo "==> Epic Games Launcher installed"
+"$ENGINE/bin/wineserver" -k 2>/dev/null || true
+echo "==> Done. Now run: scripts/play.sh epic (log in, then install games from the launcher)"
diff --git a/scripts/play.sh b/scripts/play.sh
index 2a8845fa7f6..c973027bdbe 100755
--- a/scripts/play.sh
+++ b/scripts/play.sh
@@ -20,6 +20,8 @@ MODE="${1:-battlenet}"
# Bottle (virtual C: drive) path — per-mode default (Battle.net and Steam use separate bottles)
if [[ "$MODE" == steam* ]]; then
export WINEPREFIX="${WINEPREFIX:-$HOME/.battlenet-macos/steam-bottle}"
+elif [[ "$MODE" == epic* ]]; then
+ export WINEPREFIX="${WINEPREFIX:-$HOME/.battlenet-macos/epic-bottle}"
else
export WINEPREFIX="${WINEPREFIX:-$HOME/.battlenet-macos/bottle}"
fi
@@ -72,6 +74,23 @@ case "$MODE" in
cd "$WINEPREFIX/drive_c/Program Files (x86)/Diablo II Resurrected"
exec "$ENGINE/bin/wine" "D2R.exe" "${@:2}"
;;
+ epic) # Epic Games Launcher — same engine and env as Battle.net (verified 2026-08-29)
+ # Runs as-is: Epic's CEF (EpicWebHelper) keeps its GPU process alive here,
+ # so none of the Battle.net command-line switches are needed. Closing the
+ # window parks the launcher in its (invisible) tray, like on Windows; a Dock
+ # click re-runs the exe, which just raises the running instance.
+ EPIC="C:\\Program Files\\Epic Games\\Launcher\\Portal\\Binaries\\Win64\\EpicGamesLauncher.exe"
+ [[ -f "$WINEPREFIX/drive_c/Program Files/Epic Games/Launcher/Portal/Binaries/Win64/EpicGamesLauncher.exe" ]] || \
+ { echo "Epic Games Launcher not found — run scripts/create-epic-bottle.sh first"; exit 1; }
+ pgrep -f "soju-reaper.sh $WINEPREFIX" >/dev/null 2>&1 || \
+ { [ -x "$REAPER" ] && ( "$REAPER" "$WINEPREFIX" "$ENGINE/bin/wineserver" epic >/dev/null 2>&1 & ); }
+ export WINE_DOCK_REOPEN_CMD="'$ENGINE/bin/wine' '$EPIC'"
+ exec "$ENGINE/bin/wine" "$EPIC" "${@:2}"
+ ;;
+ epic-kill) # Stop everything in the Epic bottle
+ pkill -f "soju-reaper.sh $WINEPREFIX" 2>/dev/null || true
+ "$ENGINE/bin/wineserver" -k 2>/dev/null || true
+ ;;
steam) # Steam client — wine-stable + webhelper wrapper (verified 2026-08-27)
# Steam's CEF does not render on the CX engine (black screen / SEGV storm).
# The verified combination is Homebrew wine-stable 11 + the steamwebhelper
@@ -147,5 +166,5 @@ case "$MODE" in
pkill -f "soju-reaper.sh $WINEPREFIX" 2>/dev/null || true
"/Applications/Wine Stable.app/Contents/Resources/wine/bin/wineserver" -k 2>/dev/null || true
;;
- *) echo "usage: play.sh [battlenet|d2r|steam|kill|steam-kill]"; exit 1;;
+ *) echo "usage: play.sh [battlenet|d2r|epic|epic-kill|steam|kill|steam-kill]"; exit 1;;
esac
diff --git a/scripts/soju b/scripts/soju
index 5e4e08688c1..6300c5198c6 100755
--- a/scripts/soju
+++ b/scripts/soju
@@ -6,7 +6,7 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
usage() {
cat <<'EOF'
-soju — free Battle.net / Diablo II: Resurrected / Steam on Apple Silicon
+soju — free Battle.net / Diablo II: Resurrected / Epic / Steam on Apple Silicon
Usage:
soju install Set up the Wine engine, Apple GPTK and Battle.net
@@ -14,6 +14,10 @@ Usage:
soju d2r Launch Diablo II: Resurrected directly
soju kill Stop everything in the Battle.net bottle
+ soju epic-install Set up the Epic Games Launcher bottle (same engine)
+ soju epic Launch the Epic Games Launcher
+ soju epic-kill Stop everything in the Epic bottle
+
soju steam-install Set up the Steam bottle (wine-stable + wrapper + Steam)
soju steam-games Wire DXMT so D3D11 games render (needs built artifacts)
soju steam Launch Steam
@@ -25,9 +29,10 @@ EOF
case "${1:-}" in
install) shift; exec bash "$ROOT/install.sh" "$@" ;;
+ epic-install) shift; exec bash "$ROOT/scripts/create-epic-bottle.sh" "$@" ;;
steam-install) shift; exec bash "$ROOT/scripts/create-steam-bottle.sh" "$@" ;;
steam-games) shift; exec bash "$ROOT/scripts/setup-steam-games.sh" "$@" ;;
- battlenet|d2r|steam|kill|steam-kill)
+ battlenet|d2r|epic|epic-kill|steam|kill|steam-kill)
exec bash "$ROOT/scripts/play.sh" "$@" ;;
-h|--help|help|"") usage ;;
*) echo "soju: unknown command '$1'" >&2; usage >&2; exit 64 ;;
diff --git a/scripts/soju-reaper.sh b/scripts/soju-reaper.sh
index b24b0d35a6b..0d2854792ec 100755
--- a/scripts/soju-reaper.sh
+++ b/scripts/soju-reaper.sh
@@ -11,15 +11,16 @@
# Window detection uses CGWindowListCopyWindowInfo via python3+ctypes — no
# Accessibility permission needed, nothing to install.
#
-# Usage: soju-reaper.sh <WINEPREFIX> <wineserver-path> [battlenet|steam]
+# Usage: soju-reaper.sh <WINEPREFIX> <wineserver-path> [battlenet|steam|epic]
# (backgrounded by play.sh / the Battle.net.app launcher)
#
# steam mode: closing the Steam window parks it in a tray (as on Windows; the
# Dock icon brings it back via WINE_DOCK_REOPEN_CMD). Once steam.exe itself has
# exited, the leftovers (steamservice, winedevice, wineserver) are shut down.
+# epic mode: same tray semantics, keyed on EpicGamesLauncher.exe.
set -u
-PREFIX="${1:?usage: soju-reaper.sh <WINEPREFIX> <wineserver> [battlenet|steam]}"
+PREFIX="${1:?usage: soju-reaper.sh <WINEPREFIX> <wineserver> [battlenet|steam|epic]}"
WINESERVER="${2:?}"
MODE="${3:-battlenet}"
INTERVAL=20
@@ -27,6 +28,12 @@ case "$MODE" in
steam)
GAME_RE='Steam\\steamapps\\' # games live under steamapps
UI_RE='steam\.exe|steamwebhelper'
+ TRAY_RE='steam\.exe'; TRAY_KILL_RE="$UI_RE|steamservice\.exe"
+ ;;
+ epic)
+ GAME_RE='__none__'
+ UI_RE='EpicGamesLauncher\.exe|EpicWebHelper\.exe|EpicOnlineServices'
+ TRAY_RE='EpicGamesLauncher\.exe'; TRAY_KILL_RE="$UI_RE"
;;
*)
GAME_RE='D2R\.exe|BlizzardError\.exe'
@@ -67,18 +74,18 @@ PY
declare -A STRIKES
IDLE_STRIKES=0
-if [ "$MODE" = "steam" ]; then
+if [ "$MODE" = "steam" ] || [ "$MODE" = "epic" ]; then
# Steam parks itself in an (invisible on macOS) tray when its window is closed,
# so a missing window means nothing here. Only once steam.exe has really gone
# (Steam menu > Exit) do we shut the rest of the bottle down.
while true; do
sleep "$INTERVAL"
- if ! pgrep -f 'steam\.exe' >/dev/null 2>&1; then
+ if ! pgrep -f "$TRAY_RE" >/dev/null 2>&1; then
IDLE_STRIKES=$((IDLE_STRIKES + 1))
if [ "$IDLE_STRIKES" -ge 2 ]; then
WINEPREFIX="$PREFIX" "$WINESERVER" -k 2>/dev/null || true
sleep 3
- pkill -9 -f "$UI_RE|steamservice\.exe" 2>/dev/null || true
+ pkill -9 -f "$TRAY_KILL_RE" 2>/dev/null || true
exit 0
fi
else