appdmg是mac下打包dmg格式的工具,是个nodejs库。
安装
npm install -g appdmg
使用
appdmg <json-path> <dmg-path>
json-path
: 配置-json路径dmg-path
: 要生成dmg路径
示例:
cat>appdmg.json<<EOF
{
"title": "Gopeed",
"icon": "Gopeed.app/Contents/Resources/AppIcon.icns",
"contents": [
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
{ "x": 192, "y": 344, "type": "file", "path": "Gopeed.app" }
]
}
EOF
mkdir dist
appdmg appdmg.json dist/Gopeed.dmg