我正在尝试为MacOS创建电子应用程序。为此,我在Virtual Box上使用MacOS Catalina 。我可以尝试dmg文件使用电子建设者和伪造。它对我来说很好,我可以安装和ru应用程序。但它不适用于其他PC。人们可以运行dmg并安装,但不能运行它,“应用程序app_name无法打开”。伪造配置:
module.exports = {
packagerConfig: {},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-dmg',
config: {
format: 'ULFO'
}
}
],
};
生成器配置:
"build": {
"files": [
"**/*",
"!node_modules/"
],
"appId": "lib",
"win": {
"target": [
"nsis"
]
},
"nsis": {
"oneClick": false,
"uninstallDisplayName": "Remove Library",
"shortcutName": "Library",
"menuCategory": true,
"allowToChangeInstallationDirectory": true,
"license": "license.md",
"language": "0x046D",
"multiLanguageInstaller": true,
"unicode": true,
"installerIcon": "icon.ico",
"uninstallerIcon": "icon.ico"
},
"mac": {
"target": "dmg",
"icon": "icon.ico",
"asarUnpack": "**/*.node",
"arch": [
"universal"
]
},
"extraFiles": [
{
"from": "license.md",
"to": "license.md",
"filter": [
"**/*"
]
}
],
"extraResources": [
"./src/extraResources/**",
{
"from": "tor",
"to": "tor",
"filter": [
"**/*"
]
}
]
}
它不工作事件与一个明确的应用程序,只是打开窗口.
1条答案
按热度按时间63lcw9qa1#
您需要对应用程序进行签名,以便它能够在其他人的计算机上运行。