forked from CosmosOS/Cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-VS2017.bat
41 lines (32 loc) · 1.25 KB
/
install-VS2017.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
32
33
34
35
36
37
38
39
40
41
@echo off
cls
echo Check for installed .NET Framework 4.7.1
FOR /F "tokens=2*" %%A IN ('REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" /V "Release" 2^>NUL ^| FIND "REG_DWORD"') DO SET Ver=%%B
IF "%Ver%"=="" (
echo .NET Framework 4.7.1 or 4.5 or above 4.5 is not installed. Please download from https://www.microsoft.com/net/download/visual-studio-sdks
pause
goto:eof
)
SET "NET471_CREATORS=0x709fc"
if NOT "%NET471_CREATORS%"=="%Ver%" (
echo .NET Framework 4.7.1 is required.
pause
goto:eof
)
set NuGet=Build\Tools\nuget.exe
set VSWhere=Build\Tools\vswhere.exe
:NuGet
echo Running NuGet restore
%NuGet% restore Builder.sln
:MSBuild
echo Looking for MSBuild
for /f "usebackq delims=" %%i in (`%VSWhere% -latest -version "[15.0,16.0)" -requires "Microsoft.Component.MSBuild" -property "installationPath"`) do (
set InstallDir=%%i
)
if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (
set MSBuild="%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe"
)
if exist %MSBuild% (
%MSBuild% Builder.sln /nologo /maxcpucount /nodeReuse:false /p:Configuration="Debug" /p:Platform="Any CPU"
)
start "Cosmos Builder" "source\Cosmos.Build.Builder\bin\Debug\Cosmos.Build.Builder.exe" "-VSPATH=%InstallDir%" %1 %2 %3 %4 %5 %6 %7 %8 %9