-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
windows: embed resource (icon, image, etc...) into compiled target. #1552
Labels
Milestone
Comments
Labels changed: added os-windows. Owner changed to @alexbrainman. Status changed to Accepted. |
Owner changed to builder@golang.org. |
8l: emit resources (.rsrc) in Windows PE. http://code.google.com/p/go/source/detail?r=99a520c00dcf8231ee1ed8c69137e61b435663d6&path=/src/cmd/ld/ldpe.c This issue should fixed. |
I think, assuming that every .o file has to be part of an exe is a bit forceful. You could go ahead with this idea. But with pe file, you could add sections after it is built. So we can always creat tool that would add resources after. We could just use make like before for these. We could write some sort of compiler that builds resources out of source files. It is hard for me to see the use case until I actually do something like that. Alex |
But the GNU windres program is already a compiler that builds resources out of source files. Hard to see why we would need another one. (Although when I wrote windres I designed it so that it could generate various different output formats, and that still seems to be true.) This is another example of a tool like goyacc that generates an output file that should be included in the program, although in this case the tool generates an object file rather than Go source code. If we have a reasonable way to handle generated files, it should handle this case too. In the meantime, gathering all .o files into the link sounds a bit error-prone to me, but we could use a different extension--.ogo?--or we could list them in a //build comment. |
It would be nice if (1) the solution worked for clients of a package that needs a resource without adding a new tool that all clients must have and (2) the solution was a little more general than Windows resources. I believe that it will work for both gccgo and 6g if we can just get the object file into the package file, like we used to with the Makefile OFILES list. Perhaps .syso could be the extension for system object files that should be copied into the package archive? It is tempting (but unreasonable) to use .goo instead. |
This issue was closed by revision b099633. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by AllenGnr:
The text was updated successfully, but these errors were encountered: