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.

VR copy: keep Documents and other user folders inside the copy; release v1.8.2 (#73)

Mikekcb5fd9b7b1b2
diff --git a/README.ko.md b/README.ko.md
index b5b590311b8..641e6e8da7c 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.1/Soju-1.8.1-macos-arm64.zip): 네이티브 앱 프리뷰에서 설치된 게임과 보유 게임, 스토어 검색, 즐겨찾기, 게임 실행, 플랫폼 관리를 한 화면에서 다룰 수 있습니다. [설치 안내와 요구 사항](docs/DESKTOP.md)을 확인해 주세요.
+[Soju 맥 앱 다운로드](https://github.com/BCD1210/soju/releases/download/v1.8.2/Soju-1.8.2-macos-arm64.zip): 네이티브 앱 프리뷰에서 설치된 게임과 보유 게임, 스토어 검색, 즐겨찾기, 게임 실행, 플랫폼 관리를 한 화면에서 다룰 수 있습니다. [설치 안내와 요구 사항](docs/DESKTOP.md)을 확인해 주세요.
## 일상 명령
diff --git a/README.md b/README.md
index 2ef0e993694..78d0bd2e3f1 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 store
clients are not included.
-**Current release: [v1.8.1](https://github.com/BCD1210/soju/releases/tag/v1.8.1).**
+**Current release: [v1.8.2](https://github.com/BCD1210/soju/releases/tag/v1.8.2).**
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 / so
The 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.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).
+[Download Soju for Mac](https://github.com/BCD1210/soju/releases/download/v1.8.2/Soju-1.8.2-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 commands
diff --git a/README.zh.md b/README.zh.md
index 18c51111146..4e26003e493 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.1/Soju-1.8.1-macos-arm64.zip):原生桌面预览版在一个窗口中管理已安装和已拥有的游戏、商店搜索、收藏、游戏启动和平台管理。[安装说明与要求](docs/DESKTOP.md)。
+[下载 Soju Mac 应用](https://github.com/BCD1210/soju/releases/download/v1.8.2/Soju-1.8.2-macos-arm64.zip):原生桌面预览版在一个窗口中管理已安装和已拥有的游戏、商店搜索、收藏、游戏启动和平台管理。[安装说明与要求](docs/DESKTOP.md)。
## 日常维护
diff --git a/VERSION b/VERSION
index a8fdfda1c78..53adb84c822 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.8.1
+1.8.2
diff --git a/docs/DESKTOP.md b/docs/DESKTOP.md
index 6bc4936952f..53624810e6c 100644
--- a/docs/DESKTOP.md
+++ b/docs/DESKTOP.md
@@ -1,6 +1,6 @@
# Soju for Mac
-[Download v1.8.1](https://github.com/BCD1210/soju/releases/download/v1.8.1/Soju-1.8.1-macos-arm64.zip)
+[Download v1.8.2](https://github.com/BCD1210/soju/releases/download/v1.8.2/Soju-1.8.2-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/index.html b/docs/index.html
index 2d86bfe9482..61396b20a80 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.1/Soju-1.8.1-macos-arm64.zip">Download Soju for Mac</a></p>
+<p><a class="btn" href="https://github.com/BCD1210/soju/releases/download/v1.8.2/Soju-1.8.2-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.py
index 07b8aec7726..9dd7bb04477 100644
--- a/scripts/d2r-vr.py
+++ b/scripts/d2r-vr.py
@@ -206,6 +206,32 @@ def patch_reshade(dll, spec):
return True
+def isolate_user_folders(bottle):
+ """Turn the copy's Documents/Downloads/... links to the Mac folders into plain folders.
+
+ Started from Soju.app, D2R writing its logs to Documents makes macOS ask whether
+ Soju may use the Documents folder, and the game waits on that prompt. The copy
+ keeps its own logs instead; the Mac folders are left alone.
+ """
+ users = bottle / 'drive_c/users'
+ changed = []
+ if not users.is_dir():
+ return changed
+ for user in users.iterdir():
+ if user.is_symlink() or not user.is_dir():
+ continue
+ for link in user.iterdir():
+ if not link.is_symlink():
+ continue
+ target = os.path.realpath(link)
+ if target == str(bottle.resolve()) or target.startswith(str(bottle.resolve()) + os.sep):
+ continue
+ link.unlink()
+ link.mkdir(mode=0o700)
+ changed.append(link.name)
+ return changed
+
+
def fix_settings(saves):
settings = saves / 'Settings.json'
data = json.loads(settings.read_text(encoding='utf-8-sig'))
@@ -346,6 +372,7 @@ def setup(refresh=False):
if (game / 'd3d12.dll').exists():
(game / 'd3d12.dll').rename(off)
fix_settings(BOTTLE / SAVES_REL)
+ isolate_user_folders(BOTTLE)
write_runtime_routing(m)
stop_bottle(BOTTLE)
STATE.write_text(json.dumps({'recipe': recipe(m), 'game_build': game_build(BOTTLE),
@@ -393,6 +420,7 @@ def play(extra, flat=False):
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.')
+ isolate_user_folders(BOTTLE) # copies set up by 1.8.0/1.8.1 still have the links
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')
diff --git a/tests/test_d2r_vr.py b/tests/test_d2r_vr.py
index 19ce8312ada..06aab162b14 100644
--- a/tests/test_d2r_vr.py
+++ b/tests/test_d2r_vr.py
@@ -39,6 +39,24 @@ class ManifestTests(unittest.TestCase):
self.assertIn('flat) exec python3 "$ROOT/scripts/d2r-vr.py" play --flat', action)
self.assertIn('model.playVR(game, flat: true)', library)
+ def test_user_folder_links_become_folders_in_the_copy(self):
+ with tempfile.TemporaryDirectory() as d:
+ mac_docs = Path(d) / 'mac/Documents'
+ mac_docs.mkdir(parents=True)
+ (mac_docs / 'keep.txt').write_text('mine')
+ bottle = Path(d) / 'bottle'
+ user = bottle / 'drive_c/users/crossover'
+ (user / 'Saved Games').mkdir(parents=True)
+ (user / 'Documents').symlink_to(mac_docs)
+ (user / 'Inside').symlink_to(user / 'Saved Games')
+ self.assertEqual(vr.isolate_user_folders(bottle), ['Documents'])
+ self.assertFalse((user / 'Documents').is_symlink())
+ self.assertTrue((user / 'Documents').is_dir())
+ self.assertEqual(list((user / 'Documents').iterdir()), [])
+ self.assertEqual((mac_docs / 'keep.txt').read_text(), 'mine')
+ self.assertTrue((user / 'Inside').is_symlink())
+ self.assertEqual(vr.isolate_user_folders(bottle), [])
+
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)
diff --git a/tests/test_installation.py b/tests/test_installation.py
index 9fb52b755c3..34b5d5d35e9 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.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}]},
+ {"tag_name": "v1.8.2", "prerelease": False, "assets": [
+ {"name": "Soju-1.8.2-macos-arm64.zip.sha256", "digest": "sha256:" + "b" * 64},
+ {"name": "Soju-1.8.2-macos-arm64.zip", "digest": "sha256:" + d}]},
])
self.assertEqual(result.returncode, 0, result.stderr)
- 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])
+ self.assertEqual(result.stdout.split(), ["v1.8.2",
+ "https://github.com/BCD1210/soju/releases/download/v1.8.2/Soju-1.8.2-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": []}])