I\'ve just created my first go application on Windows.
How do I give it an icon?
There doesn\'t seem to be any build flags to do this, and I know golang doesn\'t
The topic is long time, in fact mingw is only requirement, we don't need 3rd party dependency. In addition, resource file *.rc is mandatory for win32 executable application. At last, you can find the demo in rc-demo
1) Install mingw using Chocolatey: choco install mingw
2) Create main.exe.manifest file
3) Create main.rc file
100 ICON "main.ico"
100 24 "main.exe.manifest"
101 RCDATA "content.zip"
4) Build
In git-bash windows perform the following command:
windres -o main-res.syso main.rc && go build -i