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.
HTML apple-siliconbattle-netcrossover-alternatived3dmetaldiablo-ii-resurrecteddxmtea-appepic-gamesgame-porting-toolkitgogmac-gamingmacosmacos-gamingrockstar-gamessteamubisoft-connectwhisky-alternativewindows-gameswinewine-wrapper
VR: create offline characters without VR (soju vr play --flat); release v1.8.1 (#72)
Mikeke10f796fbb19
diff --git a/README.ko.md b/README.ko.mdindex 88aea33e800..b5b590311b8 100644--- a/README.ko.md+++ b/README.ko.md@@ -81,7 +81,7 @@ soju install # 이후: soju battlenet / soju d2r / soju steam / soju epic /설치기는 **다운로드 전에 원하는 런처부터 선택**합니다. Steam만 선택하면 CX 엔진과 애플 GPTK를 받지 않습니다. Steam 그래픽 구성요소는 SHA-256으로 검증한 뒤 Soju 전용 Wine 11.0 환경에 자동으로 설치합니다. Battle.net·Epic·GOG는 공통 CX 엔진과 사용자가 별도로 받은 애플 GPTK를 사용합니다. 각 런처의 보틀·로그인·게임은 독립적으로 유지합니다.-[Soju 맥 앱 다운로드](https://github.com/BCD1210/soju/releases/download/v1.8.0/Soju-1.8.0-macos-arm64.zip): 네이티브 앱 프리뷰에서 설치된 게임과 보유 게임, 스토어 검색, 즐겨찾기, 게임 실행, 플랫폼 관리를 한 화면에서 다룰 수 있습니다. [설치 안내와 요구 사항](docs/DESKTOP.md)을 확인해 주세요.+[Soju 맥 앱 다운로드](https://github.com/BCD1210/soju/releases/download/v1.8.1/Soju-1.8.1-macos-arm64.zip): 네이티브 앱 프리뷰에서 설치된 게임과 보유 게임, 스토어 검색, 즐겨찾기, 게임 실행, 플랫폼 관리를 한 화면에서 다룰 수 있습니다. [설치 안내와 요구 사항](docs/DESKTOP.md)을 확인해 주세요.## 일상 명령diff --git a/README.md b/README.mdindex d93ad181e9b..2ef0e993694 100644--- a/README.md+++ b/README.md@@ -25,7 +25,7 @@ CodeWeavers' published sources; Steam uses a separate private Wine 11 setup.Apple's proprietary GPTK/D3DMetal is downloaded separately. Games and storeclients are not included.-**Current release: [v1.8.0](https://github.com/BCD1210/soju/releases/tag/v1.8.0).**+**Current release: [v1.8.1](https://github.com/BCD1210/soju/releases/tag/v1.8.1).**The compatibility examples below were verified on M4 Pro / macOS 26.5.D2R and Hogwarts Legacy are examples of supported games, not the scope of the project.@@ -101,7 +101,7 @@ soju install # then: soju battlenet / soju d2r / soju steam / soju epic / soThe installer asks which launchers you want **before downloading anything**. Steam-only installs skip the CX engine and Apple GPTK. Steam rendering components are downloaded with SHA-256 verification and installed in a Soju-owned Wine 11.0 runtime. Battle.net, Epic and GOG use the shared CX engine and your separately downloaded Apple GPTK. Each official client keeps its own bottle and shortcut in `~/Applications`.-[Download Soju for Mac](https://github.com/BCD1210/soju/releases/download/v1.8.0/Soju-1.8.0-macos-arm64.zip): the native desktop preview includes installed and owned games, store search, favorites, game launching and platform management. See [desktop setup and requirements](docs/DESKTOP.md).+[Download Soju for Mac](https://github.com/BCD1210/soju/releases/download/v1.8.1/Soju-1.8.1-macos-arm64.zip): the native desktop preview includes installed and owned games, store search, favorites, game launching and platform management. See [desktop setup and requirements](docs/DESKTOP.md).## Everyday commandsdiff --git a/README.zh.md b/README.zh.mdindex c300bd34553..18c51111146 100644--- a/README.zh.md+++ b/README.zh.md@@ -85,7 +85,7 @@ soju install # 然后:soju battlenet / soju d2r / soju steam / soju epic /安装器会**先询问要安装哪些启动器,再下载对应组件**。仅选择 Steam 时,不会下载 CX 引擎或 Apple GPTK。Steam 图形组件经过 SHA-256 校验后,自动安装到 Soju 专用的 Wine 11.0 环境中。战网、Epic 和 GOG 使用共享 CX 引擎及用户单独下载的 Apple GPTK。各客户端的 bottle、账户和游戏分别保留。-[下载 Soju Mac 应用](https://github.com/BCD1210/soju/releases/download/v1.8.0/Soju-1.8.0-macos-arm64.zip):原生桌面预览版在一个窗口中管理已安装和已拥有的游戏、商店搜索、收藏、游戏启动和平台管理。[安装说明与要求](docs/DESKTOP.md)。+[下载 Soju Mac 应用](https://github.com/BCD1210/soju/releases/download/v1.8.1/Soju-1.8.1-macos-arm64.zip):原生桌面预览版在一个窗口中管理已安装和已拥有的游戏、商店搜索、收藏、游戏启动和平台管理。[安装说明与要求](docs/DESKTOP.md)。## 日常维护diff --git a/VERSION b/VERSIONindex 27f9cd322bb..a8fdfda1c78 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-1.8.0+1.8.1diff --git a/app/Library.swift b/app/Library.swiftindex 47be5fec755..01826f423dc 100644--- a/app/Library.swift+++ b/app/Library.swift@@ -150,10 +150,11 @@ extension SojuModel {}}/// D2R VR Unleashed in the VR copy of the Battle.net bottle (`soju vr play`, offline).- func playVR(_ game: InstalledGame) {+ /// `flat` opens the same copy without VR so offline characters can be made with the mouse.+ func playVR(_ game: InstalledGame, flat: Bool = false) {guard !busy, !launchingGames.contains(game.id) else { return }do {- let (p, url) = try task(["vr", "play"], logName: "d2r-vr")+ let (p, url) = try task(["vr", flat ? "flat" : "play"], logName: "d2r-vr")launchingGames.insert(game.id); gameLaunches[game.id] = pp.terminationHandler = { [weak self] process inDispatchQueue.main.async {@@ -172,7 +173,8 @@ extension SojuModel {}}try p.run()- activity = "Starting " + game.title + " in VR (offline characters)…"+ activity = flat ? "Opening the VR copy of " + game.title + " without VR (create offline characters)…"+ : "Starting " + game.title + " in VR (offline characters)…"DispatchQueue.main.asyncAfter(deadline: .now() + 8) { [weak self, weak p] inguard let self, let p, self.gameLaunches[game.id] === p else { return }self.launchingGames.remove(game.id)@@ -442,6 +444,8 @@ struct LibraryView: View {Button("Set Up VR (offline)") { model.run(["vr", "setup"], title: "Setting up D2R VR…") }.disabled(model.busy)Button("Play in VR") { model.playVR(game) }.disabled(model.busy)+ Button("Create Offline Character (without VR)") { model.playVR(game, flat: true) }+ .disabled(model.busy)}}}diff --git a/docs/DESKTOP.md b/docs/DESKTOP.mdindex 1921f0d9275..6bc4936952f 100644--- a/docs/DESKTOP.md+++ b/docs/DESKTOP.md@@ -1,6 +1,6 @@# Soju for Mac-[Download v1.8.0](https://github.com/BCD1210/soju/releases/download/v1.8.0/Soju-1.8.0-macos-arm64.zip)+[Download v1.8.1](https://github.com/BCD1210/soju/releases/download/v1.8.1/Soju-1.8.1-macos-arm64.zip)1. Unzip and move **Soju.app** into Applications or ~/Applications.2. Open **Platforms** to install or open Battle.net, Steam, Epic Games or GOG GALAXY.diff --git a/docs/VR.md b/docs/VR.mdindex 2450827cf0a..1cdec72b49b 100644--- a/docs/VR.md+++ b/docs/VR.md@@ -6,12 +6,14 @@ first-person VR mod for **offline characters**, and stream it to a headset from```bashsoju vr setup # once (about 2 minutes, ~110 MB of downloads)soju vr play # every time+soju vr play --flat # same copy without VR: create offline characters with the mousesoju vr statussoju vr setup --refresh # after a D2R update or when the 30-day check appearssoju vr remove --yes```In the app: right-click Diablo II: Resurrected in the library, then **Set Up VR (offline)** and **Play in VR**.+**Create Offline Character (without VR)** opens the same copy on the Mac screen.## What it does@@ -42,6 +44,10 @@ Status (November 2026): verified on M4 Pro / macOS 26.5 with the OXRSys Simulato## Notes- Use **offline characters** only. Characters you make in VR live in the copy; `--refresh` keeps them.+- To make the first offline character, run `soju vr play --flat`, choose Play (not Multiplayer), New, pick a class and+ name it, then quit and start `soju vr play`. In VR the mod draws the menus for the controller laser, so on the+ simulator the Mac mouse cannot pick a class on the character creation screen. `--flat` starts the copy without+ Soju's VR runtime, so the mod stays off and the normal screen and mouse work.- D2R requires an online sign-in within the last 30 days even for offline play. If it says so, play D2R online oncefrom Battle.net, then run `soju vr setup --refresh`.- The mod supports D2R 3.3.93847. Setup refuses other builds.diff --git a/docs/index.html b/docs/index.htmlindex 535ef25412b..2d86bfe9482 100644--- a/docs/index.html+++ b/docs/index.html@@ -124,7 +124,7 @@ its own login, purchases, downloads and game updates.</p><section id="install" aria-labelledby="install-title"><h2 id="install-title">Choose your launchers. Get set up.</h2>-<p><a class="btn" href="https://github.com/BCD1210/soju/releases/download/v1.8.0/Soju-1.8.0-macos-arm64.zip">Download Soju for Mac</a></p>+<p><a class="btn" href="https://github.com/BCD1210/soju/releases/download/v1.8.1/Soju-1.8.1-macos-arm64.zip">Download Soju for Mac</a></p><p>The native desktop preview combines installed and imported owned games, searches stores and manages all four launchers.Apple Silicon · app UI: macOS 14+ · Steam component build: macOS 26+.<a href="https://github.com/BCD1210/soju/blob/main/docs/DESKTOP.md">Setup and signing notes</a>.</p>diff --git a/scripts/d2r-vr.py b/scripts/d2r-vr.pyindex d792331985b..07b8aec7726 100644--- a/scripts/d2r-vr.py+++ b/scripts/d2r-vr.py@@ -352,6 +352,7 @@ def setup(refresh=False):'mod': m['mod']['name']}, indent=2) + '\n')say('D2R VR is set up. Play with: soju vr play')say('Use an OFFLINE character. Start the OXRSys client on your headset (or the OXRSys Simulator) to see it.')+ say('No offline character yet? Make one with the mouse first: soju vr play --flat')say('If D2R says you have not been online for 30 days: play D2R online once from Battle.net, ''then run: soju vr setup --refresh (VR characters are kept).')return 0@@ -375,15 +376,26 @@ def status():}-def play(extra):+def play_env(flat):+ env = wine_env(BOTTLE)+ if not flat:+ env['WINEDLLPATH'] = str(VR / 'runtime/wine')+ env['OXR_BRIDGE_ENV_FILE'] = str(VR / 'bridge.env')+ # flat: the OpenXR runtime cannot load, so the mod leaves VR off and the game+ # uses its normal screen, where the mouse can pick a class on character creation.+ # In VR those menus are meant for the controller laser.+ return env+++def play(extra, flat=False):info = status()if not info['installed'] or not info['current']:raise VRError('D2R VR is not set up for this Soju version. Run: soju vr setup')if running(['D2R.exe', 'D2RLoader.exe']):raise VRError('Diablo II: Resurrected is already running.')- env = wine_env(BOTTLE)- env['WINEDLLPATH'] = str(VR / 'runtime/wine')- env['OXR_BRIDGE_ENV_FILE'] = str(VR / 'bridge.env')+ env = play_env(flat)+ if flat:+ say('Opening the VR copy without VR. Create or check offline characters, then quit and run: soju vr play')os.chdir(BOTTLE / GAME_REL)# -mod keeps D2R offline: no Battle.net game servers.os.execve(str(ENGINE / 'bin/wine'), [str(ENGINE / 'bin/wine'), 'D2RLoader.exe', '-mod',@@ -411,7 +423,9 @@ def main(argv):sub = parser.add_subparsers(dest='command', required=True)p = sub.add_parser('setup')p.add_argument('--refresh', action='store_true', help='copy the Battle.net bottle again (after a game update)')- sub.add_parser('play')+ p = sub.add_parser('play')+ p.add_argument('--flat', action='store_true',+ help='open the VR copy on the Mac screen without VR (to create offline characters)')p = sub.add_parser('status')p.add_argument('--json', action='store_true')p = sub.add_parser('remove')@@ -421,7 +435,7 @@ def main(argv):if args.command == 'setup':return setup(args.refresh)if args.command == 'play':- return play(extra)+ return play(extra, args.flat)if args.command == 'status':info = status()if args.json:diff --git a/scripts/desktop-action.sh b/scripts/desktop-action.shindex ff5b87971bf..85fbaa51dab 100755--- a/scripts/desktop-action.sh+++ b/scripts/desktop-action.sh@@ -17,6 +17,7 @@ case "$ACTION" in*) echo "Choose one of the four launchers."; exit 64 ;; esac ;;vr)case "${1:-}" in setup|play|status) exec python3 "$ROOT/scripts/d2r-vr.py" "$1" ;;+ flat) exec python3 "$ROOT/scripts/d2r-vr.py" play --flat ;;*) echo "Unknown VR action."; exit 64 ;; esac ;;xbox)case "${1:-}" in login|logout|kill|status) exec bash "$ROOT/scripts/xbox.sh" "$1" ;;diff --git a/scripts/soju b/scripts/sojuindex c1d535b1c40..1ec09b195c5 100755--- a/scripts/soju+++ b/scripts/soju@@ -29,6 +29,7 @@ Usage:soju controllers Game Controllers panel of the Battle.net bottle (is my pad seen?)soju vr setup D2R in VR (offline): copy the Battle.net bottle and install D2R VR Unleashedsoju vr play Play D2R in VR (OXRSys client on the headset; offline characters)+ soju vr play --flat Open the VR copy without VR to create offline characters with the mousesoju vr status|removesoju epic-install Set up the Epic Games Launcher bottle (same engine)diff --git a/tests/test_d2r_vr.py b/tests/test_d2r_vr.pyindex 52f5bf11d0e..19ce8312ada 100644--- a/tests/test_d2r_vr.py+++ b/tests/test_d2r_vr.py@@ -4,6 +4,7 @@ import jsonfrom pathlib import Pathimport tempfileimport unittest+from unittest import mockimport zipfileROOT = Path(__file__).resolve().parents[1]@@ -34,7 +35,19 @@ class ManifestTests(unittest.TestCase):self.assertIn('setup|play|status) exec python3 "$ROOT/scripts/d2r-vr.py" "$1"', action)library = (ROOT / 'app/Library.swift').read_text()self.assertIn('model.run(["vr", "setup"]', library)- self.assertIn('task(["vr", "play"]', library)+ self.assertIn('task(["vr", flat ? "flat" : "play"]', library)+ self.assertIn('flat) exec python3 "$ROOT/scripts/d2r-vr.py" play --flat', action)+ self.assertIn('model.playVR(game, flat: true)', library)++ def test_flat_play_leaves_the_vr_runtime_out(self):+ with mock.patch.dict(vr.os.environ, {'XR_RUNTIME_JSON': '/x.json'}):+ flat = vr.play_env(True)+ headset = vr.play_env(False)+ for key in ('WINEDLLPATH', 'OXR_BRIDGE_ENV_FILE', 'XR_RUNTIME_JSON'):+ self.assertNotIn(key, flat)+ self.assertEqual(headset['WINEDLLPATH'], str(vr.VR / 'runtime/wine'))+ self.assertEqual(headset['OXR_BRIDGE_ENV_FILE'], str(vr.VR / 'bridge.env'))+ self.assertEqual(flat['WINEPREFIX'], str(vr.BOTTLE))class ReShadePatchTests(unittest.TestCase):diff --git a/tests/test_installation.py b/tests/test_installation.pyindex b8a3207f4a9..9fb52b755c3 100644--- a/tests/test_installation.py+++ b/tests/test_installation.py@@ -329,13 +329,13 @@ class DownloadCheckTests(unittest.TestCase):{"tag_name": "engine-v9", "prerelease": False, "assets": [{"name": "wine-engine-x86_64.tar.xz", "digest": "sha256:" + d}]},{"tag_name": "v2.0.0", "prerelease": True, "assets": [{"name": "Soju-2.0.0-macos-arm64.zip", "digest": "sha256:" + d}]},{"tag_name": "v1.9.0", "prerelease": False, "assets": [{"name": "Soju-1.9.0-macos-arm64.zip", "digest": None}]},- {"tag_name": "v1.8.0", "prerelease": False, "assets": [- {"name": "Soju-1.8.0-macos-arm64.zip.sha256", "digest": "sha256:" + "b" * 64},- {"name": "Soju-1.8.0-macos-arm64.zip", "digest": "sha256:" + d}]},+ {"tag_name": "v1.8.1", "prerelease": False, "assets": [+ {"name": "Soju-1.8.1-macos-arm64.zip.sha256", "digest": "sha256:" + "b" * 64},+ {"name": "Soju-1.8.1-macos-arm64.zip", "digest": "sha256:" + d}]},])self.assertEqual(result.returncode, 0, result.stderr)- self.assertEqual(result.stdout.split(), ["v1.8.0",- "https://github.com/BCD1210/soju/releases/download/v1.8.0/Soju-1.8.0-macos-arm64.zip", d])+ self.assertEqual(result.stdout.split(), ["v1.8.1",+ "https://github.com/BCD1210/soju/releases/download/v1.8.1/Soju-1.8.1-macos-arm64.zip", d])def test_latest_release_fails_without_a_checked_zip(self):result = self.latest([{"tag_name": "v1.0.0", "prerelease": False, "assets": []}])