Anyway to do this easily using the same .rc file? I couldnt figure how to
use the condition property of the VERSION. I did this years ago, but forgot.
I tried defining a condition parameter, then adding it to the Preprocessor
definitions in the configurations, but both executables always had the same
version.
Any ideas? TIA
-C
Check out the #if family of pre-processor directives.
--
Remove del for email
Regards,
Mansih Agarwal
"Barry Schwarz" <schw...@dqel.com> wrote in message
news:5o0sb4p1jbi7fbu4r...@4ax.com...
Manish:
You can get over this difficulty by moving the version resource to the .rc2
file, and putting your #if clause there.
To the OP:
You have started a thread on this topic in three different microsoft newsgroups.
This "multi-posting" is very poor newsgroup etiquette, and is very
counter-productive, because it fragments the discussion. If you feel that you
must target different groups, then you should "cross-post" not "multi-post". But
really the best thing to do is try to pick the most suitable group and just post
there; in this case the correct group would have been "microsoft.public.vc.mfc".
--
David Wilkinson
Visual C++ MVP
As far as 'multi-posting', I didnt see any 'rules' about how/when to post
questions. I use IE to read/post and I didnt see a cross-post option. I
would've never thought to put this in vc.mfc because its not an mfc question
(or I wouldnt think it was). Also some groups are viewed more often than
others. Also, who knows whats a visual studio question vs a vc++ question.
But regardless, my goal is to get my question answered versus annoying anyone.
TIA
-C
Charles:
Is this not an MFC application? While some kind of conditionals can be achieved
via the IDE, I have always found it much easier (and more robust) to do these
things in the .rc2 file.
There may not be an option to cross-post in the web interface. But if you want
to use these newsgroups, you will find it much better to do it via a newsreader.
It's a bit of a hassle to set up the first time, but after that it is trivial to
add new groups, and the process of asking and answering questions is much much
more efficient. And you can participate in many groups on many different servers
right in the same application.
No matter what, multi-posting is just not a good idea. It is very annoying for
the people who read these groups (and try to answer questions), and it is not
helpful for the original poster because the discussion is fragmented into
different threads that are not aware of each other.
When I open the .rc file I see the
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
If I add another version string, I get:
IDR_VERSION2 VERSIONINFO
FILEVERSION 2,0,0,1
I want to use VS_VERSION_INFO for the vs60 build and IDR_VERSION2 for the
vs2008 build. What do I added to the .rc2 file?
Sorry, I’m just not familiar w/ this stuff. If there's other info I can
read for this, just point me in the directions.
-C
"David Wilkinson" <no-r...@effisols.com> wrote in message
news:ORaLJxcD...@TK2MSFTNGP05.phx.gbl...
Charles:
You do not want two different version info's, you want different versions of the
same version info.
Open resource view, right-click the version resource and select "Insert copy".
In the resulting dialog type a condition like VS2008. Now if the symbol VS2008
is defined in your VS2008 project settings your new version info will be used.
The .rc2 file must be edited by hand as a text file. I actually leave the
version info in the .rc file, but I have a conditional section in the .rc2 file
where I change some other things.
Regards,
Manish Agarwal
"David Wilkinson" <no-r...@effisols.com> wrote in message
news:%23bo0zja...@TK2MSFTNGP04.phx.gbl...
I added the BRIDGE_900 condition to my preprocessor definitions in the
project settings.
When I build it w/ the preprocessor BRIDGE_900 condition, I still get
v6.0.0.0 instead of v8.0.0.0. If I remove the preprocessor definition from
my project settings, its builds with no version info at all.
In the .rc file:
#if defined(APSTUDIO_INVOKED) || defined(BRIDGE_900)
#if defined(APSTUDIO_INVOKED)
VS_VERSION_INFO$(BRIDGE_900) VERSIONINFO
#else
VS_VERSION_INFO VERSIONINFO
#endif
FILEVERSION 8,0,0,0
...
...
#if defined(APSTUDIO_INVOKED) || !defined(BRIDGE_900)
VS_VERSION_INFO VERSIONINFO
FILEVERSION 6,0,0,0
It feels like I'm missing something really simple.
I don’t know what if anything would go into the .rc2 file. I don’t know the
format of what to put in there.
The goal is to use the same source code for VS2008 and vs60, using the same
.rc file if possible. We want a way to make sure versions aren't mixed up
and a simple method is if the two resultant DLLs have different versions,
but we don’t want to have a manually edit this field every time we build.
Any ideas?
"David Wilkinson" <no-r...@effisols.com> wrote in message
news:O7DfmidD...@TK2MSFTNGP05.phx.gbl...
Charles:
I don't know why this does not work, because this is essentially the same as I
have (though my project that does this is still in VC6).
One thought: You did change both the FileVersion and ProductVersion, didn't you?
I recall that in VC6 these are kept in sync by the resource editor, but not in
later IDE's.
If you want to go the .rc2 route, use a text editor to remove the Version
section from the .rc file and put it in the .rc2 file. Then you can use your own
#ifdef's without fear of them being overwritten by the resource editor.