Page 1 of 1

Version tab for Win32 exe

Posted: Wed Dec 22, 2004 7:50 am
by Sirius
Hello,

I would like to include the version tab for my wxMSW application. After some reading online and my previous project (which build with MFC/WTL) I addon this portion of text into my rc file.

The version tab didn't appear when I compile it with VC 6. But it did appear if I compile it with BC++ 5.5. Anyone have experience to add version tab to Win32 exe?

Code: Select all

#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,2
 PRODUCTVERSION 1,0,0,2
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x2L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Author", "myname <[email protected]>\0"
            VALUE "Comments", "myExe\nwxWidgets version.\0"
            VALUE "CompanyName", "myComp\0"
            VALUE "FileDescription", "Utility\0"
            VALUE "FileVersion", "1,0,0,2\0"
            VALUE "InternalName", "myExe\0"
            VALUE "LegalCopyright", "Copyright 2004\0"
            VALUE "OriginalFilename", "myExe.exe\0"
            VALUE "ProductName", "myExe with wxWidgets\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

#endif    // !_MAC

wxMSW 2.5.2, WinXP
VC 6, BC 5.5


-----------
Thank you

Re: Version tab for Win32 exe

Posted: Wed Dec 22, 2004 8:37 am
by ABX
Sirius wrote:The version tab didn't appear when I compile it with VC 6. But it did appear if I compile it with BC++ 5.5. Anyone have experience to add version tab to Win32 exe?
From the syntax do I understand correctly that it is for RC file? If so, did you tried to add something like

Code: Select all

<win32-res>yourversion.rc</win32-res>
to your bkl file if you use bakefile driven development?

ABX

Posted: Wed Dec 22, 2004 9:57 am
by Sirius
ABX,

Thank you for reply, inside my RC file i include an icon and manifest, and they appear correctly in both VC and BCC, just version tab is gone with VC++ :(

my RC file:

Code: Select all

wxMSW ICON "wxMSW.ico"

//////////////////////////////////////////////////////////////////////////////
//
// Manifest file for Windows XP
//
#if !defined(__WIN64__)
#if !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0)
1 24 "wx/msw/wx.manifest"
#endif
#endif

#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,2
 PRODUCTVERSION 1,0,0,2
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x2L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Author", "myname <[email protected]>\0"
            VALUE "Comments", "myExe\nwxWidgets version.\0"
            VALUE "CompanyName", "myComp\0"
            VALUE "FileDescription", "Utility\0"
            VALUE "FileVersion", "1,0,0,2\0"
            VALUE "InternalName", "myExe\0"
            VALUE "LegalCopyright", "Copyright 2004\0"
            VALUE "OriginalFilename", "myExe.exe\0"
            VALUE "ProductName", "myExe with wxWidgets\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

#endif    // !_MAC


In case it is needed, portion of my makefile.vc

Code: Select all

Release\myEXE.res:	myEXE.rc
	rc.exe /[email protected] $(CPPFLAGS) $(RESPATH) $**

----------------
Thank you