How to manage version information on Delphi XE2 across platforms

6.5k views Asked by At

I am migrating projects from XE to XE2 and I have noticed that I am missing my manually entered version information such as Company Name, Product Version etc. Creating a simple empty VCL forms applications I see that data typed in for version info under 'All configurations - All Platforms' disappears when you then select for example 'Release configuration - 32-bit Windows platform'. I guess I can go through the platforms re-entering my info but what is going on here? One would expect the 'All configurations - All Platforms' info to propagate across all platforms unless overriden, just like compiler options etc, or am I missing something?

Further note - As I investigate further, I see that there is a work around using DDevExtensions which adds a menu option under 'Project'. If you check the boxes at the bottom 'Apply to Selected' and 'Apply VersionInfo to all platforms' then you can get the displayed version info copied to all platforms without affecting the other projects in your group.

5

There are 5 answers

1
Richard Turner On

I believe there is a ‘bug’ in the version information stuff where its putting multiple version configurations into the .djproj file in the project folder.

It seems to be ok if you change the Target to ALL Configurations the very first time you open it up in Delphi XE2. Then once it has loaded drop down the target and click only on the bold entries to copy down the version info. If you accidentally click on a non bold entry the text is set to the default and is made permanent in the .dsproj file.

I have fixed this by doing the following - you will need to mod the details as necessary I suggest you just look at the file first - it is usually obvious what it happening.

1) Copy the project .dsproj file then Open the projects .dsproj file in notepad

2) Locate the first occurance of it will be around line 40.

3) Copy and paste this bit above it.

<PropertyGroup Condition="'$(Base)'!=''">
                                            <DCC_ExeOutput>**c:\xxx**</DCC_ExeOutput>
                                            <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
                                            <VerInfo_Locale>2057</VerInfo_Locale>
                                            <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
                                            <VerInfo_AutoGenVersion>true</VerInfo_AutoGenVersion>
                                            <VerInfo_MinorVer>12</VerInfo_MinorVer>
                                            <Icon_MainIcon>**My_Icon.ico**</Icon_MainIcon>
                                            <VerInfo_Release>1</VerInfo_Release>
                                            <VerInfo_MajorVer>5</VerInfo_MajorVer><DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;Data.Win;System.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_Keys>CompanyName=xxxxxxx;
FileDescription=**xxxxxxxx**;
FileVersion=5.12.1.0;
InternalName=;
LegalCopyright=2012 xxxxxx Services;LegalTrademarks=**xxxx**;
OriginalFilename=;
ProductName=**xxxx**;
ProductVersion=5.0;
Comments=</VerInfo_Keys>
</PropertyGroup>

4) Replace the starred entries with the information from further down in the file– if you cant find the icon you will need to add it again although I have found that in most of my projects it is in the folder as a separate .ico

5) You can then remove all the other original property group entries right down to :

                            <ProjectExtensions>
                                            <Borland.Personality>Delphi.Personality.12</Borland.Personality>
                                            <Borland.ProjectType/>
                                            <BorlandProject>
1
frogb On

It seems to be a bug in XE2 that causes version info not to be propagated from higher to lower levels. The QC I opened on this issue (99428) was closed on 7th November and marked as "resolved in build 16.0.4256.43595".

For production use (when we switch to XE2), I will be using FinalBuilder to get the version info correct, but I await the fix, hopefully in the next month or so, in order to get IDE builds to match the real versioning from FB. But in the mean time I will try your suggestion of using the fix pack...

0
Jessie Potts On

This is still an issue in build #16.0.4429.46931. However, I found that I can eliminate the problem by opening the project's "dproj" file and delete all of the <VerInfo_Keys> elements except for the base property group (<PropertyGroup Condition="'$(Base)'!=''">). Doing this allows the "All configurations - All platforms" version information to be inherited to the different build and platform configurations without any need to duplicate.

2
R. Hoek On

I've created an application, which will remove child build config version info after conversion... When I open an old project I then close it and run the tool. This will ensure the version info to be properly inherited (Update 4 does not resolve this).

1
Tony On

"The QC I opened on this issue (99428) was closed on 7th November and marked as "resolved in build 16.0.4256.43595".

Alas this is not fixed as of the latest version 16.0.4358.45540

If you migrate a project from an earlier version of Delphi, it'll create version resources at 'All configurations' level containing the copy of the older configuration. This is good.

It'll proceed to completely ignore it - this is really really bad. We didn't notice until quite late in testing that all our executable files were being built with no copyright and trademark information - it was simply being ignored.

The only solution is to hand edit all the dproj files as above. Really it needs someone to write a tool to fix this.. it's fairly mechanical & I wish I had the time.

FinalBuilder sounds nice, but $3.5k for a license on top of the $2k per developer for XE2 would give our accountant a heart attack...