通用架构安装包

This commit is contained in:
tianmo committed 2026-09-11 10:09:45 +08:00
1 parent 83890faaea
commit 8bf16fe09f
8 files changed
+162 -4

No files matched your search

+1 -1
View File
@@ -17,5 +17,5 @@
## 分发说明
- macOS 请完整分发 `.app`;Windows 可直接分发 `.exe` 和本说明。
- macOS 版本只适用于其标记的 CPU 架构(Apple Silicon 或 Intel)。Windows 版本也需在 Windows 上构建。
- macOS Universal 2 版本同时支持 Apple Silicon 与 Intel Mac,最低系统版本为 macOS 11.0。Windows 版本仍需在 Windows 上构建。
- 面向其他 Mac 分发时,建议使用 Apple Developer ID 签名并公证,避免 Gatekeeper 提示。
+1 -1
View File
@@ -68,6 +68,6 @@ npm run connector
npm run build:connector
```
macOS 会生成 `release/connector/macos-<架构>/Spine粒子连接器.app`;Windows 会生成 `release/connector/windows-<架构>/Spine粒子连接器.exe`。桌面程序由 C++17 编写,运行时不依赖 Node.js。默认使用 macOS 的 Apple Clang;Windows 应在 Visual Studio Developer Command Prompt 中执行,默认使用 MSVC,也可通过 `CXX` 指定 MinGW g++。
macOS 会生成 `release/connector/macos-universal/Spine粒子连接器.app`,同时支持 Apple Silicon 与 Intel Mac,最低系统版本为 macOS 11.0;Windows 会生成 `release/connector/windows-<架构>/Spine粒子连接器.exe`。桌面程序由 C++17 编写,运行时不依赖 Node.js。默认使用 macOS 的 Apple Clang;Windows 应在 Visual Studio Developer Command Prompt 中执行,默认使用 MSVC,也可通过 `CXX` 指定 MinGW g++。
面向其他 Mac 正式分发时,建议使用 Apple Developer ID 对 `.app` 签名并公证,避免 Gatekeeper 提示。
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
<key>CFBundleDisplayName</key><string>Spine粒子连接器</string>
<key>CFBundleExecutable</key><string>SpineParticleConnector</string>
<key>CFBundleIdentifier</key><string>com.spineparticle.connector</string>
<key>CFBundleInfoDictionaryVersion</key><string>6.0</string>
<key>CFBundleName</key><string>Spine粒子连接器</string>
<key>CFBundlePackageType</key><string>APPL</string>
<key>CFBundleShortVersionString</key><string>2.0.0</string>
<key>CFBundleVersion</key><string>2.0.0</string>
<key>LSMinimumSystemVersion</key><string>11.0</string>
<key>NSHighResolutionCapable</key><true/>
</dict></plist>
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict/>
<key>files2</key>
<dict/>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
@@ -0,0 +1,21 @@
# Spine粒子连接器(桌面版)
连接器是原生桌面应用,**无需安装 Node.js**。
## 使用
1. 正常安装并激活 Spine;连接器不会包含或替代 Spine 软件。
2. macOS 打开“Spine粒子连接器.app”;Windows 打开“Spine粒子连接器.exe”。打开应用即启动连接器。
3. 回到网页,等待导出区域显示“连接器可用 · Spine 已就绪”。
4. 首次使用生产网站时,点击网页中的“授权当前网站”,在打开的本机页面确认完整域名后点击“允许此网站”。
5. 可在应用内点击“断开连接”,或直接关闭应用来停止连接器。
若状态显示“未找到 Spine”,可在路径输入框中直接输入路径,或点击“选择 Spine.com”。Windows 请选择 `Spine.com`;macOS 请选择 `Spine.app/Contents/MacOS/Spine`。保存后下次启动仍然有效;“恢复自动检测”会清除手动路径。
连接器仅监听 `127.0.0.1:27843`,不会对局域网或公网开放。授权按完整来源区分,例如 `https://editor.example.com` 与 `https://editor.example.com:8443` 需要分别授权。
## 分发说明
- macOS 请完整分发 `.app`;Windows 可直接分发 `.exe` 和本说明。
- macOS Universal 2 版本同时支持 Apple Silicon 与 Intel Mac,最低系统版本为 macOS 11.0。Windows 版本仍需在 Windows 上构建。
- 面向其他 Mac 分发时,建议使用 Apple Developer ID 签名并公证,避免 Gatekeeper 提示。
+10 -2
View File
@@ -19,7 +19,8 @@ function run(command, args) {
}
async function buildMac() {
const packageDir = join(releaseRoot, `macos-${arch()}`)
const packageDir = join(releaseRoot, 'macos-universal')
const archive = join(releaseRoot, 'Spine粒子连接器-macOS-Universal.zip')
const app = join(packageDir, 'Spine粒子连接器.app')
const executable = join(app, 'Contents', 'MacOS', 'SpineParticleConnector')
await rm(packageDir, { recursive: true, force: true })
@@ -27,6 +28,7 @@ async function buildMac() {
await mkdir(join(app, 'Contents', 'Resources'), { recursive: true })
run(process.env.CXX || 'clang++', [
'-std=c++17', '-O2', '-Wall', '-Wextra', '-Werror', '-fobjc-arc',
'-arch', 'arm64', '-arch', 'x86_64', '-mmacosx-version-min=11.0',
...commonSources, join(native, 'app_macos.mm'),
'-framework', 'AppKit', '-framework', 'Foundation', '-o', executable,
])
@@ -47,7 +49,13 @@ async function buildMac() {
</dict></plist>
`, 'utf8')
await cp(join(root, 'connector', 'DISTRIBUTION.md'), join(packageDir, '使用说明.md'))
console.log(`已生成 macOS 应用:${app}`)
// 绑定 Info.plist 并封装资源,防止传输后被 macOS 判定为损坏。
// 正式公开分发时仍应使用 Developer ID 替换此临时签名并完成公证。
run('codesign', ['--force', '--deep', '--sign', '-', app])
await rm(archive, { force: true })
run('ditto', ['-c', '-k', '--sequesterRsrc', '--keepParent', packageDir, archive])
console.log(`已生成 macOS Universal 2 应用(arm64 + x86_64,最低 macOS 11.0):${app}`)
console.log(`已生成可分发压缩包:${archive}`)
}
async function buildWindows() {