Cordova Electron Builder 图标在 Linux 上打包错误

Cordova Electron Builder 图标在 Linux 上打包错误

在 Linux 上为 Electron 构建 Cordova 应用程序时,中的图标文件的platforms/electron/build-res名称不正确installer.png。(Linux 配置页面The icon filename must contain the size (e.g. 32x32.png) of the icon.)这导致结果包中的图标文件位于 下/usr/share/icons/hicolor/0x0,因此无法在桌面环境中正确显示。无论我在中icon的元素上放置什么属性,名称似乎都不会改变,即使我手动将图标重命名为、编辑并手动调用,图标仍然位于 下。<platform name="electron">config.xml512x512.pngplatforms/electron/build/builder-effective-config.yamlelectron builder0x0

答案1

该问题似乎是由这行代码应用程序构建器,所以现在的解决方案必须是克隆 App Builder,编辑该行以导出正确大小的数据,构建它,然后将其作为node_modules/app-builder-bin,替换来自 NPM 的原始版本。我真的不明白为什么它不能正常工作,但是这解决了问题。

相关内容