Skip to content

Unable to set the custom icons #251

@Polm90

Description

@Polm90

Bug Report

Problem

What is expected to happen?

I want to customize the app icon, avoiding to use the default electron one.

What does actually happen?

Building the app, it says "default Electron icon is used reason=application icon is not set" and it uses the default icons and not the ones I've specified in config.xml file.

Information

Command or Code

Config.xml file:

 <platform name="electron">
    <preference name="ElectronSettingsFilePath" value="res/electron/settings.json"/>
    <preference name="ShowSplashScreen" value="true"/>
    <icon src="res/electron/icons/512x512.png" target="app"/>
    <icon src="res/electron/icons/1024x1024.png" target="installer"/>
  </platform>

Command:
cordova build electron
Note: using cordova run electron --nobuild works, but it's not what i want :)

Build.json:

{
  "electron": {
    "release": {
      "windows": {
        "package": [
          "msi",
          "appx"
        ],
        "arch": [
          "x64"
        ],
        "signing": {
          "release": {
            "certificateFile": "",
            "certificatePassword": ""
          }
        }
      }
    },
    "debug": {
      "windows": {
        "package": [
          "msi","zip"
        ],
        "arch": [
          "x64"
        ],
        "signing": {
          "release": {
            "certificateFile": "",
            "certificatePassword": ""
          }
        }
      }
    }
  }
}

Environment, Platform, Device, Version information

I'm on windows 11.
Cordova: 11.1.0
Cordova-electron: 3.1.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions