This is my version.rc
:
#define VER_FILEVERSION 1,2,3,4
#define VER_FILEVERSION_STR "1.02.03.04\0"
1 VERSIONINFO
FILEVERSION VER_FILEVERSION
PRODUCTVERSION VER_FILEVERSION
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", VER_FILEVERSION_STR
VALUE "FileDescription", VER_FILEVERSION_STR
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", VER_FILEVERSION_STR
VALUE "LegalCopyright", VER_FILEVERSION_STR
VALUE "LegalTrademarks1", VER_FILEVERSION_STR
VALUE "LegalTrademarks2", VER_FILEVERSION_STR
VALUE "OriginalFilename", VER_FILEVERSION_STR
VALUE "ProductName", VER_FILEVERSION_STR
VALUE "ProductVersion", VER_FILEVERSION_STR
END
END
END
My program starts like this:
program TestProgram;
{$R 'version.res' 'version.rc'}
But the string info I set isn't in the executable:
The config I'm using has the "include version information in project" off, since I'm including it in the .RC file instead. What am I doing wrong ?
Note that if I open the .EXE as text and look for CompanyName
, I do find it and the next char is NUL, then another seemingly random char then the next string info header.