Version tab for Win32 exe

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Sirius
Earned a small fee
Earned a small fee
Posts: 15
Joined: Tue Sep 07, 2004 3:18 am
Contact:

Version tab for Win32 exe

Post by Sirius » Wed Dec 22, 2004 7:50 am

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

User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Re: Version tab for Win32 exe

Post by ABX » Wed Dec 22, 2004 8:37 am

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
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2

Sirius
Earned a small fee
Earned a small fee
Posts: 15
Joined: Tue Sep 07, 2004 3:18 am
Contact:

Post by Sirius » Wed Dec 22, 2004 9:57 am

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

Post Reply