How to manage version information on Delphi XE2 across platforms
Asked Answered
K

5

11

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.

Kain answered 8/11, 2011 at 10:5 Comment(2)
Managing these settings in the IDE is simply a nightmare. I do it with a pre-build script. You could consider option sets too since they help control the extreme complexity of project option settings.Aphis
FWIW I've subsequently found that this DPROJ nightmare results in remote debugging not working for me. The solution is to delete the DPROJ and open the DPR, going through and filling in the project details again. Then, remote debugging works.Kain
E
9

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.

Eldoria answered 28/3, 2012 at 23:14 Comment(0)
E
2

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...

Evetteevey answered 9/11, 2011 at 16:58 Comment(1)
I am using version 16.0.4504.48759 and problem is not fixed :-(.Gouveia
G
2

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>
Gemagemara answered 13/1, 2012 at 15:21 Comment(1)
why EMB is not fixing it?! I'm on XE3 and still have the problem.Glucoside
L
1

"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...

Lhasa answered 10/2, 2012 at 16:28 Comment(1)
Yes, I agree. I need to recreate my DPROJ files really, because in another long debugging session I discovered that DPROJ's that have been through several IDE's will not remote debug.Kain
S
0

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).

Serene answered 26/4, 2012 at 13:44 Comment(2)
Interesting. Can this be made available please?Kain
Shameless plug for observations and a tool of my own: delphi-divining.blogspot.co.ukKain

© 2022 - 2024 — McMap. All rights reserved.