通用架构安装包
This commit is contained in:
1 parent
83890faaea
commit
8bf16fe09f
8 files changed
+162
-4
No files matched your search
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user