Hi there,
I have several projects (Applications and DLLs) that have a corresponding .rc file containing version information. I want to keep the version info in the .rc file, because of the varying information throughout the files handling is easier than in lot's of compile actions or different property sets.
What I want to do is read the version info from the .rc file into FB, update some information (Inc(BuildNumber), Update(FileVersion, OriginalFilename) etc.) and save this back into the .rc, then compile. It would also be OK to compile the version info into the build using property sets.
I figured how I can update version info .rc files using the "Win32 Version Info Updater" action, but as far as I can see it only writes properties from a property set into the file; it does not read the info into the property set before. The problem is e.g. the build number, constantly increased with every build is always zero, as the initial value is not read from the .rc file.
As said above I do not want to have a property set for each project. Is there a way to read version information from an .rc into a property set? Is there another way to accomplish the above, or am I missing something obvious?
I am using FB 5.5.0.518 Professional Edition.
Thanks for the help, best regards,
christoph
P.S.: Btw, although rather obvious I did not find any help entry for the "Win32 Version Info Updater" action.
Hi,
I found an old post from Oct 2006 stating the same problem. The reply was that there is no reading version info from an .rc file, but that it is put on the enhancement list. What is the status of this enhancement?
Best regards,
christoph
christoph,
We had a similar issue here. We solved it by using a separate “versionInfo.h” file that contained only a version string (e.g. #define VERSION 3,0,0,10), and we included in the .rc file via #include.
To increment our version within FinalBuilder, we used two actions and some Javascript:
ReadTextFile [ versionInfo.h ] (read the current version into a variable, e.g. “#define VERSION 3,0,0,10”)
- ‘AfterAction’ script: parse the string and increment the build number (for us, the least significant number)
CreateTextFile [ versioninfo.h ] (create a new versionInfo.h file containing only the new version info (e.g. “#define VERSION 3,0,0,11”)
That’s it. Works very well for us. Hope this helps.
Hi Mike,
thanks for your insight. That is a good idea, I even think about using the ReadTextFile action with the OnReadLine event and a script to read and parse the .rc file into a property set, and use the Win32 Version Info Updater to write the information back to the .rc file.
Anyway I still vote for a Load PropertySet from VersionInfo .rc file action; I think it would be a useful enhancement. Anyone from the FinalBuilder stuff want to jump in?
Cheers,
christoph
Christoph,
We agree it would be useful, it is most definitely on our to-do list. It’s a big list, but it is somewhere near the top…
Regards,
Angus
Hi Guys,
Any update on the status of this enhancement?
Regards,
Tracey
Hi Tracy
We haven’t gotten to it yet. We’re a bit short staffed at the moment, but have some new people coming on board in the new year, so we’ll hopefully make some progress with the todo list then.
For the record, I still want this.
Still on the todo list unfortunately.
I vote for it too