Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: vserghi on August 01, 2005, 09:55:46 am
-
Firstly, a big well done on C::B. I am/was a user of DevCpp and I find that the interface of C::B is a lot fresher and cleaner. I love the code folding feature.
I understand that this is only at v1, and I'm sure you've heard this many times, but there is a feature on DevCpp where I can define version information and add an icon for the compiled application. I cannot find it in C::B. Is it already imlemented? Is it a feature not yet included? If it isn't, will it be included at some point?
Vas (very much a coding newbie)
-
I think it can be done (I'm sure about the icon, less so about version information) by adding your own resource file to your project. DevCpp generates its own resource file, but AFAIK Code::Blocks doesn't do that. (Though that would make a nice plugin if anyone would like to tackle it)
If you make your own resource file, note that the first icon defined will be used for the application itself.
-
I think it can be done (I'm sure about the icon, less so about version information) by adding your own resource file to your project. DevCpp generates its own resource file, but AFAIK Code::Blocks doesn't do that
As a matter of fact, it does.
The version info is not implemented yet, but a feature request is already filed about it...
Yiannis.
-
Thanks, for the info guys.
I somehow managed to compile the old resource files from the DevCpp project I had, and use them in my C::B project to get the icon and version info.
As I don't know what should really be in these files (and also which files I really need), I am very hesitant to edit them, apart from the obvious labels.
When can we expect to see this feature implemented into a release of C::B?
Vas.
-
DevCpp generates its own resource file, but AFAIK Code::Blocks doesn't do that
As a matter of fact, it does.
It does? I must have missed that feature, where is it?
-
It does? I must have missed that feature, where is it?
It does generate its own resource file (the <projname>_private.rc). It's currently only generated when using make. The reason it's there is to allow for such extensions to the project (like adding version info).
Yiannis.
-
That would explain why I didn't see it, I always have C::B invoke the compiler directly, it seems to work better.
Anyway, does it actually put anything in that resource file, and if so where can be changed what exactly is put in there? Only generating an empty resource file or one with non-settable options doesn't seem very useful except as a starting point for manual editing...
-
Yes, I had to dig through the code to answer your question, as I use direct mode too :P
This resource file currently just includes the rest of the project resource files and it is generated only if resource files exist anyway.
Its fate is to be decided though...
Yiannis.
-
This resource file currently just includes the rest of the project resource files and it is generated only if resource files exist anyway.
Ah, so the generated resource file is just an implementation detail of the makefile so that it only needs to process one resource file?
That doesn't really help, now does it? What the original poster was asking if there is some kind of dialog where icons, version etc. can be specified. There isn't currently, so he'll have to work with a hand-edited (or copied ;)) resource file to achieve what he wants.
-
OK, you asked if C::B is generating its own resource file and I said yes. I didn't say it does anything more currently ;)
Yiannis.
-
Lol. Well I'm thinking of something. Add the resource file to the templates :D (but um... all of them? :? dunno)
-
You should be able to use GoRC to achieve what you want.
http://www.godevtool.com/
http://www.jorgon.freeserve.co.uk/ResourceFrame.htm
The second link contains the manual, which is rather comprehensive. There's an example of a VERSIONINFO resource about halfway down the page.
-
kagerato, thanks for the web sites. From what I have seen in C::B, res files are created from rc files automatically on compilation, so the GoRC.exe shouldn't be needed.
However, these led me to other sites which allowed me to figure out how the rc files are built up. I should be able to make up a basic rc file now :). Although I've still got to look at what else can go in it apart from version info and the app icon (in fact, figure out how the app icon line is built up), a closer inspection of the second website should help.
I would still like to see this information written into a form of some kind in C::B though, like DevCpp does.
Thanks for all your help guys. :)
Vasilis.
-
You may find some bitmaps, icons, menus, dialogs (I think)... In fact, whatever could appear on the GUI of your WIN32 application. wxWidgets don't use these resources, but it may be usefull to have them treated, for example to build VST plugins.
-
I was also curious about this subject regarding version information for applications. Found the following MSDN link detailing everything you need to place into a resource file for versioning your DLL/EXE.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/tools/versioninfo_resource.asp
Paul.
-
Thanks for the link, I am a volenteer to make a plugin for this ;) (Yes my second, but this is less complicated I think)
-
From what I can assertain, the Dev-C++ principle gets around this by generating the version information as discussed in the link from my previouis post, and then appends this data into an .rc file with a file entry projectname_private.rc. It then includes your normal resource.rc file before passing the new file to the resource compiler. This behaviour may also work for your plugin. It will also save having to modify the existing project resource file before compiling.
Paul.
-
Thanks for the link, I am a volenteer to make a plugin for this ;) (Yes my second, but this is less complicated I think)
Don't forget to make it unicode-compatible! ;-)
-
I was also curious about this subject regarding version information for applications. Found the following MSDN link detailing everything you need to place into a resource file for versioning your DLL/EXE.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/tools/versioninfo_resource.asp
Paul.
Yeh, I found that link afterwards also, it's now bookmarked! I also found Pelles C IDE which has a nice resource editor.
Even so, at least I know how to edit a basic resource file now by hand with or without Pelles C.
Vasilis.
-
Thanks for the link, I am a volenteer to make a plugin for this ;) (Yes my second, but this is less complicated I think)
Is there any news for the version info plugin? Or is it implemented into Code::Blocks? I can't see any options for that purpose at the project properties.
-
Nope it isn't implemented.
You will need to make your own .rc file for this.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/tools/versioninfo_resource.asp
BTW this thread is almost a year old. :wink:
-
Nope it isn't implemented.
You will need to make your own .rc file for this.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/tools/versioninfo_resource.asp
BTW this thread is almost a year old. :wink:
and a newcomer has read it, that shows some users do indeed search in the forum : very good !!!
-
Indeed. :D 8)