Configuration: FB 7.x/Win 7 x64/Delphi XE2 Pro
After changing to XE2 we have the next problem with FB Builds.
Our FB build machines are building our Delphi projects for releases, etc… One part of a build is to set the versioninfo of a Delphi project because we want to have consistent versioninfo.
Before XE2 this was no problem. There was only one versioninfo in the Delphi projects.
With XE2 you have several versioninfos now which are depending on the Delphi project configurations.
Now it seems that with FB and XE2 it is not possible anymore to set versioninfo for all Delphi project settings (Base/Release/Debug/Win32/Win64) at one go.
FB set versioninfo only for the selected XE2 configuration.
Is there a way to to this for one Delphi project at one go? Maybe with scripting or something like this.
Regards,
Thomas
It is not practical to update the version information for every configuration… the inheritance model in the dproj file is a nightmare as it is, figuring out which parts of each configuration to update would be very time consuming (only overriden fields are stored at a configuration level).
I find that using a Property Set for version info seems to update all the levels, along with checking ‘update project settings with version info’, and ‘update versioninfo keys’. But the XE2 project model is so complex and error-prone (especially with projects migrated from earlier releases) that I also wrote a program to try to clean up the DPROJ (not always perfectly) which I have FB run after each compile.
I have to try it.
But we use the “BeforeAction” event to set several extra version keys with VBScript. Here has FB an error when writing data back to the Delphi project settings.
I sent a project file to support.
Sorry, I was wrong about the FB property set updating all the levels. It only writes/updates the active level, and I had forgotten that it is the program that I wrote some months ago that updates the base level from the active level, and removes any version info that XE2 may have written into intermediate levels (which prevents the hierarchy from operating correctly).
Someone else has just uploaded a DPROJ-cleanup utility to Embarcadero code central (28907), but I do not think this is useful for Finalbuilder because (a) it has a user interface, not command-line; and (b) it cleans out everything except the base set, so would not preserve the settings originating in FB. Anyway, it has prompted me to dust off and tweak my own program, and you are welcome to have a copy of that (at your own risk, of course!) to tweak further yourself if you wish. I just need to test the latest changes I have made first.
Hi Tim,
I saw what you mean.
In my opinion FB7 has a general problem with XE2 version info in Delphi Project Settings.
The generated files from builds are ok. But the rewritten results in the Delphi Project Settings are not ok. I think Vincent will look about it in the next time
Actually, I would prefer Vincent to leave it the way it is! We also use FB to control all the version numbers, and my program runs after the compile and fixes up the .Dproj file. I like the control this provides, and I question whether FB could produce a better solution which satisfies everyone’s needs, given the fact that it has to work in the present project files. I think the problem lies with Embarcadero, and possibly also with the MS build system: even a casual glance inside the project file shows how over-engineered it is.