.Res file over written after setting OnSetVersionNumbers

Hello team,

 FinalBuilder and Final BuilderServer 6, OS Windows 7, Delphi 2010.

I have noted that my application program icon has gone "missing."  I suspect it is because the application res file (which contains various icons including the MAINICON, and other resources) is being replaced when compiling the application, as I "guess" I am setting the "BuildVersion" at the time.  Instead of simply adding the Build Version to the existing file, the entire res file is replaced with no consideration the current res file contents.

I am attempting to set a build number when compiling the application.  I only wish to add a build number when creating an installation build.  All other times I do not care what the build number is.  The major, minor and patch numbers are read directly from the Delphi project file.  The build number is a text file which is stored in our source control repository and is updated as required in the FB project.

I have a "OnSetVersionNumbers" script action on the Compile Delphi Project action.  The script contents will only update the "BuildVersion" variable if the BUILDTYPE variable (FB Project Variable)  is equal to "INSTALL" (FB Server Variable).  However, I think as there is a script in the "OnSetVersionNumbers" tab, the res file is compiled and over writes the existing file.

Is this a FB bug or am I taking the incorrect approach to setting the build number?

Thanks in advance,

Mark

Hi Mark

In delphi apps, the version information and the icon are in the same file, so in order to generate version information during a build we need to recompile the resource file. You can specify the ICON in the action settings. If you don’t want to regenerate the resource file then you will have to find another way to update the version information.

You can enable/disable the resource generation via script and a project variable, for example :

Action.RegenerateResource = FBVariables.REGENRESOURCE

where REGENRESOURCE is your Project variable with a boolean value.

Hello Vincent

Thank you for your response and suggestion. Unfortunately neither option is suitable for us. I think we have an alternate plan. Will let you know how we get along.

I would have been useful if FB could append information to the res file as opposed to just over writing it.

Thanks
Mark