Click here to Skip to main content
15,907,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Ihave a project in vc++.For 32bit its name hello and in 64bit its name hellox64.But after build when I right click in the .exe and see property the project name comes hello for both platform.Now I want that for 32bit it should be hello and for 64bit it should be hellox64.Actually I have added a resource version file in project and give the project name there and this file is run for both the platform.So can I add 2 version file in one project or I have to do something other thing.



This my resource version file --------


C++
// Microsoft Visual C++ generated resource script.
//
#include "resource1.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE 
BEGIN
    "resource1.h\0"
END

2 TEXTINCLUDE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE 
BEGIN
    "\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 2,0,0,0
 PRODUCTVERSION 2,0,0,0
 FILEFLAGSMASK 0x17L
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x0L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
			VALUE "ProductName", "Hello"
            VALUE "FileVersion", "2, 0, 0, 0"
            VALUE "LegalCopyright", "\r\n\r\n\r\nCopyright."
            VALUE "ProductVersion", "2,0,0,0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

#endif    // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//


/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED



So how can I change "ProductName" according to platform.All the information would remain same expect ProductName.
Posted
Updated 1-Dec-11 15:04pm
v3
Comments
[no name] 1-Dec-11 21:05pm    
EDIT: added "code" tag

1 solution

Change the target name in your project properties. Spend some time looking through all the pages in the project properties (including the macro tables) to get familiar with the things you can change.
 
Share this answer
 
Comments
vikky08 1-Dec-11 7:05am    
Richard Pls look at the version file.
Richard MacCutchan 1-Dec-11 7:11am    
You would need to add an #ifdef set and define some variable outside of the file. Unfortunately I do not have a 64 bit compiler so I am not sure what variables are automatically set by the IDE, but a quick look in your properties should show you.
vikky08 2-Dec-11 4:32am    
#ifdef WIN64
#include "hellox64.rc"
#else
#include "hello.rc"
#endif

But its not working.
Richard MacCutchan 2-Dec-11 4:51am    
But its not working.
The most useless piece of information posted in a question!
Have you defined WIN64 to the rc compiler?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900