We recently upgraded to XE2 and the latest build of FinalBuilder, and I'm having problems with the dproj version info. I've read the forums, I know you've had issues with trying to get FB to work with the mess that is XE2's dproj file - I can see why after digging through them myself and trying to understand the inheritance for them.
My problem is that while FB will update the version info for the build that I'm doing (RELEASE), it won't update the version for DEBUG or any other config that I put in there. Our clients & servers are linked by version number stored in the database, so we can always be sure that the proper client is running against the correct sever & database. This is an issue for our development team because after every nightly build the versions no longer match up as we all build in DEBUG config.
- I don't really care about the other info (trademarks, copyright, etc ), just the version number.
- Should FB be updating the version number in all configs? If so, thoughts on what may be wrong in my setup?
- If it isn't, suggestions on how I could update the dproj as part of our build process? I thought about using the XML action - would you have an example of that to share?
FinalBuilder does’t support updating the version info for all configs. Achieving this would not be extremely difficult, because the inheritance model used is a nightmare… the code to read/update the versioninfo in the dproj file is probably the most complext part of FinalBuilder! I’m not sure why embarcadero decided to implement it the way they did, because even they cannot get it right (the XE2 IDE is full of bugs around this area).
I can only suggest you use the xml actions to update the dproj, or perhaps use a different method to handle the version checking between client and server when building the debug version (perhaps update a constant in a pas file during the build).
We had exactly the same problem, until in desperation I moved the Delphi compile action into a separate action list where it is followed by an action to run a program which updates the dproj file. So now we run the action list instead of the Delphi build, and follow each compile with fixing up the project file, replicating the version info (which FB controls) into the other property sets.
You are welcome to the source of the dproj-updating program I wrote. All I can say is that it works on our own 32-bit and 64-bit VCL projects (no FM), but I no longer recall exactly how. It has had several trial-and-error iterations, and contains some commented-out lines, mostly without explanation. Vincent’s reply explains the reasons for this situation (though I think he has a stray ‘not’ in the second sentence). For me, writing a program was an easier and more flexible approach than using the FB XML actions.
I do not have much confidence that this program would work on anything other than the latest XE2 build - EMB seem to tinker with this mess all the time. The thought of having to revisit all this is one of the reasons why XE3 remains on the shelf here.