Search code examples
electronelectron-packagerelectron-forge

How to show the custom icon on after installation electron application using electron forge


Thanks in advance.

I have developed one electron application. build process did by electron forge

Anyone has any idea on how to show custom icon on program and features instead of electron default icon.

    "config": {
        "forge": {
            "packagerConfig": {
                "name": "XYZ",
                "executableName": "XYZ",
                "icon": "./src/assets/common/installer/xyz_app",
                "asar": true,
                "extraResource": "licenses"
            },
            "makers": [
                {
                    "name": "@electron-forge/maker-squirrel",
                    "config": {
                        "name": "XYZ",
                        "icon": "./src/assets/common/installer/xyz_app",
                        "loadingGif": "./src/assets/common/installer/xyz.gif",
                        "setupIcon": "./src/assets/common/installer/xyz_app.ico",
                        "setupExe": "xyz.exe"
                    }
                }
            ]
        }
    }

enter image description here

Expecting to show custom icon on programs and features


Solution

  • There is no Squirrel option named icon, rather there's iconUrl which requires an .ico file at an http(s) address.

    https://js.electronforge.io/interfaces/_electron_forge_maker_squirrel.InternalOptions.Options.html#iconUrl