[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Getting svnversion text into VC6 VERSIONINFO block

From: D.J. Heap <djheap_at_gmail.com>
Date: 2007-12-09 21:54:36 CET

On Dec 6, 2007 2:29 PM, Kenneth Porter <shiva@sewingwitch.com> wrote:
> Has anyone gotten VC6 to run svnversion and automatically incorporate its
> text into a resource file VERSIONINFO block?
>
> I've found information on how to do this in VC8, but not VC6.
>
> In a batch file I can do this to capture the svnversion information to a
> synthesized header file:
>
> FOR /F "usebackq" %%s IN (`svnversion ..\..`) DO echo #define SVNVERSION
> "%%s" > svn-version.h
>
> But I can't figure out how to invoke it from the IDE as part of the build
> process, before the resource compiler runs on my .rc file.

I don't know if this is the best way or not, but you can create a
dummy input file (contents don't matter) like 'svn-version.in' and add
it to your project. Then change it's custom build step by
right-clicking on it and choosing Settings. Set the custom build step
to something like:

cmd.exe /c command-to-create-header-file > $(ProjDir)\svn-version.h

and the output file to the header file like:

$(ProjDir)\svn-version.h

DJ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Dec 9 21:55:00 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.