我有一个现有的electronic项目,为了在多个操作系统(Mac,Windows,Linux)上测试该应用程序,我们正在使用电子生成器来构建该应用程序。 目前,构建过程大约需要15-20分钟。
我使用的是Mac计算机,并且已经在Azure上设置了Microsoft Windows和Linux VM,因此我不必一直切换物理计算机,而且该项目具有热重载设置。
这是用于构建的config.json:
{
"appId": "myApp",
"icon": "resources/icon",
"productName": "myProduct",
"extraMetadata": {
"name": "myApp"
},
"mac": {
"extendInfo": {},
"extraFiles": [
"PlugIns/"
]
},
"dmg": {
"contents": [
{
"x": 110,
"y": 150
},
{
"x": 240,
"y": 150,
"type": "link",
"path": "/Applications"
}
]
},
"linux": {
"category": "Development",
"target": [
"AppImage",
"deb"
]
},
"win": {
"target": [
"nsis",
"msi"
],
"extraResources": [
{
"from": "resources/fileIcons",
"to": "fileIcons"
}
]
},
"nsis": {
"allowElevation": false,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"createStartMenuShortcut": true,
"deleteAppDataOnUninstall": true,
"oneClick": false,
"perMachine": true,
"uninstallDisplayName": "${productName}"
},
"directories": {
"buildResources": "resources/app",
"output": "release/my-app"
},
"publish": {
"provider": "generic",
"url": Some-s3-url
}
}
目的是通过优化构建过程来减少构建时间。