Click here to Skip to main content
15,922,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VC6 Project dependencies and project configurations *solved* Pin
Diarrhio25-Feb-04 10:59
Diarrhio25-Feb-04 10:59 
GeneralMFC SDI FormView - need multi-edit views Pin
braddenn24-Feb-04 11:55
braddenn24-Feb-04 11:55 
GeneralRe: MFC SDI FormView - need multi-edit views Pin
CodeBrain25-Feb-04 2:04
CodeBrain25-Feb-04 2:04 
GeneralDistinguish btwn click within and more than one second Pin
vancouver77724-Feb-04 11:08
vancouver77724-Feb-04 11:08 
GeneralRe: Distinguish btwn click within and more than one second Pin
PJ Arends24-Feb-04 14:43
professionalPJ Arends24-Feb-04 14:43 
Generalcontrol containers.. Pin
Kagehi24-Feb-04 10:33
Kagehi24-Feb-04 10:33 
GeneralRe: control containers.. Pin
Kagehi25-Feb-04 7:14
Kagehi25-Feb-04 7:14 
QuestionReferencing an external version resource? Pin
Ravi Bhavnani24-Feb-04 9:22
professionalRavi Bhavnani24-Feb-04 9:22 
We have a suite of apps (GUI, console, server, on Win and Unix) that constitute a release. Our xplatform build script gets the current version number (eg: "4.1.0") from an env var, and creates a text file (eg: CurrVersion.h) in its pre-build step, that has a few #defines a la:
#define CurrentVersionMajor 4
#define CurrentVersionMinor 1
#define CurrentVersionPatch 0
The Unix apps just use these #defines and bake the version info into themselves. CurrVersion.h is not stored in CVS - it's generated at build time and deleted when the build cleans up. This scheme does away with having every developer remember to change their app's version info before releasing.

I'm trying to do the same thing for Windows and have run into a problem.

Generating a Windows version resource in a pre-build step is easy, but having it referenced by a Windows app's .rc file at compile time isn't. It seems that that the version info needs to be *in* the app's .rc file (and can't be just referenced from another location, or be present in an rc2). Also, #including another file from the app's .rc file isn't foolproof, since MSDEV regens the .rc when you add/modify/delete resources, overwriting your #include statement.

Any ideas?

Notes:
  1. I don't want my prebuild step to directly hack the .rc file (by inserting the generated version resource), because the .rc is under version control and should only be edited by a developer.

  2. I could muck with the resource info in the .exe in a post- build step, but I prefer to have a human-readable source code solution.

  3. I've already read the version-related articles at CP. Smile | :)
Thanks,

/ravi

My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com

AnswerRe: Referencing an external version resource? Pin
David Crow24-Feb-04 9:39
David Crow24-Feb-04 9:39 
GeneralRe: Referencing an external version resource? Pin
Ravi Bhavnani24-Feb-04 9:45
professionalRavi Bhavnani24-Feb-04 9:45 
GeneralRe: Referencing an external version resource? Pin
David Crow24-Feb-04 9:56
David Crow24-Feb-04 9:56 
GeneralRe: Referencing an external version resource? Pin
Ravi Bhavnani24-Feb-04 11:09
professionalRavi Bhavnani24-Feb-04 11:09 
GeneralRe: Referencing an external version resource? Pin
David Crow24-Feb-04 15:43
David Crow24-Feb-04 15:43 
GeneralRe: Referencing an external version resource? Pin
Ravi Bhavnani25-Feb-04 5:40
professionalRavi Bhavnani25-Feb-04 5:40 
GeneralRe: Referencing an external version resource? Pin
Prakash Nadar24-Feb-04 14:04
Prakash Nadar24-Feb-04 14:04 
GeneralRe: Referencing an external version resource? Pin
Ravi Bhavnani25-Feb-04 5:36
professionalRavi Bhavnani25-Feb-04 5:36 
AnswerRe: Referencing an external version resource? Pin
Michael Dunn24-Feb-04 15:43
sitebuilderMichael Dunn24-Feb-04 15:43 
GeneralRe: Referencing an external version resource? Pin
Ravi Bhavnani25-Feb-04 5:39
professionalRavi Bhavnani25-Feb-04 5:39 
GeneralSockets Pin
Anonymous24-Feb-04 6:49
Anonymous24-Feb-04 6:49 
GeneralRe: Sockets Pin
Prakash Nadar24-Feb-04 14:00
Prakash Nadar24-Feb-04 14:00 
QuestionSingle-instance executable??? Pin
DanYELL24-Feb-04 6:37
DanYELL24-Feb-04 6:37 
AnswerRe: Single-instance executable??? Pin
David Crow24-Feb-04 6:51
David Crow24-Feb-04 6:51 
AnswerRe: Single-instance executable??? Pin
john.angel24-Feb-04 9:47
john.angel24-Feb-04 9:47 
GeneralReading Bitmaps from Clipboard Pin
siegfried_heintze24-Feb-04 6:28
siegfried_heintze24-Feb-04 6:28 
GeneralRe: Reading Bitmaps from Clipboard Pin
David Crow24-Feb-04 8:51
David Crow24-Feb-04 8:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.