![]() |
Languages »
C / C++ Language »
Utilities
Intermediate
Versioning of executables at build timeBy srinivas vaithianathanA useful tool to incorporate version info during build time |
VC6, VC7Win2K, WinXP, MFC, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||

While building a project, it is sometimes necessary to include the version information. It would be great if this can be implemented as a step in the build process. Here I have provided a tool to prompt the user when a build is done for all the relevant version information and then write this to the project's resource file.
The application is dialog based MFC application. On inputting the value for the projects resource file, the version info is read and displayed. One can modify these values and write it back to the resource file. To include this in your build process in MSDEV, perform the following steps
$(ProjDir)\{your tools directory}\rcversion.exe $(InputPath) rc /l
0x409 /fo"$(OutDir)/$(InputName).res" /d "_DEBUG" /d "_AFXDLL" $(InputPath)
where {your tools directory} is where you have copied the rcversion.exe
The source code is self-explanatory. Basically, the resource file is read, parsed for the version info and replaced with the new values. One can also pass in command line parameter for the input resource file name in case you would want to use this tool in a standalone way. Because there is dependency in the project to the resource.res, the tool is run only once during fresh build( or rebuild all).
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 19 Jun 2002 Editor: Nishant Sivakumar |
Copyright 2002 by srinivas vaithianathan Everything else Copyright © CodeProject, 1999-2009 Web22 | Advertise on the Code Project |