2009-02-06 19:52:59 +00:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
rem Usage: preBuild.cmd ProjectSrcDir VspropsDir
|
|
|
|
rem
|
|
|
|
rem ProjectSrcDir - $(ProjectDir)\.. - Directory of project source code.
|
|
|
|
rem VspropsDir - $(PrjectDir)\vsprops - Directory of this script and its counterparts.
|
|
|
|
|
2009-02-17 01:38:02 +00:00
|
|
|
SubWCRev.exe %~1 %~2\svnrev_template.h %~1\svnrev.h
|
2009-02-07 15:14:23 +00:00
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
2009-02-06 19:52:59 +00:00
|
|
|
echo Automatic revision update unavailable, using generic template instead.
|
|
|
|
echo You can safely ignore this message - see svnrev.h for details.
|
2009-02-17 01:38:02 +00:00
|
|
|
copy /Y %~2\svnrev_unknown.h %~1\svnrev.h
|
|
|
|
copy /Y %~2\postBuild.unknown %~2\postBuild.cmd
|
2009-02-06 19:52:59 +00:00
|
|
|
) else (
|
2009-02-17 01:38:02 +00:00
|
|
|
SubWCRev.exe %~1 %~2\postBuild.tmpl %~2\postBuild.cmd
|
2009-02-06 19:52:59 +00:00
|
|
|
)
|
|
|
|
|
2009-02-07 20:11:13 +00:00
|
|
|
rem Always return an errorlevel of 0 -- this allows compilation to continue if SubWCRev failed.
|
2009-02-06 19:52:59 +00:00
|
|
|
|
2009-02-07 20:11:13 +00:00
|
|
|
exit 0
|