forked from multitheftauto/mtadiag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
win-build.bat
31 lines (25 loc) · 918 Bytes
/
win-build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@echo off
set VSWHERE=tools\vswhere.exe
rem Download vswhere (command line utility to find MSBuild path)
if not exist %VSWHERE% (
echo vswhere utility doesn't exist. Downloading...
powershell -Command "Invoke-WebRequest https://mirror.mtasa.com/bdata/vswhere.exe -OutFile %VSWHERE%"
)
rem Create solution (ignoring pause)
call win-create-projects.bat < nul
echo.
rem Find MSBuild installation path
for /f "usebackq tokens=1* delims=: " %%i in (`%VSWHERE% -latest -requires Microsoft.Component.MSBuild`) do (
if /i "%%i"=="installationPath" set INSTALLDIR=%%j
)
rem Output an error if not exists
set MSBUILDPATH="%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe"
if not exist %MSBUILDPATH% (
echo Could not find MSBuild. Make sure you have Visual Studio 2017 installed
goto end
)
echo Found MSBuild at: %MSBUILDPATH%
rem Start compiling
%MSBUILDPATH% build/MTADiag.sln /property:Configuration=Release /m
:end
pause