apache / cordova-electron

Apache Cordova Electron
Apache License 2.0
126 stars 59 forks source link

Electron Builder Wrong Icon File Name #166

Open Hyperdraw opened 4 years ago

Hyperdraw commented 4 years ago

Issue Type

Description

When building a Cordova app for Electron on Linux, the icon file in platforms/electron/build-res has the improper name installer.png. (The Linux configuration page says The icon filename must contain the size (e.g. 32x32.png) of the icon.) This is causing the icon file in the resulting package to be under /usr/share/icons/hicolor/0x0, and thus not showing correctly in the desktop environment. The name doesn't seem to change no matter what attributes I put on the icon element in the <platform name="electron"> element in config.xml.

Information

Building for Electron Linux x86_64 (any package type).

Command or Code

cordova build electron --release

Environment, Platform, Device

Building on Ubuntu 20.04.

Version information

Plain Cordova CLI 10.0.0, no framework.

Checklist

KinanKazmi commented 4 years ago

I have the same issue but with Mac-OSX. The build process first creates a builder-effective-config.yaml file in platforms/electron/build folder and in there it has icon: installer.png even though my config.xml says <icon src="res/electron/icon.icns" /> <icon src="res/electron/icon.icns" target="installer" />

When i verify the build from Apple Store, it says ERROR ITMS-90236: "Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon"

zoltan-mihalyi commented 3 years ago

I have the same issue. If I create 512x512.png in build-res and modify cordova-electron/lib/build.js to use 'non-existing.png' instead of 'installer.png', it works correctly (but I have no idea why).

zoltan-mihalyi commented 3 years ago

@erisu can you help me how can I solve this? I think the key is renaming "installer.png" to match the the name expected by electron-builder: https://www.electron.build/configuration/linux But I am not sure how to achieve this.