I use a RC (resource) file to get version information linked into the EXE file, and recently I switched from Borland Resource Compiler to Windows SDK Resource Compiler, in order to be able to use multiple sizes icons in my application.
The icon worked, but now when I compile my application the resource information seems to not be attached to the EXE file. I'm suspecting that the same RC file that works for BRCC32.EXE does not work for the Windows SDK Resource Compiler.
Here is my verinfo.rc
content:
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "Company Soft\0"
VALUE "CompanyName", "Company2\0"
VALUE "FileDescription", "Company Soft\0"
VALUE "FileVersion", "x.x.x.x\0"
VALUE "InternalName", "Company Soft\0"
VALUE "LegalCopyright", "Company2\0"
VALUE "OriginalFilename", "abrev.exe\0"
VALUE "ProductName", "Company Soft\0"
VALUE "ProductVersion", "x.x.x.x\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409,1200
END
END
And here is how my EXE file shows in Explorer's file properties:
Finally, I'm not forgetting to use the verinfo.rc
file in my Delphi project file:
program myprogram;
{$R 'verinfo.res' 'verinfo.rc'}
Update #1
If I change the resource compiler back from Windows SDK Compiler to Borland Resource Compiler the version information is included into the EXE file (but I cannot use multiple sizes icons anymore):
Update #2
Update #3
Here is what I found what happens when using the same RC file but with different resource compilers:
When using Borland Resource Compiler everything works fine, with the version info shown in Windows Explorer; Resource Hacker shows this:
When using Windows SDK Resource Compiler version information still shows in Resource Hacker but not in Windows Explorer:
CodePudding user response:
Version resource in DLL not visible with right-click fixed the issue: Basically I changed the first line of my .rc
file from
VS_VERSION_INFO VERSIONINFO
to
1 VERSIONINFO
Now everything works!