Windows version:
- Convert your logo image to .ico format. There are free online convertors that do the job.
- Create a .rc file in your project. This is a script file windows will use to find out you want to set the icon.
- In this file write: uniqueId ICON “./path/to/file.ico”
Where the uniqueid is a name of your choosing. - You then compile this file using windows resource compiler, which takes .rc files and converts them to .res files. On the command line write: RC filename.rc where filename is the name of your .rc file you created.
- Now that you have a .res file, you can pass this to the compiler when you compile your .exe. You just have to pass the path/to/file.res
Thats it! Now the exe should have a unique icon to make it look more professional.
Note: I believe the ico file is compiled in with the exe, so you don’t have to keep the .ico file around when you go to ship your program.
On mac it is also pretty simple. Mac differs in that you don’t actually change the icon of the executable, instead you set the icon for your .app bundle.
- Convert your png image to .icns instead of .ico. I found the program Image2icon pretty good. And you just need the free version.
- Put this file in the Resources folder of your bundle
- A .app bundle has a file called Info.plist which is an XML file with meta data about your app. In this file there is an identifier that looks like this:
<key>CFBundleIconFile</key>
<string>iconfilename.icns</string>
For more info about the bundle structure on MacOS see
I found looking in the .app folder was the easiest way to work out how it works.