forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
aldavhu221



Joined: 13 Apr 2011
Posts: 13

PostPosted: Sun Oct 12, 2014 2:32 am    Post subject: File Property Tags do not appear in Explorer Details Pop-Up Reply with quote

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).
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Sun Oct 12, 2014 7:45 am    Post subject: Reply with quote

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...

Code:
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
Back to top
View user's profile Send private message AIM Address
steveDoyle



Joined: 04 Sep 2009
Posts: 108
Location: Manchester

PostPosted: Wed Oct 15, 2014 4:54 pm    Post subject: Reply with quote

Go you just add this line to the .rc file? when i try it SRC complains about every line or am i missing something?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Wed Oct 15, 2014 7:40 pm    Post subject: Reply with quote

You may need to define a value for VS_VERSION_INFO.
Most of the keywords will be recognised by the compiler.
Back to top
View user's profile Send private message AIM Address
aldavhu221



Joined: 13 Apr 2011
Posts: 13

PostPosted: Wed Oct 15, 2014 9:15 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Wed Oct 15, 2014 9:29 pm    Post subject: Reply with quote

It is on the list of bugs to fix.
Back to top
View user's profile Send private message AIM Address
steveDoyle



Joined: 04 Sep 2009
Posts: 108
Location: Manchester

PostPosted: Thu Oct 16, 2014 2:49 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
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?
Back to top
View user's profile Send private message
aldavhu221



Joined: 13 Apr 2011
Posts: 13

PostPosted: Fri Oct 17, 2014 3:51 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
steveDoyle



Joined: 04 Sep 2009
Posts: 108
Location: Manchester

PostPosted: Sun Oct 19, 2014 12:49 pm    Post subject: Re: Reply with quote

After a bit of experimenting i found the strings required terminating with "\0"
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Mon Oct 20, 2014 11:02 am    Post subject: Reply with quote

Many thanks!
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Tue Oct 21, 2014 12:08 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
dpannhorst



Joined: 29 Aug 2005
Posts: 165
Location: Berlin, Germany

PostPosted: Tue Nov 11, 2014 5:01 pm    Post subject: Reply with quote

Hi Paul,

please, could you post a complete example?

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

Thanks, Detlef
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Tue Nov 11, 2014 7:56 pm    Post subject: Reply with quote

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...

Code:
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
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group