forked from CosmosOS/Cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify install batch to use vswhere.
- Loading branch information
1 parent
eb174e4
commit 3f3f822
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,28 @@ | ||
@echo off | ||
cls | ||
|
||
powershell -File install-VS2017.ps1 %1 %2 %3 %4 %5 %6 %7 %8 %9 | ||
set NuGet=Build\Tools\nuget.exe | ||
set VSWhere=Build\Tools\vswhere.exe | ||
|
||
goto :MSBuild | ||
|
||
:NuGet | ||
echo Running NuGet restore | ||
%NuGet% restore Builder.sln | ||
%NuGet% restore Cosmos.sln | ||
|
||
:MSBuild | ||
echo Looking for MSBuild | ||
for /f "usebackq tokens=1* delims=: " %%i in (`%VSWhere% -latest -version "[15.0,16.0)" -requires "Microsoft.Component.MSBuild" -property "installationPath"`) do ( | ||
set InstallDir=%%j | ||
) | ||
|
||
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 /p:Configuration="Debug" /p:Platform="Any CPU" | ||
) | ||
|
||
"source\Cosmos.Build.Builder\bin\Debug\Cosmos.Build.Builder.exe" "-bat" "-VS2017" "%InstallDir%" |