macos - 如何使用 appdmg 工具进行代码签名?
问题描述
正如这里提到的https://github.com/LinusU/node-appdmg创建 dmg。
我没有为“代码签名”添加任何示例。
有没有人用它来创建 dmg 可以帮助我知道在这两个占位符中提供什么?第二个是可选的,我仍然想知道。
{
"title": "My App",
"icon": "app.icns",
"icon-size": 108,
"background": "Resources/SplashScreen/dmg-background.png",
"contents": [
{ "x": 450, "y": 150, "type": "link", "path": "/Applications" },
{ "x": 150, "y": 150, "type": "file", "path": "/My App.app" }
],
"code-sign": [
{ "signing-identity" : ""},
{ "identifier" : ""}
]
}
解决方案
格式错误,应该是:
{
"title": "My App",
"icon": "app.icns",
"icon-size": 108,
"background": "Resources/SplashScreen/dmg-background.png",
"contents": [
{ "x": 450, "y": 150, "type": "link", "path": "/Applications" },
{ "x": 150, "y": 150, "type": "file", "path": "/My App.app" }
],
"code-sign": {
"signing-identity" : "Developer ID Application: xxx",
"identifier" : "<Your BundleID>"
}
}