View previous topic :: View next topic |
Author |
Message |
aldavhu221
Joined: 13 Apr 2011 Posts: 13
|
Posted: Sun Oct 12, 2014 2:32 am Post subject: File Property Tags do not appear in Explorer Details Pop-Up |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Sun Oct 12, 2014 7:45 am Post subject: |
|
|
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 |
|
|
steveDoyle
Joined: 04 Sep 2009 Posts: 108 Location: Manchester
|
Posted: Wed Oct 15, 2014 4:54 pm Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Oct 15, 2014 7:40 pm Post subject: |
|
|
You may need to define a value for VS_VERSION_INFO.
Most of the keywords will be recognised by the compiler. |
|
Back to top |
|
|
aldavhu221
Joined: 13 Apr 2011 Posts: 13
|
Posted: Wed Oct 15, 2014 9:15 pm Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Oct 15, 2014 9:29 pm Post subject: |
|
|
It is on the list of bugs to fix. |
|
Back to top |
|
|
steveDoyle
Joined: 04 Sep 2009 Posts: 108 Location: Manchester
|
Posted: Thu Oct 16, 2014 2:49 pm Post subject: Re: |
|
|
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 |
|
|
aldavhu221
Joined: 13 Apr 2011 Posts: 13
|
Posted: Fri Oct 17, 2014 3:51 am Post subject: |
|
|
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 |
|
|
steveDoyle
Joined: 04 Sep 2009 Posts: 108 Location: Manchester
|
Posted: Sun Oct 19, 2014 12:49 pm Post subject: Re: |
|
|
After a bit of experimenting i found the strings required terminating with "\0" |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Oct 20, 2014 11:02 am Post subject: |
|
|
Many thanks! |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Oct 21, 2014 12:08 pm Post subject: |
|
|
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 |
|
|
dpannhorst
Joined: 29 Aug 2005 Posts: 165 Location: Berlin, Germany
|
Posted: Tue Nov 11, 2014 5:01 pm Post subject: |
|
|
Hi Paul,
please, could you post a complete example?
Do the strings work work with terminating "\0"?
Thanks, Detlef |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Nov 11, 2014 7:56 pm Post subject: |
|
|
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 |
|
|
|