-
November 25th, 2009, 02:52 PM
#1
Running batch script on build?
I'm trying to use SubWCRev so that I can use subversion's revision number as part of the version number that is displayed in my program. Right now, I have to run SubWCRev manually everytime I want the version number to reflect the right revision number. I want to do this automatically -- perhaps have the execution of SubWCRev.exe triggered when my program is built.
I'm using VC++2008. Is there any way to do this?
Thanks!
-
November 26th, 2009, 08:39 AM
#2
Re: Running batch script on build?
There are number of places where you can add build-related actions.
Open Project - Properties - Configuration Properties - Build Events. There are Pre-Build, Pre-Link and Post-Build events. Pre-Build event is used to prepare some files for compilation and linking. Post-Build event is used to do something with resulting executable files.
It is possible assosiate some command with specific file. Right-click on any project file, select Properties - Custom Build Step. It is executed before project build.
I don't know how SubWCRev.exe works. If it modifies source or .rc file, use Pre-Build or Custom Build step. If it modifies output executable, use Post-Build step.
-
December 3rd, 2009, 10:29 PM
#3
Re: Running batch script on build?
Perfect, thank you. I copy and pasted the command line into Pre-Build event to do what I wanted.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|