Files
mob/bootstrap.bat
T

41 lines
970 B
Batchfile
Raw Normal View History

2020-05-06 07:43:15 -04:00
@echo off
Setlocal EnableDelayedExpansion
set "vswhere_cmd=third-party\bin\vswhere.exe -nologo -prerelease -latest -property installationPath"
2020-05-07 18:19:25 -04:00
for /F "tokens=* USEBACKQ" %%A in (`%vswhere_cmd%`) do (
2020-05-06 07:43:15 -04:00
set ret=%errorlevel%
if %errorlevel% neq 0 (
echo %%F
echo vswhere returned %ret%
exit /b 1
)
2020-05-07 18:19:25 -04:00
set "installation_path=%%A"
2020-05-06 07:43:15 -04:00
2020-05-07 19:18:52 -04:00
if "!installation_path!" == "" (
2020-05-06 07:43:15 -04:00
echo empty installation path
exit /b 1
)
)
set "opts="
set "opts=%opts% vs/mob.sln"
set "opts=%opts% -m "
set "opts=%opts% -p:Configuration=Release"
set "opts=%opts% -noLogo "
set "opts=%opts% -p:UseMultiToolTask=true"
set "opts=%opts% -p:EnforceProcessCountAcrossBuilds=true"
set "opts=%opts% -clp:ErrorsOnly;Verbosity=minimal"
set "vcvars=%installation_path%\VC\Auxiliary\Build\vcvarsall.bat"
cmd /c ""%vcvars%" amd64 > NUL && msbuild %opts%"
if %errorlevel% neq 0 (
echo build failed
exit /b 1
)
copy "build\Release\x64\mob.exe" .\mob.exe > NUL
2020-05-07 18:19:25 -04:00
echo run `mob -d path` to start building