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.

Engine v1.7: every handle reads the stored ACL; release v1.8.0 (#71)

Mikeka11fbe57189c
diff --git a/README.ko.md b/README.ko.md
index 29248b2f9e4..88aea33e800 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.7.2/Soju-1.7.2-macos-arm64.zip): 네이티브 앱 프리뷰에서 설치된 게임과 보유 게임, 스토어 검색, 즐겨찾기, 게임 실행, 플랫폼 관리를 한 화면에서 다룰 수 있습니다. [설치 안내와 요구 사항](docs/DESKTOP.md)을 확인해 주세요.
+[Soju 맥 앱 다운로드](https://github.com/BCD1210/soju/releases/download/v1.8.0/Soju-1.8.0-macos-arm64.zip): 네이티브 앱 프리뷰에서 설치된 게임과 보유 게임, 스토어 검색, 즐겨찾기, 게임 실행, 플랫폼 관리를 한 화면에서 다룰 수 있습니다. [설치 안내와 요구 사항](docs/DESKTOP.md)을 확인해 주세요.
## 일상 명령
diff --git a/README.md b/README.md
index 3d8fa27b1d1..d93ad181e9b 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.7.2](https://github.com/BCD1210/soju/releases/tag/v1.7.2).**
+**Current release: [v1.8.0](https://github.com/BCD1210/soju/releases/tag/v1.8.0).**
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.7.2/Soju-1.7.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).
+[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).
## Everyday commands
diff --git a/README.zh.md b/README.zh.md
index 04bc1c03658..c300bd34553 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.7.2/Soju-1.7.2-macos-arm64.zip):原生桌面预览版在一个窗口中管理已安装和已拥有的游戏、商店搜索、收藏、游戏启动和平台管理。[安装说明与要求](docs/DESKTOP.md)。
+[下载 Soju Mac 应用](https://github.com/BCD1210/soju/releases/download/v1.8.0/Soju-1.8.0-macos-arm64.zip):原生桌面预览版在一个窗口中管理已安装和已拥有的游戏、商店搜索、收藏、游戏启动和平台管理。[安装说明与要求](docs/DESKTOP.md)。
## 日常维护
diff --git a/VERSION b/VERSION
index f8a696c8dc5..27f9cd322bb 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.7.2
+1.8.0
diff --git a/docs/DESKTOP.md b/docs/DESKTOP.md
index 7090ce44a43..1921f0d9275 100644
--- a/docs/DESKTOP.md
+++ b/docs/DESKTOP.md
@@ -1,6 +1,6 @@
# Soju for Mac
-[Download v1.7.2](https://github.com/BCD1210/soju/releases/download/v1.7.2/Soju-1.7.2-macos-arm64.zip)
+[Download v1.8.0](https://github.com/BCD1210/soju/releases/download/v1.8.0/Soju-1.8.0-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/DIAGNOSIS.md b/docs/DIAGNOSIS.md
index 24400decae6..36628c375e9 100644
--- a/docs/DIAGNOSIS.md
+++ b/docs/DIAGNOSIS.md
@@ -563,3 +563,11 @@ Unix 권한을 정하는 기존 동작은 그대로다.
단계를 지나 끝났고(`.patch.result` 0, 게임 폴더에 `user.wine.sd` 생성), 손대지 않은 원본 복제본에서도
engine-v1.6 tarball의 wineserver로 같은 결과였다. 그 wineserver로 Battle.net 로그인 상태 유지, D2R
온라인 접속(캐릭터 선택 화면)까지 확인했다.
+
+### 후속 (engine-v1.7): 먼저 열린 핸들도 바뀐 ACL을 본다
+
+리뷰 지적: 핸들 A를 먼저 열어 보안 설명자를 캐시해 두고, 다른 핸들로 Unix 권한 비트는 그대로인 채
+ACL만 바꾸면, `file_get_sd`/`dir_get_sd`가 모드·UID가 같다며 캐시를 그대로 돌려줘서 A는 예전 ACL을
+계속 봤다. 재현(Wine 아래 윈도우 파이썬, 핸들 A를 연 뒤 `SetNamedSecurityInfoW`로 Interactive 항목만
+추가): v1.6은 예전 목록, 수정 후에는 새 목록. 이제 xattr에 저장된 설명자가 있으면 조회할 때마다
+그것을 읽는다. 원본 Battle.net 병의 새 복제본에서 Agent의 D2R 업데이트도 끝까지 됐다.
diff --git a/docs/index.html b/docs/index.html
index 463e68b88d8..535ef25412b 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.7.2/Soju-1.7.2-macos-arm64.zip">Download Soju for Mac</a></p>
+<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>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/install.sh b/install.sh
index b0f09a714e2..e5b86fe9a3d 100644
--- a/install.sh
+++ b/install.sh
@@ -21,8 +21,8 @@ say(){ printf '\n\033[1m%s\033[0m\n' "$*"; }
# The prebuilt engine is pinned: a new engine release only reaches users once
# these two lines (here and in scripts/update.sh) name it.
-ENGINE_TAG="engine-v1.6"
-ENGINE_SHA256="1d8eaa1db7279c7e4c2d321350bcd11a3658558bfee8a1a6f4c47e0542fd3f3f"
+ENGINE_TAG="engine-v1.7"
+ENGINE_SHA256="f13d770447289681e4efdec8db04e9c9a08d107d83546431ee02ed3efaef27b1"
ENGINE_URL="https://github.com/$REPO/releases/download/$ENGINE_TAG/wine-engine-x86_64.tar.xz"
# Download to a .part file and keep it only when its SHA-256 matches.
diff --git a/patches/wineserver-stored-acls.patch b/patches/wineserver-stored-acls.patch
index a7083338834..42025ca4102 100644
--- a/patches/wineserver-stored-acls.patch
+++ b/patches/wineserver-stored-acls.patch
@@ -9,25 +9,31 @@ before patching, reads them back, and stops with "Unable to fix permissions"
Store the descriptor written in a "user.wine.sd" xattr with the Unix
permission bits it was written for, and return it while those bits are
unchanged. A chmod made from macOS falls back to the mode-derived descriptor.
+The xattr is read on every query, so a handle opened before another handle
+changed the ACL sees the change too (engine-v1.7).
The Unix mode is still set from the DACL as before.
--- a/server/change.c
+++ b/server/change.c
-@@ -349,9 +349,10 @@
- (st.st_uid == dir->uid))
+@@ -343,6 +343,17 @@
+ if (unix_fd == -1 || fstat( unix_fd, &st ) == -1)
return obj->sd;
-- sd = mode_to_sd( st.st_mode,
-- security_unix_uid_to_sid( st.st_uid ),
-- token_get_primary_group( current->process->token ));
-+ if (!(sd = xattr_sd_load( unix_fd, st.st_mode )))
-+ sd = mode_to_sd( st.st_mode,
-+ security_unix_uid_to_sid( st.st_uid ),
-+ token_get_primary_group( current->process->token ));
- if (!sd) return obj->sd;
-
- dir->mode = st.st_mode;
-@@ -406,7 +407,8 @@
++ /* A descriptor kept in the xattr may have been written through another
++ * handle: read it every time, so every handle sees the same one. */
++ if ((sd = xattr_sd_load( unix_fd, st.st_mode )))
++ {
++ dir->mode = st.st_mode;
++ dir->uid = st.st_uid;
++ free( obj->sd );
++ obj->sd = sd;
++ return sd;
++ }
++
+ /* mode and uid the same? if so, no need to re-generate security descriptor */
+ if (obj->sd &&
+ (st.st_mode & (S_IRWXU|S_IRWXO)) == (dir->mode & (S_IRWXU|S_IRWXO)) &&
+@@ -406,7 +417,8 @@
return 0;
}
}
@@ -120,21 +126,25 @@ The Unix mode is still set from the DACL as before.
static struct security_descriptor *file_get_sd( struct object *obj )
{
struct file *file = (struct file *)obj;
-@@ -404,9 +478,10 @@
- (st.st_uid == file->uid))
+@@ -399,6 +473,17 @@
+ if (unix_fd == -1 || fstat( unix_fd, &st ) == -1)
return obj->sd;
-- sd = mode_to_sd( st.st_mode,
-- security_unix_uid_to_sid( st.st_uid ),
-- token_get_primary_group( current->process->token ));
-+ if (!(sd = xattr_sd_load( unix_fd, st.st_mode )))
-+ sd = mode_to_sd( st.st_mode,
-+ security_unix_uid_to_sid( st.st_uid ),
-+ token_get_primary_group( current->process->token ));
- if (!sd) return obj->sd;
-
- file->mode = st.st_mode;
-@@ -542,7 +617,8 @@
++ /* A descriptor kept in the xattr may have been written through another
++ * handle: read it every time, so every handle sees the same one. */
++ if ((sd = xattr_sd_load( unix_fd, st.st_mode )))
++ {
++ file->mode = st.st_mode;
++ file->uid = st.st_uid;
++ free( obj->sd );
++ obj->sd = sd;
++ return sd;
++ }
++
+ /* mode and uid the same? if so, no need to re-generate security descriptor */
+ if (obj->sd && (st.st_mode & (S_IRWXU|S_IRWXO)) == (file->mode & (S_IRWXU|S_IRWXO)) &&
+ (st.st_uid == file->uid))
+@@ -542,7 +627,8 @@
return 0;
}
}
diff --git a/scripts/update.sh b/scripts/update.sh
index 66c205cef17..35e376c243c 100755
--- a/scripts/update.sh
+++ b/scripts/update.sh
@@ -12,8 +12,8 @@ TTY=/dev/tty
say(){ printf '\n\033[1m%s\033[0m\n' "$*"; }
# Same pin and helpers as install.sh (tests/test_installation.py keeps them equal).
-ENGINE_TAG="engine-v1.6"
-ENGINE_SHA256="1d8eaa1db7279c7e4c2d321350bcd11a3658558bfee8a1a6f4c47e0542fd3f3f"
+ENGINE_TAG="engine-v1.7"
+ENGINE_SHA256="f13d770447289681e4efdec8db04e9c9a08d107d83546431ee02ed3efaef27b1"
ENGINE_URL="https://github.com/$REPO/releases/download/$ENGINE_TAG/wine-engine-x86_64.tar.xz"
fetch_verified(){ # url, dest, sha256
diff --git a/tests/test_d2r_macos.py b/tests/test_d2r_macos.py
index 68665766cfb..3313c9c53b5 100644
--- a/tests/test_d2r_macos.py
+++ b/tests/test_d2r_macos.py
@@ -29,7 +29,7 @@ class D2RMacOSTests(unittest.TestCase):
'uname': 'echo arm64', 'sysctl': 'echo TestCPU',
'pgrep': '[ "$*" = "-q oahd" ]', 'xcode-select': 'exit 0',
'df': 'printf "Filesystem Blocks Used Available\\ntest 200 50 150\\n"',
- 'defaults': 'exit 1', 'curl': 'echo \'[{"tag_name":"engine-v1.6"}]\'',
+ 'defaults': 'exit 1', 'curl': 'echo \'[{"tag_name":"engine-v1.7"}]\'',
'python3': 'echo python >> "$TEST_CALLS"',
}.items(): self.executable(self.bin / name, body)
self.base = self.root / 'base'
@@ -43,7 +43,7 @@ class D2RMacOSTests(unittest.TestCase):
(self.engine / 'bin').mkdir(parents=True)
self.executable(self.engine / 'bin/wine',
'if [ "$1" = --version ]; then echo wine-11.0; else printf "%s\\n" "$*" >> "$TEST_CALLS"; fi')
- (self.engine / '.soju-engine-release').write_text('engine-v1.6')
+ (self.engine / '.soju-engine-release').write_text('engine-v1.7')
ext = self.engine / 'lib/external'
(ext / 'D3DMetal.framework').mkdir(parents=True)
(ext / 'libd3dshared.dylib').touch()