Setting version info for Delphi project fails

Hi,

I am setting all the version info stuff for the Delphi compile action in script code. After updating to the latest build I started getting errors from the resource compiler.

The problem is related to how FB is generating the .RC file. The behaviour has changed in the latest build.

In my code I set the ProductVersion like this: 

Action.SetVersionInfoKey "ProductVersion", "8.0.1 (INTERNAL)"

Before the update this generated a RC file like this (abbreviated)

...
FILEVERSION 8,0,1,468
PRODUCTVERSION 8,0,1,468
...
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
         BLOCK "040904E4"
         BEGIN
...
              VALUE "ProductVersion", "8.0.1 (INTERNAL)\0"
...
 

Now after the update the generated RC file looks like this

PRODUCTVERSION 8.0.1 (INTERNAL)

It looks like a call to SetVersionInfoKey sets both the ProductVersion string value as well as the numeric PRODUCTVERSION value.

In previous versions I think you must have just set PRODUCTVERSION to the same value as FILEVERSION and this works fine as they are both required to have the same format. However in the StringFileInfo ProductVersion is just a string that you are supposed to be able to set to "anything you like" :-))

Am I guessing correctly?

br Lars

Sigh

This seems to be a byproduct of another bugfix. There are so many way’s that users want to work with version info, we seem to have tied ourselves in knots catering for every user’s preference.

I was able to work around this one by turning on the “Link ProductVersion to FileVersion” and turning off the “Auto-update ProductVersion string” options.

He he. I can imagine that it is quite difficult to maintain given all the options we users have. And I also know that if you take away any of them this will get you into trouble as well :-)

Maybe the next version of Delphi with support for 64x and maybe also multiple platforms will give you a good excuse to deprecate the current Delphi action and make a new one that only applies to the new Delphi version and those that come after that one......

Anyway, I am a happy camper provided the work-around you describe works :-)

I have quite a lot of Delphi actions that need to be updated so I am wondering if these options can be set in script? I.e. like Action.IncludeVerInfo = true. What would the names be?

P.S. I seem to recal that there was some smart way you could find out about the script names for the options for amost all actions, but I can't remember how. Or am I mistaken?

br Lars

 

Hi Lars

Well of course when I tested this work around I found an issue with it (the “Auto-update ProductVersion string” was not persisting when not using a property set, and was not exposed to script) . This build includes the fix :

https://www.finalbuilder.com/downloads/finalbuilder/aex6/FB700_939.exe

To find out the option names from script, just type Action. and the code completion will show the properties available.

As for starting fresh with Delphi x64, we may well do that as there is a lot of baggage from 10 versions of delphi and all their various issues and changes.



Hi,

 

Thanks for the prompt delivery of a new build .

However after updating our TFS build agent (and restarting it) I now get the following error:

------
FinalBuilder project failed with error code 99. Please see the build log for details.

FinalBuilder Output
Exception encountered when running FinalBuilder: StandardError has not been redirected.
    at System.Diagnostics.Process.get_StandardError()
    at VSoftTechnologies.FinalBuilder.FBCmd.Execute()
    at VSoftTechnologies.FinalBuilder.TFS.Workflow.RunFinalBuilder.Execute(CodeActivityContext context)
-------
 

Before the update everything related to TFS ran fine. Nothing else has changed... Please advice.

br  Lars

For extra info I just reverted back to build 898 and now the TFS stuff is working again.

br Lars

Oops, sorry Lars, that’s my fault! The fix is checked in - I’ll send you a link once the build has completed.

Ben

Hi,

You guys are fast I must say!

br Lars

We try :slight_smile:

Here’s a link to the build, which should have both Vincent’s fix and a fix for my TFS bug: https://www.finalbuilder.com/downloads/finalbuilder/aex6/FB700_940.exe

Please let me know if you run into any issues.

Ben

Hi,

Everything works fine now. Thanks for the great support

br Lars