0

My requirement is to generate the version information via VersionInfo.rc file so have used the following file given below.

Reference link : https://helloacm.com/how-to-store-file-information-version-in-resource-file-for-delphi-projects/

1 VERSIONINFO
FILEVERSION 8,5,7,2
PRODUCTVERSION 8,5,7
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
  FILEFLAGS 0x1L
#else
  FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
   BLOCK "StringFileInfo"
   BEGIN
      BLOCK "040904B0"
      BEGIN
         VALUE "CompanyName", "Yug"
         VALUE "FileDescription", "Yug Infotech"
         VALUE "FileVersion", "4.5.7.3"
         VALUE "InternalName", "Yug"
         VALUE "LegalCopyright", "Yug © 2000-2022"  
         VALUE "LegalTrademarks", "Yug"
         VALUE "OriginalFilename", "YugInfotech.exe"
         VALUE "ProductName", "Yug Infotech" 
         VALUE "ProductVersion", "4.5.7.3"   
      END
   END
   BLOCK "VarFileInfo"
   BEGIN
      VALUE "Translation", 0x0409, 0x04B0
   END
END

Once the project is compiled I am seeing extra/wrong information being added to each values. eg: File Description expected was "Yug Infotech" but seeing extra information as shared in the screenshot. any help really appreciated. I doubt is this something to do with the code block or the hexadecimal values?

enter image description here

mano
  • 308
  • 3
  • 19
  • 1
    Duplicate of [Compiled VS\_VERSION\_INFO resource displays in Explorer unexpected texts](https://stackoverflow.com/questions/69485477/compiled-vs-version-info-resource-displays-in-explorer-unexpected-texts): you must end your literals with a `\0`. – AmigoJack Aug 01 '22 at 11:16
  • @AmigoJack thank you for that however what about the symbol © i still dont get this working – mano Aug 01 '22 at 12:55
  • @AmigoJack Alternative i can see is use something like "Copyright (c) Microsoft Corporation", still if you have any inputs please share – mano Aug 01 '22 at 13:01
  • 1
    Do not save your .RC file in a UTF-8 encoding. [Use either ANSI or UTF-16](https://social.msdn.microsoft.com/Forums/en-US/e212069d-678e-4ac8-957f-7d60d3e1c89f/resource-files-encoded-as-utf8-do-not-compile?forum=vcgeneral) (because it will end up as UTF-16LE in your .EXE anyway). – AmigoJack Aug 01 '22 at 14:14

0 Answers0