Author Topic: Version information  (Read 15995 times)

Offline vserghi

  • Multiple posting newcomer
  • *
  • Posts: 13
Version information
« 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)

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: Version information
« Reply #1 on: August 01, 2005, 10:37:46 am »
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.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Version information
« Reply #2 on: August 01, 2005, 10:59:42 am »
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.
Be patient!
This bug will be fixed soon...

Offline vserghi

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Version information
« Reply #3 on: August 01, 2005, 12:30:31 pm »
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.

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: Version information
« Reply #4 on: August 01, 2005, 01:19:14 pm »
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?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Version information
« Reply #5 on: August 01, 2005, 01:31:39 pm »
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.
Be patient!
This bug will be fixed soon...

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: Version information
« Reply #6 on: August 01, 2005, 03:36:07 pm »
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...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Version information
« Reply #7 on: August 01, 2005, 05:18:20 pm »
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.
Be patient!
This bug will be fixed soon...

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: Version information
« Reply #8 on: August 01, 2005, 05:39:11 pm »
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.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Version information
« Reply #9 on: August 01, 2005, 05:55:10 pm »
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.
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Version information
« Reply #10 on: August 01, 2005, 05:59:00 pm »
Lol. Well I'm thinking of something. Add the resource file to the templates :D (but um... all of them? :? dunno)

Offline kagerato

  • Multiple posting newcomer
  • *
  • Posts: 56
    • kagerato.net
Re: Version information
« Reply #11 on: August 01, 2005, 06:47:13 pm »
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.

Offline vserghi

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Version information
« Reply #12 on: August 02, 2005, 11:11:22 am »
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.

zieQ

  • Guest
Re: Version information
« Reply #13 on: August 02, 2005, 11:21:15 am »
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.

APEXnow

  • Guest
Re: Version information
« Reply #14 on: August 05, 2005, 07:24:52 pm »
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.