I changed my app icon and for some reason I can not update the icon (currently has the icon of an electron).
Relevant modules I use:
"electron-builder": "5.7.0",
"electron-prebuilt": "^ 1.4.13"
my package.json
:
"build": {
"appId": "com.siemens.dmv",
"asar": true,
"win": {
"target": "squirrel",
"icon": "./build/icon.ico",
"title": "DigitalManufacturingViewer",
"msi": true,
"IconUrl": "data: image / png; base64,
AAABAyUAJSshACMLBAAeJRAAAw0VAAYPEQAFJzsAE // (long string)
}
I tried several orders without success, does anyone know what command I have to run?
Create the Electron based Syncfusion Application as mentioned in this link. Then package the application using Electron Packager, once packing completed JS_Electron-win32-ia32 folder will be created with Electron package file.
¶ A complete solution to package and build a ready for distribution Electron app for macOS, Windows and Linux with “auto update” support out of the box. NPM packages management: Native application dependencies compilation (including Yarn support).
electron-builder is a CLI tool that helps us create multi-platform distributions for Electron applications. It supports macOS, Windows, and Linux targets out of the box. It supports multiple file formats for each of these platforms such as dmg , pkg , mas and, mas-dev for macOS.
Make icon.ico (for Windows and Linux) and icon.icns (for Mac) and place them in the build directory.
Remove the other "icon" properties from the config. the build directory is the default location where electron builder searches for the icons.
Also try updating the electron-builder version. The version you are using is about 2 years old. A lot of features and bugfixes related to icons have been made in the new versions.
Electron Builder by default looks for assets in the build
folder:
./build/
background.png
[email protected]
icon.icns
icon.ico
icon.png
Icon names are listed in the docs: https://www.electron.build/icons
You can configure the build folder path in your package.json
using:
{
"name": "your-app",
"version": "0.0.1",
"build": {
"files": [
"custom/directory"
],
"directories": {
"buildResources": "custom/directory"
}
}
}
Make sure that files are copied using the files
attribute. As mentioned in the configuration docs:
https://www.electron.build/configuration/configuration#configuration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With