Electron App Icon. If app icon is not updated I get a problem that electron always shows default app icon. I tried using png, NativeImage, different icon sizes but still the problem; Go to node_modules -> electron -> dist, right click on Electron, choose View Info; Drag another icns into the icon on the top left; Release with electron-packager. icon must be specified with __dirname (we already did) for electron. Remember Electron js is all about building native desktop applications using HTML, CSS, and JavaScript. Our applications too should have a window icon. Okay, enough literature!. Adding a window icon is as simple as you can imagine using the icon property of BrowserWindow. We will, therefore; Import all required modules. All files are optional — but it is important to provide icon.icns (or icon.png), as otherwise the default Electron icon will be used. Windows (NSIS)¶ Optional icon.ico (Windows app icon) or icon.png. Icon size should be at least 256x256. needs to be placed in the buildResources directory (defaults to build).
yarn create electron-app my-app. NPM. npx create-electron-app my-app. You should now have a directory called my-app with a ultra-minimal Electron app boilerplate inside. If you head into that directory and start up the app, you'll be all set to start developing. Yarn. NPM. Yarn. cd my-app. yarn start. NPM. If app icon is not updated I get a problem that electron always shows default app icon. I tried using png , NativeImage , different icon sizes but still the problem.
Configure your app to use electron-builder : Create a directory build in the root of the project and save a background.png (macOS DMG background), icon.icns (macOS app icon) and icon.ico (Windows.
Selecting A Custom Icon For Your App. By default, the Electron icon is set as the default icon for your app, and most of the time, you probably would like to set your own custom icon. To do this, move your icon into your public folder, and rename it to be icon.png. The next thing to do would be to add the required dependency, electron-icon-builder. Electron provides native notifications API only for MacOS. So we are not going to use that, instead we'll be using a npm module called node-notifier.It allows us to notify users on Windows, MacOS and Linux. I changed the icon after building the app using resource hacker but what I need is to change it at build time in the correct way. what am I missing> angular electron electron-builder electron-packager Configure your app to use electron-builder : Create a directory build in the root of the project and save a background.png (macOS DMG background), icon.icns (macOS app icon) and icon.ico (Windows.