How do I programmatically change the icon of a Windows executable and Mac application?
When distributing standalone apps built on node-webkit or Atom Shell , we are really just distributing the framework binary, but with our app content in a subdirectory.
We can of course rename the executables to our app name, but can we also change the icon (preferably from the command line to automate the release workflow)?
+3
source to share
1 answer
There are command line solutions for this on Mac and Windows.
Mac
defaults write /full/path/to/Info.plist CFBundleIconFile 'app/img/my-icon.icns'
Window
Winresourcer required
winresourcer --operation=Update \
--exeFile=path/to/my-exe.exe \
--resourceType=Icongroup \
--resourceName:1 \
--resourceFile:path/to/my-icon.ico
To find resourceName
, use Anolis Resourcer to open the exe. The name is in the sidebar as a child Icon Directory
. In my case, it was simply called 1
.
+3
source to share