2009-02-24 02:08:37 +00:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
:: Usage: preBuild.cmd ProjectSrcDir VspropsDir
|
|
|
|
::
|
|
|
|
:: ProjectSrcDir - $(ProjectDir)\.. - Top-level Directory of project source code.
|
|
|
|
|
|
|
|
SETLOCAL ENABLEEXTENSIONS
|
|
|
|
|
2009-10-05 20:20:54 +00:00
|
|
|
set mydir=%~dp0
|
2009-02-24 02:08:37 +00:00
|
|
|
SubWCRev.exe "%~1" "%mydir%\svnrev_template.h" "%CD%\svnrev.h"
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
|
|
echo Automatic revision update unavailable, using generic template instead.
|
|
|
|
echo You can safely ignore this message - see svnrev.h for details.
|
|
|
|
copy /Y "%mydir%\svnrev_unknown.h" "%CD%\svnrev.h"
|
|
|
|
copy /Y "%mydir%\postBuild.unknown" "%CD%\postBuild.cmd"
|
|
|
|
) else (
|
|
|
|
SubWCRev.exe "%~1" "%mydir%\postBuild.tmpl" "%CD%\postBuild.cmd" > NUL
|
|
|
|
)
|
|
|
|
|
|
|
|
ENDLOCAL
|
|
|
|
:: Always return an errorlevel of 0 -- this allows compilation to continue if SubWCRev failed.
|
|
|
|
exit 0
|