Silverfrost Forums

Welcome to our forums

File Property Tags do not appear in Explorer Details Pop-Up

12 Oct 2014 1:32 #14805

I am using SRC and SLINK to produce PROG.EXE (a Win32 standalone application) but this fails to set the tags which I have placed in the PROG.RC file such as the Product Description, Copyright, etc. in the Properties > Details pop-up window under Windows Explorer although my program links okay.

My RC file is:

1 VERSIONINFO FILEVERSION 4,95,3,2014 PRODUCTVERSION 4,95,3,2014 FILEFLAGSMASK 0x0L FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK 'StringFileInfo' BEGIN BLOCK '040904b0' BEGIN VALUE 'Comments', 'My Program\000' VALUE 'CompanyName', 'XYZ Inc\000' VALUE 'FileDescription', 'Program Menu Module\000' VALUE 'FileVersion', '4,95,03,2014\000' VALUE 'InternalName', 'PROG.EXE\000' VALUE 'LegalCopyright', '(c)2014 XYZ Inc\000' VALUE 'OriginalFilename', 'PROG.EXE\000' VALUE 'ProductName', 'PROG.EXE\000' VALUE 'ProductVersion', '4,95,03,2014\000' END END BLOCK 'VarFileInfo' BEGIN VALUE 'Translation', 0x0409, 1200 END END

Is this perhaps a limitation of Win32 standalone applications or have I got the RC wrong somewhere for SRC (which I assumed uses exactly the same syntax as MS RC).

12 Oct 2014 6:45 #14806

I think that you should at least be able to see the version number. I suspect that the strings don't come through because they require UNICODE characters. This is a known SRC bug.

You might have the wrong BLOCK value. Here is the code for Plato...

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 4,6,4,0
 PRODUCTVERSION 4,6,4,0
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK 'StringFileInfo'
    BEGIN
        BLOCK '040904e4'
        BEGIN
            VALUE 'CompanyName', 'Silverfrost Ltd'
            VALUE 'FileDescription', 'Plato IDE'
            VALUE 'FileVersion', '4.6.4.0'
            VALUE 'InternalName', 'Plato.exe'
            VALUE 'LegalCopyright', '(c) Silverfrost Ltd.  All rights reserved.'
            VALUE 'OriginalFilename', 'Plato.exe'
            VALUE 'ProductName', 'Plato'
            VALUE 'ProductVersion', '4.6.4.0'
        END
    END
    BLOCK 'VarFileInfo'
    BEGIN
        VALUE 'Translation', 0x809, 1252
    END
END
15 Oct 2014 3:54 #14841

Go you just add this line to the .rc file? when i try it SRC complains about every line or am i missing something?

15 Oct 2014 6:40 #14842

You may need to define a value for VS_VERSION_INFO. Most of the keywords will be recognised by the compiler.

15 Oct 2014 8:15 #14849

Yes, the FILEVERSION etc is okay.

I take it there is no current way around the requirement for Unicode strings for the other program details. Can we expect an updated SRC version to fix this bug?

15 Oct 2014 8:29 #14850

It is on the list of bugs to fix.

16 Oct 2014 1:49 #14855

Quoted from PaulLaidler You may need to define a value for VS_VERSION_INFO. Most of the keywords will be recognised by the compiler.

I am not that familiar with resource file (.RC) How do you define VS_VERSION_INFO?

17 Oct 2014 2:51 #14864

The first line MUST be

1 VERSIONINFO

As per my example, no other value other than one is acceptable however way you write this line with a pre-defined variable.

19 Oct 2014 11:49 #14891

After a bit of experimenting i found the strings required terminating with '\0'

20 Oct 2014 10:02 #14900

Many thanks!

21 Oct 2014 11:08 #14907

I have experimented with this and I now think that (for SRC) you need to match a BLOCK value with the Translation value.

So

BLOCK '080904b0'

matches with

VALUE 'Translation', 0x0809, 0x04b0

This being the case, my sample above needs correcting.

Also, as pointed out by Steve, appending \0 to the strings appears to be necessary.

I have also fixed a bug in SRC (for the next release) and for me the bug fix is needed before I can get this to work.

This still does not work for 64 bit exes/dlls but I think that this is a Microsoft issue.

11 Nov 2014 4:01 #15036

Hi Paul,

please, could you post a complete example?

Do the strings work work with terminating '\0'?

Thanks, Detlef

11 Nov 2014 6:56 #15044

I can not get this to work without the bug fix mentioned above. So I don't think that this will work until after the next release...

VS_VERSION_INFO VERSIONINFO
FILEVERSION     0,0,0,0
PRODUCTVERSION  0,0,0,0
FILEFLAGSMASK   0x3fL
FILEFLAGS       0
FILEOS          VOS_NT_WINDOWS32
FILETYPE        VFT_DLL
FILESUBTYPE     0

BEGIN
  BLOCK 'StringFileInfo'
  BEGIN
    BLOCK '080904b0'
    BEGIN
      VALUE 'CompanyName', 'Silverfrost Ltd\\0'
      VALUE 'FileDescription', 'Fortran/C++ Library\\0'
      VALUE 'FileVersion', 'xxx\\0'
      VALUE 'LegalCopyright', 'Copyright (C) Silverfost Ltd\\0'
      VALUE 'ProductName', 'Silverfrost Library\\0'
      VALUE 'ProductVersion', 'xxx\\0'
    END

  END

  BLOCK 'VarFileInfo'
  BEGIN
    VALUE 'Translation', 0x0809, 0x04b0
  END
END
Please login to reply.