在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):LinusU/node-appdmg开源软件地址(OpenSource Url):https://github.com/LinusU/node-appdmg开源编程语言(OpenSource Language):JavaScript 99.8%开源软件介绍(OpenSource Introduction):node-appdmgGenerate beautiful DMG-images for your OS X applications. Installationnpm install -g appdmg Usageappdmg <json-path> <dmg-path>
TestTo produce a test DMG to your desktop, run the following command: appdmg test/assets/appdmg.json ~/Desktop/test.dmg JSON InputThe JSON input for the image follows a simple structure. All paths are relative to the JSON file's path. Example{
"title": "Test Application",
"icon": "test-app.icns",
"background": "test-background.png",
"contents": [
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
{ "x": 192, "y": 344, "type": "file", "path": "TestApp.app" }
]
} Specification
Retina backgroundFinder can display retina backgrounds if packaged correctly into a E.g. if the json contains APIThe application can also be called from within another javascript file, example: const appdmg = require('appdmg');
const ee = appdmg({ source: 'test/appdmg.json', target: 'test.dmg' });
ee.on('progress', function (info) {
// info.current is the current step
// info.total is the total number of steps
// info.type is on of 'step-begin', 'step-end'
// 'step-begin'
// info.title is the title of the current step
// 'step-end'
// info.status is one of 'ok', 'skip', 'fail'
});
ee.on('finish', function () {
// There now is a `test.dmg` file
});
ee.on('error', function (err) {
// An error occurred
}); You can also pass in the specification directly instead of reading it from a file. const ee = appdmg({
target: 'test.dmg',
basepath: __dirname,
specification: {
"title": "Test Title",
// ...
}
}); OS SupportCurrently the only supported os is Mac OS X. Track the status of this here: #14 Hidden filesBy default hidden files will show for users with Files to usually move:
Alternatives
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论