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.

Launch Battle.net.exe directly with --in-process-gpu --use-gl=swiftshader

mikey928d8fea4ec1d5
diff --git a/docs/DIAGNOSIS.md b/docs/DIAGNOSIS.md
index 9c2948bddb0..ffa39759749 100644
--- a/docs/DIAGNOSIS.md
+++ b/docs/DIAGNOSIS.md
@@ -60,6 +60,24 @@ stock Whisky / frankea 엔진(v3.1.1, v4.5beta, v2.5.0)은 전부 **신형 WoW64
해결: 모든 실행 경로(`install.sh`, `scripts/play.sh`, `scripts/create-bottle.sh`)에 `WINE_SIMULATE_WRITECOPY=1`.
CrossOver 바이너리 의존 0.
+## 벽 1-b — CX 의존 #2: 투명한 메인창 (`--in-process-gpu --use-gl=swiftshader`) (2026-08-29)
+
+`WINE_SIMULATE_WRITECOPY=1`만으로는 렌더러는 살지만 **Dock 아이콘만 뜨고 창이 안 보인다**. `CGWindowListCopyWindowInfo`로
+보면 1600×1000 창이 화면 정중앙에 "존재"(alpha 1)하지만 내용이 없다 — Battle.net 메인창은 frameless라 내용이 안 그려지면
+완전히 투명하다. libcef 로그 비교:
+
+- CX ntdll: GPU 프로세스 없음(NtCreateUserProcess `--type=gpu-process` 0건), 브라우저 프로세스 안에서 GLES 컨텍스트 생성.
+- 우리 ntdll: `--type=gpu-process`가 생성되고 `Exiting GPU process due to errors during initialization` ×9 →
+ `GL is disabled` → 아무것도 합성되지 않음.
+
+원인: A에서 Battle.net.exe가 받는 인자가 `--disable-gpu-compositing --from-launcher --in-process-gpu --use-gl=swiftshader`.
+`Battle.net Launcher.exe`는 양쪽 다 앞의 두 개만 넘기고(`+relay`로 확인), 뒤의 두 개는 **CX ntdll.so의 NtCreateUserProcess
+내부에서 주입**된다. 출처는 CodeWeavers의 비공개·암호화 호환 DB(`~/Library/Application Support/CrossOver/compatdb-26.dat`,
+`cxcompatdb.so`)의 앱별 규칙 — GPL 소스에도, 바이너리 문자열에도 없다.
+
+해결: 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, 로그인·메인창, **화면 표시·게임 실행 사용자 확인**.
+
## 벽 2 — Battle.net Agent caller 서명 검증 실패 (해결됨)
### 증상
diff --git a/install.sh b/install.sh
index 617a5c84d45..42255a62c65 100644
--- a/install.sh
+++ b/install.sh
@@ -127,7 +127,9 @@ BN="\$WINEPREFIX/drive_c/Program Files (x86)/Battle.net"
for v in "\$BN"/Battle.net.[0-9]*; do [ -d "\$v" ] && cp -f "\$BN/Battle.net.exe" "\$v/Battle.net.exe" 2>/dev/null; done
# Reap zombie game processes so quitting the game really quits it
pgrep -f "soju-reaper.sh \$WINEPREFIX" >/dev/null 2>&1 || { [ -x "$REAPER" ] && ( "$REAPER" "\$WINEPREFIX" "$ENGINE/bin/wineserver" >/dev/null 2>&1 & ); }
-exec "$ENGINE/bin/wine" "C:\\\\Program Files (x86)\\\\Battle.net\\\\Battle.net Launcher.exe" --disable-gpu-compositing
+# Battle.net.exe directly (not Launcher.exe): CrossOver's private compat DB injects these two
+# switches; without them CEF's GPU process dies and the main window stays transparent.
+exec "$ENGINE/bin/wine" "C:\\\\Program Files (x86)\\\\Battle.net\\\\Battle.net.exe" --disable-gpu-compositing --from-launcher --in-process-gpu --use-gl=swiftshader
EOF
chmod +x "$APP/Contents/MacOS/launcher"
cat > "$APP/Contents/Info.plist" <<'EOF'
diff --git a/scripts/play.sh b/scripts/play.sh
index 2c304ad1733..d3ae99c7e72 100755
--- a/scripts/play.sh
+++ b/scripts/play.sh
@@ -57,10 +57,15 @@ start_reaper(){
case "$MODE" in
battlenet) # Battle.net launcher (log in, then Play for online)
+ # Battle.net.exe is started directly, not through "Battle.net Launcher.exe":
+ # CrossOver's private compat DB (compatdb-*.dat) injects
+ # --in-process-gpu --use-gl=swiftshader for Battle.net.exe. Without them CEF
+ # spawns a separate GPU process that dies on init and the frameless main
+ # window stays fully transparent (Dock icon, no window). See docs/DIAGNOSIS.md.
start_reaper
exec "$ENGINE/bin/wine" \
- "C:\\Program Files (x86)\\Battle.net\\Battle.net Launcher.exe" \
- --disable-gpu-compositing
+ "C:\\Program Files (x86)\\Battle.net\\Battle.net.exe" \
+ --disable-gpu-compositing --from-launcher --in-process-gpu --use-gl=swiftshader
;;
d2r) # Launch the game directly (offline / previous session)
start_reaper