Property Set items missing

We have used a property set for a long time. The four version number items and the full fileversion string are loaded from an INI file to separate variables and then assigned to the property set in a PropertySet Assign action, along with other ‘constant’ project variables assigned to values such as CompanyName and LegalTrademarks. The compile actions are set to update the Delphi project file from the version info.

I have recently noticed that only the file version numbers are being processed from the property set as expected. The company name and trademarks do not appear in the EXE/DLL Windows property/details, nor in the Delphi IDE, and the Product Version shows in both places with whatever value appeared before in the IDE.

Luckily, we have a script called from the compile actions which constructs (from a year variable) the Copyright string for each Delphi project. If I also add the literal values for CompanyName, ProductVersion, and LegalTrademarks to the property set using this script, they appear correctly in the EXE/DLL details (but are not updated in the IDE). Is it a bug that assigning from %TMstring% to the property set value LegalTrademarks has no effect, whereas assignments from for example %buildversion% to FileVersionString work as expected?

Hi Tim

Are you able to send your project file to support @ finalbuilder.com ? That way I can see exactly what you are doing and try to replicated it here. There are many ways to mess with version info so it’s difficult to know what is happening without seeing the settings etc.

Also, I have found that windows 10 does not always show all the version info. If you look at the exe with something like Resource Hacker you should be able to confirm exactly what is ending up in the exe.

It’s a big and complex project, and I have a workaround using the scripting, but I will try later today to extract the compile action into a smaller project and send it to you. The properties are definitely not in the exe.

I also had a few problems with some special cases, and I didn’t want to set the versions for every project.

Now we create our own verion resource,
compile the RC to RES and include this into alle our compilates.
The version information in the projects are disabled.
One resource for many DLL and BPL.
The information also comes from an INI and can be edited via a dialog in FinalBuilder.

“Create Text File” for the RC with replacing the variables
and several “Embarcadero Resource Compiler” to create different versions for BPL, DLL, EXE and Service-EXE.

In the same way, different resources are generated with the manifest file, with and without administrator, as well as for the service application.

#define VS_FFI_FILEFLAGSMASK 0x3FL
#define VS_FF_SPECIALBUILD 0x20L
#define VS_FF_PRERELEASE 0x02L
#define VOS__WINDOWS32 0x4L
#define VFT_APP 0x1L
#define VFT_DLL 0x2L

1 VERSIONINFO
  FILEVERSION %VersionRC%
  PRODUCTVERSION %VersionRC%
  FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
  FILEFLAGS %Flags%
  FILEOS VOS__WINDOWS32
  #ifdef _DLL
    FILETYPE VFT_DLL
  #else
    FILETYPE VFT_APP
  #endif
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904E4"
        BEGIN
            VALUE "CompanyName", "Firma GmbH\0"
            VALUE "LegalCopyright", "Firma GmbH\0"
            VALUE "LegalTrademarks", "\0"
            VALUE "ProductName", "My Application\0"
            VALUE "ProductVersion", "%VersionNum%\0"
            VALUE "FileDescription", "My Application .....\0"
            VALUE "FileVersion", "%VersionNum%\0"
            VALUE "InternalName", "MYAPP\0"
            #ifdef _DLL
              VALUE "OriginalFilename", "\0"
            #else
              #ifdef _SRV
                VALUE "OriginalFilename", "Server.exe\0"
              #else
                VALUE "OriginalFilename", "Application.exe\0"
              #endif
            #endif
            VALUE "SpecialBuild", "%GitBranch%\0"
            VALUE "Comments", "%GitVersion%\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x0409, 1252
    END
END

The thing with version info and delphi, there are so many ways to do things and everyone has different needs - we tried to cover as many options as possible, but there will always be scenarios we can’t think of or are not able to accommodate “out of the box” - fortunately FinalBuilder has a bunch of other functionality that allows users to be creative :wink:

Yes, therefore as an example of a solution that can be freely adapted to your own needs.

There are also command line tools that can be used to edit the Delphi version information in the * .RES,
but personally I found it easier to generate the resources myself using a readable RC file.

IncVerRC, ChangeRes -> https://stackoverflow.com/questions/3802325/delphi-res-file-changer
https://indrayn.com/auto-increment-version-information-pre-build-tool-delphi-xe2-verinfo/
https://jasontpenny.com/blog/2009/05/08/program-to-set-delphi-resource-version-info-from-commandline/

and :nerd_face:
https://www.finalbuilder.com/resources/blogs/managing-delphi-version-info-with-finalbuilder