mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 10:19:55 +02:00
- updated vc++ 2010 build file to use git
This commit is contained in:
@@ -43,39 +43,44 @@ ECHO Setting up Visual Studio 2010 environment vars...
|
||||
REM Ensure ultifds HP doesn't mess the build up
|
||||
SET Platform=
|
||||
if "%DevEnvDir%." == "." goto SETVCVARS
|
||||
GOTO SVNSECTION
|
||||
GOTO GITSECTION
|
||||
|
||||
:SETVCVARS
|
||||
|
||||
IF EXIST "%VS100COMNTOOLS%..\..\" GOTO VC_Common
|
||||
IF EXIST "\Program Files\Microsoft Visual Studio 10.0\" GOTO VC_32
|
||||
IF EXIST "\Program Files (x86)\Microsoft Visual Studio 10.0\" GOTO VC_64
|
||||
goto SVNSECTION
|
||||
goto GITSECTION
|
||||
|
||||
:VC_Common
|
||||
call "%VS100COMNTOOLS%..\..\vc\vcvarsall.bat"
|
||||
goto SVNSECTION
|
||||
goto GITSECTION
|
||||
|
||||
:VC_32
|
||||
ECHO 32 bit Windows detected...
|
||||
call "\Program Files\Microsoft Visual Studio 10.0\vc\vcvarsall.bat"
|
||||
goto SVNSECTION
|
||||
goto GITSECTION
|
||||
|
||||
:VC_64
|
||||
ECHO 64 bit Windows detected...
|
||||
call "\Program Files (x86)\Microsoft Visual Studio 10.0\vc\vcvarsall.bat"
|
||||
goto SVNSECTION
|
||||
goto GITSECTION
|
||||
|
||||
|
||||
:SVNSECTION
|
||||
rem Update from SVN to latest rev
|
||||
:GITSECTION
|
||||
rem Update from GIT to latest rev
|
||||
ECHO --------------------------------
|
||||
Echo Updating Code from SVN to latest Revision...
|
||||
svn update ..\..\
|
||||
Echo Updating Code from GIT to latest Revision...
|
||||
cd ..\..\
|
||||
git pull
|
||||
|
||||
set SVNVERSION=.
|
||||
for /f "delims=" %%a in ('svnversion ..\..\ -n') do @set SVNVERSION=%%a
|
||||
ECHO Will build using SVN Revision: [%SVNVERSION%]
|
||||
set GITVERSION_SHA1=.
|
||||
set GITVERSION_REV=.
|
||||
set GET_GIT_SHA1="git log -1 --format=%%h"
|
||||
for /f "delims=" %%a in ('%GET_GIT_SHA1%') do @set GITVERSION_SHA1=%%a
|
||||
for /f "delims=" %%a in ('git rev-list HEAD --count') do @set GITVERSION_REV=%%a
|
||||
ECHO Will build using GIT Revision: [%GITVERSION_REV%.%GITVERSION_SHA1%]
|
||||
cd mk\windoze
|
||||
rem pause
|
||||
|
||||
ECHO --------------------------------
|
||||
@@ -88,12 +93,12 @@ ECHO --------------------------------
|
||||
Echo Building Mega-Glest using Visual Studio 2010...
|
||||
|
||||
set CL=
|
||||
del ..\..\source\glest_game\facilities\svnversion.h
|
||||
del ..\..\source\glest_game\facilities\gitversion.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
|
||||
if not "%SVNVERSION%" == "." copy /b ..\..\source\glest_game\facilities\game_util.cpp +,,
|
||||
if not "%GITVERSION_SHA1%" == "." set CL=/DGITVERSIONHEADER
|
||||
if not "%GITVERSION_SHA1%" == "." echo building with CL [%CL%]
|
||||
if not "%GITVERSION_SHA1%" == "." echo #define GITVERSION "%GITVERSION_REV%.%GITVERSION_SHA1%" > ..\..\source\glest_game\facilities\gitversion.h
|
||||
if not "%GITVERSION_SHA1%" == "." copy /b ..\..\source\glest_game\facilities\game_util.cpp +,,
|
||||
|
||||
set msBuildMaxCPU=
|
||||
SET BuildInParallel=false
|
||||
|
Reference in New Issue
Block a user