Page 1 of 2

Properties of the generated .exe file

Posted: Sat Jun 07, 2014 4:45 pm
by vierirom
Hi to Everybody

A small problem ...

When I right-click the .exe file generated and click properties....
I have a tab with "details".
Inside that I can found a lot of informations like "version info", "product name", "Copyright" "Language" ... etc.
How can I set these values ?
I look for .rc files... but I was'nt able to obtain something.
Is it there somebody who knows how to ?

Thank you to all

Vieri

Re: Properties of the generated .exe file

Posted: Sat Jun 07, 2014 7:47 pm
by Carlos Britos
Hi
you have to add a rc file like this

Code: Select all

 
1 VERSIONINFO
       FILEVERSION 0,2,0,0
       PRODUCTVERSION 0,1,0,0
FILEOS 0x00000004
FILETYPE 0x00000001
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "040904b0"
    BEGIN
      VALUE "FileDescription", "bla bla bla\0"
      VALUE "FileVersion", "0,2,0,0 \0"
      VALUE "InternalName", "dsfgsdfgsdfgsdfgsdg\0"
      VALUE "LegalCopyright", "your name\0"
      VALUE "LegalTrademarks", "mi trade mark\0"
      VALUE "OriginalFilename", "\0"
      VALUE "CompanyName", "my company\0"
      VALUE "ProductName", "\0"
      VALUE "ProductVersion", "0,1,0,0\0"
      VALUE "Comments", "xxxxx@yahoo.com\0"
    END
  END
  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x0409 0x04B0
  END
END


Re: Properties of the generated .exe file

Posted: Mon Jun 09, 2014 12:26 pm
by serge_girard
Carlos,

This gives compile errors when I add it to my existing RC file.

The error says:
_temp.rc:3:0: fatal error: when writing output to : Invalid argument
compilation terminated.
windres: _temp.rc:71: syntax error
windres: preprocessing failed.

Any idea what's wrong?


Greetings, Serge

Re: Properties of the generated .exe file

Posted: Mon Jun 09, 2014 1:08 pm
by Rathinagiri
For me, the following lines in the rc file doesn't give any error. But no details is shown. :(

Code: Select all


VS_VERSION_INFO VERSIONINFO
 FILEVERSION    0,0,0,2
 PRODUCTVERSION 0,0,0,2
 FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
 FILEFLAGS 0x1L
 #else
 FILEFLAGS 0x0L
 #endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
{
BLOCK "StringFileInfo"
    { 
        BLOCK "080904b0"
        {
            VALUE "Comments",         "comment"
            VALUE "CompanyName",      "comment"
            VALUE "FileDescription",  "base file"
            VALUE "FileVersion",      "0.0.0.2 TP"
            VALUE "InternalName",     "testTP"
            VALUE "LegalCopyright",   "none"
            VALUE "OriginalFilename", "test.exe"
            VALUE "ProductName",      "test"
            VALUE "ProductVersion",   "0.0.0.2 TP"         
        }
    }
}


Properties of the generated .exe file

Posted: Mon Jun 09, 2014 1:37 pm
by Pablo César
In this HMG Wishlist message Grigory says "problem with MinGW resource manager".

Is indicating to use ResHaker utility to edit VERSIONINFO. :(

Re: Properties of the generated .exe file

Posted: Mon Jun 09, 2014 1:48 pm
by serge_girard
Thanks all !

I will wait for the HMG Wishlist to be executed.

Greetings, Serge

Properties of the generated .exe file

Posted: Mon Jun 09, 2014 2:16 pm
by Pablo César
I have got good result with this:

Code: Select all

1 VERSIONINFO
FILEVERSION     1,0,0,0
PRODUCTVERSION  1,0,0,0
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "080904E4"
    BEGIN
      VALUE "Comments", "Compiled with HMG / UNICODE"
      VALUE "CompanyName", "My Company Name"
      VALUE "FileDescription", "My excellent application"
      VALUE "FileVersion", "1.0"
      VALUE "InternalName", "my_app"
      VALUE "LegalCopyright", "My Name"
      VALUE "OriginalFilename", "my_app.exe"
      VALUE "ProductName", "My App"
      VALUE "ProductVersion", "1.0"
    END
  END

  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x809, 1252
  END
END
I attached a demo for you testing.

For further details (language.. etc), please read these:

WindRes for MinGW

MSDN definitions

Re: Properties of the generated .exe file

Posted: Mon Jun 09, 2014 2:21 pm
by Rathinagiri
Awesome find Pablo.

Thanks! It is working like a charm.

Properties of the generated .exe file

Posted: Mon Jun 09, 2014 2:31 pm
by Pablo César
Rathinagiri wrote:Awesome find Pablo.

Thanks! It is working like a charm.
You are welcome my friend !

What about your answer about this message Rathinagiri ?

Re: Properties of the generated .exe file

Posted: Mon Jun 09, 2014 2:35 pm
by serge_girard
Great ! This works fine, thank you all !

Serge