2005-03-19 22:41:55 +00:00
|
|
|
@echo off
|
|
|
|
echo Running SVN version detection script...
|
|
|
|
rem
|
2005-03-19 23:23:56 +00:00
|
|
|
rem Requires subversion (`svnversion') to be installed
|
2005-03-19 22:41:55 +00:00
|
|
|
rem
|
|
|
|
cd ..\..
|
2005-03-19 23:23:56 +00:00
|
|
|
if not "%RELEASE%"=="" goto forcerelease
|
2005-05-21 21:30:13 +00:00
|
|
|
if not exist .svn goto nosvn
|
2005-03-19 23:23:56 +00:00
|
|
|
svnversion -n . > os\os2\svnver.tmp
|
|
|
|
if not "%ERRORLEVEL%"=="0" goto nosvn
|
2005-03-19 22:41:55 +00:00
|
|
|
|
2005-03-19 23:23:56 +00:00
|
|
|
copy os\os2\svnver1.c+os\os2\svnver.tmp+os\os2\svnver2.c rev.c /a /y > nul 2> nul
|
2005-03-19 22:41:55 +00:00
|
|
|
goto end
|
|
|
|
|
2005-03-19 23:23:56 +00:00
|
|
|
:forcerelease
|
|
|
|
echo Forcing release string "%RELEASE%"...
|
|
|
|
echo const char _openttd_revision[] = "%RELEASE%"; > rev.c
|
|
|
|
echo const int _revision_number = 0; >> rev.c
|
2005-03-19 22:41:55 +00:00
|
|
|
goto end
|
|
|
|
|
|
|
|
:nosvn
|
2005-03-19 23:23:56 +00:00
|
|
|
echo Error executing `svnversion' or no SVN data detected
|
2005-03-19 22:41:55 +00:00
|
|
|
echo const char _openttd_revision[] = "norev000"; > rev.c
|
|
|
|
echo const int _revision_number = 0; >> rev.c
|
|
|
|
goto end
|
|
|
|
|
|
|
|
:end
|
|
|
|
cd os\os2
|
2005-03-19 23:23:56 +00:00
|
|
|
del svnver.tmp > nul 2> nul
|
2005-03-19 22:41:55 +00:00
|
|
|
rem end
|