dsh-pet-live2d-desktop-darwin-arm64 3.3.2 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -8
- package/bin/dsh-pet-live2d-desktop +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,23 +23,43 @@ npm/desktop-darwin-arm64/
|
|
|
23
23
|
cd dsh-live2d-pet-desktop
|
|
24
24
|
npm run build:portable # 编 release → dist/DSH桌宠.app + dist/dsh-pet-live2d-desktop
|
|
25
25
|
node tools/npm-prepare-subpackage.mjs --sub darwin-arm64
|
|
26
|
+
npm pack --pack-destination dist ./npm/desktop-darwin-arm64 # ← 必须在 macOS 上打
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
Windows 上跑不了这个平台(`cargo build` 需要 macOS SDK)。CI 那边是
|
|
29
|
-
`.github/workflows/desktop-mac.yml`(`macos-14` runner
|
|
30
|
+
`.github/workflows/desktop-mac.yml`(`macos-14` runner),上面每一步都在里面,产物同时作为
|
|
30
31
|
workflow artifact 与 Release 附件。
|
|
31
32
|
|
|
33
|
+
### ⚠️ tarball **必须在 macOS 上打**
|
|
34
|
+
|
|
35
|
+
**Windows 上的 `tar` 与 `npm` 不记 Unix 权限位。** 在 Windows 上对本目录 `npm pack`,打出来的
|
|
36
|
+
`bin/dsh-pet-live2d-desktop` 是 `644`;装到 mac 上被插件拉起时 `spawn` 直接 `EACCES`。
|
|
37
|
+
|
|
38
|
+
这件事**看不出来、也不报错** —— tarball 结构正常、大小正常、解出来文件也在,只有那三位权限位
|
|
39
|
+
是错的。实测(同一个 9,791,472 字节的二进制):
|
|
40
|
+
|
|
41
|
+
| 渠道 | 谁打的包 | tar 里的权限位 |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| Release 的 `.tar.gz` | CI(macOS) | `0755` ✓ |
|
|
44
|
+
| npm 子包的 `.tgz` | Windows 本机 | `0644` ✗ |
|
|
45
|
+
|
|
46
|
+
所以:**CI 打 tarball → 挂 Release → 本机取回来原样 `npm publish`**,不要在本机重打。
|
|
47
|
+
判据是 `node tools/check-tarball-mode.mjs <tarball> --expect-exec package/bin/dsh-pet-live2d-desktop`
|
|
48
|
+
(CI 与 `~/.dsh/pet-darwin.mjs` 都会跑它,退出码非 0 就拦下发布)。
|
|
49
|
+
|
|
50
|
+
> 3.3.1 与 3.3.2 的 darwin 子包都是 `644` 发出去的。用户之所以还能用,是因为插件侧
|
|
51
|
+
> `resolveDesktopBinary()` 在返回前补了一次 `chmod 0755`(那是兜底,不是"发布物没问题")。
|
|
52
|
+
|
|
32
53
|
## 发布纪律(两步,顺序不能反)
|
|
33
54
|
|
|
34
|
-
主包 `optionalDependencies`
|
|
35
|
-
npm 上不存在的包。要发的时候:
|
|
55
|
+
主包 `optionalDependencies` 里**已经有**这一行(3.1.1 起)。发布时:
|
|
36
56
|
|
|
37
|
-
1. 先把子包发上 npm:`
|
|
38
|
-
`npm-prepare-subpackage.mjs`
|
|
39
|
-
2.
|
|
40
|
-
`"dsh-pet-live2d-desktop-darwin-arm64": "<主包版本>"`,然后发主包。
|
|
57
|
+
1. 先把子包发上 npm:`node ~/.dsh/pet-publish-dir.mjs <CI 给的 .tgz>`(版本必须与主包逐字相同,
|
|
58
|
+
`npm-prepare-subpackage.mjs` 与 `pet-darwin.mjs` 都会校验);
|
|
59
|
+
2. 再发主包。
|
|
41
60
|
|
|
42
|
-
反过来做的话,主包上线时那个版本的子包还不存在 ——
|
|
61
|
+
反过来做的话,主包上线时那个版本的子包还不存在 —— npm 遇 `optionalDependencies` 里
|
|
62
|
+
**不存在**的版本会**静默跳过**,用户装完桌面端凭空消失、且一句错都不报。
|
|
43
63
|
|
|
44
64
|
## 已知代价(macOS 特有)
|
|
45
65
|
|
|
Binary file
|