2010-11-16 00:58:29 +01:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
rem change to the directory of this batch file
|
|
|
|
ECHO --------------------------------
|
|
|
|
ECHO Changing to build folder [%~dp0]
|
|
|
|
cd /d "%~dp0"
|
|
|
|
|
|
|
|
rem setup the Visual Studio 2008 environment
|
|
|
|
ECHO --------------------------------
|
|
|
|
ECHO Setting up Visual Studio 2008 environment vars...
|
2010-11-17 00:57:18 +01:00
|
|
|
REM Ensure ultifds HP doesn't mess the build up
|
|
|
|
SET Platform=
|
2011-01-13 23:00:51 +01:00
|
|
|
if "%DevEnvDir%." == "." call "\Program Files\Microsoft Visual Studio 9.0\vc\vcvarsall.bat"
|
2010-11-16 00:58:29 +01:00
|
|
|
|
|
|
|
rem Update from SVN to latest rev
|
|
|
|
ECHO --------------------------------
|
|
|
|
Echo Updating Code from SVN to latest Revision...
|
|
|
|
svn update ..\..\
|
|
|
|
|
2010-12-24 00:17:15 +01:00
|
|
|
set SVNVERSION=.
|
|
|
|
for /f "delims=" %%a in ('svnversion ..\..\ -n') do @set SVNVERSION=%%a
|
|
|
|
ECHO Will build using SVN Revision: [%SVNVERSION%]
|
|
|
|
rem pause
|
|
|
|
|
2010-12-07 23:34:24 +01:00
|
|
|
ECHO --------------------------------
|
|
|
|
Echo Touching the build date/time file so we get proper build stamp
|
2011-01-13 22:57:17 +01:00
|
|
|
rem touch ..\..\source\glest_game\facilities\game_util.cpp
|
|
|
|
copy /b ..\..\source\glest_game\facilities\game_util.cpp +,,
|
2010-12-07 23:34:24 +01:00
|
|
|
|
2010-11-16 00:58:29 +01:00
|
|
|
rem Build Mega-Glest in release mode
|
|
|
|
ECHO --------------------------------
|
|
|
|
Echo Building Mega-Glest...
|
2010-12-24 00:17:15 +01:00
|
|
|
|
|
|
|
set CL=
|
|
|
|
del ..\..\source\glest_game\facilities\svnversion.h
|
|
|
|
|
|
|
|
if not "%SVNVERSION%" == "." set CL=/DSVNVERSIONHEADER
|
|
|
|
if not "%SVNVERSION%" == "." echo building with CL [%CL%]
|
|
|
|
if not "%SVNVERSION%" == "." echo #define SVNVERSION "%SVNVERSION%" > ..\..\source\glest_game\facilities\svnversion.h
|
|
|
|
|
|
|
|
msbuild /p:Configuration=Release Glest.sln
|
2010-11-16 00:58:29 +01:00
|
|
|
|
|
|
|
rem pause execution so we can see the output before the batch file exits
|
|
|
|
pause
|