Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: cmd/go: command line flag to add icon for windows executable #38509

Closed
pjebs opened this issue Apr 17, 2020 · 7 comments
Closed

proposal: cmd/go: command line flag to add icon for windows executable #38509

pjebs opened this issue Apr 17, 2020 · 7 comments

Comments

@pjebs
Copy link
Contributor

pjebs commented Apr 17, 2020

There should be a command line flag to go build to add an icon to the executable file.

@gopherbot gopherbot added this to the Proposal milestone Apr 17, 2020
@ianlancetaylor
Copy link
Contributor

I would guess that you can do this by adding a file with a .syso extension with an appropriate resource section. That seems more convenient than a go build option, since it will work even if you forget to use the command line option.

@ianlancetaylor ianlancetaylor changed the title Proposal: command line flag for go build to add icon for windows executable proposal: command line flag for go build to add icon for windows executable Apr 17, 2020
@pjebs
Copy link
Contributor Author

pjebs commented Apr 23, 2020

A syso file can be used to embed all sorts of different resources and not just an icon.
I assume adding an icon would be the overwhelming use-case. Generating a sysco file using an external application such as https://github.com/josephspurrier/goversioninfo would be overkill if one merely wants to add an icon and nothing else.

@ianlancetaylor
Copy link
Contributor

I don't understand why generating a .syso file is overkill. Sure, it can do a lot more than add an icon. So what? If you want to add an icon, you have to have an icon file. It's one more command, run exactly once, to turn that icon file into a .syso file. Then you're done.

A .syso file has another advantage: it is always there, so you don't have to add a command line option when you run go build or go install. It just works.

@ianlancetaylor ianlancetaylor added the GoCommand cmd/go label Jan 6, 2021
@ianlancetaylor ianlancetaylor added this to Incoming in Proposals (old) Jan 6, 2021
@rsc rsc changed the title proposal: command line flag for go build to add icon for windows executable proposal: cmd/go: command line flag to add icon for windows executable Jul 20, 2021
@rsc
Copy link
Contributor

rsc commented Jul 21, 2021

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@rsc rsc moved this from Incoming to Active in Proposals (old) Jul 21, 2021
@tc-hib
Copy link

tc-hib commented Jul 21, 2021

I assume adding an icon would be the overwhelming use-case.

I don't think so.
The only resource that may really be necessary is the manifest.

The icon is cosmetic, and we often want to add "version info" because it is also displayed in the explorer:

image

@rsc rsc moved this from Active to Likely Decline in Proposals (old) Jul 28, 2021
@rsc
Copy link
Contributor

rsc commented Jul 28, 2021

Based on the discussion above, this proposal seems like a likely decline.
— rsc for the proposal review group

@rsc rsc moved this from Likely Decline to Declined in Proposals (old) Aug 4, 2021
@rsc
Copy link
Contributor

rsc commented Aug 4, 2021

No change in consensus, so declined.
— rsc for the proposal review group

@rsc rsc closed this as completed Aug 4, 2021
@golang golang locked and limited conversation to collaborators Aug 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

5 participants