build.bat: Default to ReleaseStatic build and do some preparations.

- Automatically fix current working directory
- Call generate.bat if the build files don't exist yet
This commit is contained in:
/dev/urandom 2016-01-04 20:23:50 +01:00
parent ddf7b62d6f
commit e18035bbb1
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

View File

@ -1,4 +1,7 @@
@echo off & setlocal @echo off & setlocal
cd %~dp0
if exist "%VS140COMNTOOLS%\vsvars32.bat" call "%VS140COMNTOOLS%\vsvars32.bat" if exist "%VS140COMNTOOLS%\vsvars32.bat" call "%VS140COMNTOOLS%\vsvars32.bat"
msbuild /version >NUL 2>NUL msbuild /version >NUL 2>NUL
if errorlevel 0 goto:build if errorlevel 0 goto:build
@ -21,6 +24,9 @@ endlocal
exit /B 1 exit /B 1
:build :build
set PLATFORM=Win32
set CONFIGURATION=ReleaseStatic
if not exist build\iw4x.sln call generate
msbuild /nologo /m /v:m %* build\iw4x.sln msbuild /nologo /m /v:m %* build\iw4x.sln
endlocal endlocal
exit /B %ERRORLEVEL% exit /B %ERRORLEVEL%