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