Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Electron - How to change the default .icns that Electron adds

I'm using versions "electron-prebuilt": "^0.36.4" and ""electron-packager": "^5.2.1".

I package my .app by adding this script in my package.json file:

"package-mac": "electron-packager . tE --platform=darwin --arch=x64 --version=0.36.4"

On the terminal, I type npm run-script package-mac.

The tE.app is inside a generated folder (in the root of my project) named tE-darwin-x64. See the picture below:

My Electron App

Comparing to other tutorials around the web, there are typically more folders and files generated by electron-packager. And they seem to be missing in mine. Particularly, the info.plist file is missing. I think I'm missing some miles because I want to change the default .icns to my custom one, and I think I need the info.plist. Though I'm not sure.

What am I doing doing wrong and how to I achieve my goal?

like image 999
junerockwell Avatar asked Feb 04 '26 21:02

junerockwell


1 Answers

Since you are using electron-packager anyway, look into using the --icon option (see here).

If you want to do it manually, look into the contents of your tE.app: open it in the Terminal, it's just a folder, or right-click in Finder and open package contents -- that's were you will find the contents you're missing.

like image 124
inukshuk Avatar answered Feb 06 '26 09:02

inukshuk