我在node.js中创建了一个在我的mac上运行良好的电子应用程序。但我尝试使用
打包它electron-package . --all
如下所示:https://github.com/electron-userland/electron-packager/
成功运行并为linux,mac和windows制作应用程序。
我遇到的问题:
应用程序的图标仍然是默认的电子图标。我将mainWindow更改为:
mainWindow = new BrowserWindow({
width: 800,
height: 600,
icon: file://${__dirname}/assets/img/mylogo.png
})
编辑:通过运行解决了这个问题
electron-packager . --platform=mas --arch=x64 --icon=assets/img/app.icns --overwrite
(图标路径周围有刻度线)。我还缺少什么来更改应用程序图标?
在Mac上,当用户尝试打开我的应用时,由于此消息,他们无法安装:
"AppName" can't be opened because it is from an unidentified developer.
这很奇怪,因为在Github制作的打包的.app文件夹中有一个LICENSE文件。这里缺少什么?
在Windows上,当用户尝试打开应用时,会出现此错误:
node.dll is missing from this computer
这似乎是关闭的,因为用户不必为了让我的应用程序正常工作而安装额外的东西。我也在这里搞了别的东西吗?
感谢。
答案 0 :(得分:3)
首先,您应该尽量避免将多个问题打包到一个帖子中。
(已经自己回答)
虽然电子打包器理论上应该签署您的应用程序(至少我理解相应的自述条目),但您的应用程序似乎尚未正确签名。你有没有关注the tutorial that can be found at the github page?
请检查: