Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: O-san on April 02, 2011, 09:45:54 am
-
Is it possible to write file information in CB to the built executable. I am talking about the information that is available when you look at the properties of a file; product name, publisher, product language etc. I think in xcode and vc these things can be handled from within the IDE. Is there something similar in CB?
-
Is there something similar in CB?
Use a proper resource file for this purpose and add it to your project so that it get compiled / linked in. I remember that there was a template in the forums...
-
Code::Blocks doesn't provide you with any user interface for this.
However, you can manually add this information to your resources file (usually called resource.rc).
Two useful links:
Stackoverfl0w: How to change an executable's properties (http://stackoverflow.com/questions/1022449/how-to-change-an-executables-properties-windows) discussion.
MSDN: Resource-definition statements (http://msdn.microsoft.com/en-us/library/aa381043%28v=VS.85%29.aspx).
Thinking about it, it would be nice to have such a plugin :)
-
Thinking about it, it would be nice to have such a plugin :)
Why a plugin? All you need is a resource file template which is here in the forums, or the link to Stackoverfl0w ptDev provided. Updating the version fields to your needs is very easy! There is really no need for a fancy UI. I mean: It's like writing a plugin that creates Hello World apps. :lol:
EDIT: Here is the link I mentioned in the forums (my own post btw...)
http://forums.codeblocks.org/index.php/topic,6775.msg51955.html#msg51955
-
Thanks! That bit of info was what I was looking for. I had already a resource file for the program icon. However, for some reason the VERSIONINFO block is not present after building the exe. The field in the file properties window is just empty. :(
-
Thanks! That bit of info was what I was looking for. I had already a resource file for the program icon. However, for some reason the VERSIONINFO block is not present after building the exe. The field in the file properties window is just empty. :(
Are you sure that it gets compiled/linked in? Please post a full build log (see my sig).
-
I thought I had done it right (saved the RC file, cleaned the project, did a complete rebuild)... because the program icon showed. So I commented out the icon line, just to be sure. And my custom program icon disappeared and was replaced by a generic icon. Then.. I brought back the icon line in the resource file (together with the versioninfo strings). Now both the icon and version stuff are visible. Strange...
Well it works, thanks a bunch!
-
Well it works, thanks a bunch!
Good to know.
One more tiny thing: We don't respect non-development related commercials in footers of messages. I've removed your footer on purpose (twice now). This forum is not dedicated to make commercials about private webpages. Please respect our forum rules. It's OK to leave it in the Website link though (as it is a neutral link), as long as it is no commercial branding or SPAM.
-
Ah, okay sorry about that