diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2017-04-13 14:17:19 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2017-04-13 14:17:19 +0900 |
commit | a56e30c8d33048216567753d9d3fefc2152af8ac (patch) | |
tree | 7e5d979695fc4a431740982eb1cfecc2898b23a5 /run.cmd | |
parent | 4b11dc566a5bbfa1378d6266525c281b028abcc8 (diff) | |
download | coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.gz coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.bz2 coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.zip |
Imported Upstream version 2.0.0.11353upstream/2.0.0.11353
Diffstat (limited to 'run.cmd')
-rw-r--r-- | run.cmd | 28 |
1 files changed, 26 insertions, 2 deletions
@@ -1,8 +1,29 @@ @if not defined _echo @echo off setlocal +:: Default to highest Visual Studio version available +:: +:: For VS2015 (and prior), only a single instance is allowed to be installed on a box +:: and VS140COMNTOOLS is set as a global environment variable by the installer. This +:: allows users to locate where the instance of VS2015 is installed. +:: +:: For VS2017, multiple instances can be installed on the same box SxS and VS150COMNTOOLS +:: is no longer set as a global environment variable and is instead only set if the user +:: has launched the VS2017 Developer Command Prompt. +:: +:: Following this logic, we will default to the VS2017 toolset if VS150COMNTOOLS tools is +:: set, as this indicates the user is running from the VS2017 Developer Command Prompt and +:: is already configured to use that toolset. Otherwise, we will fallback to using the VS2015 +:: toolset if it is installed. Finally, we will fail the script if no supported VS instance +:: can be found. if not defined VisualStudioVersion ( - if defined VS140COMNTOOLS ( + if defined VS150COMNTOOLS ( + if not exist "%VS150COMNTOOLS%\..\IDE\devenv.exe" goto NoVS + if not exist "%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build\vcvarsall.bat" goto NoVS + if not exist "%VS150COMNTOOLS%\VsDevCmd.bat" goto NoVS + call "%VS150COMNTOOLS%\VsDevCmd.bat" + goto :Run + ) else if defined VS140COMNTOOLS ( if not exist "%VS140COMNTOOLS%\..\IDE\devenv.exe" goto NoVS if not exist "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" goto NoVS if not exist "%VS140COMNTOOLS%\VsDevCmd.bat" goto NoVS @@ -11,7 +32,7 @@ if not defined VisualStudioVersion ( ) :NoVS - echo Error: Visual Studio 2015 required. + echo Error: Visual Studio 2015 or 2017 required. echo https://github.com/dotnet/coreclr/blob/master/Documentation/building/windows-instructions.md for build instructions. exit /b 1 ) @@ -27,6 +48,9 @@ if NOT [%ERRORLEVEL%]==[0] ( exit /b 1 ) +:: Always copy over the Tools-Override +xcopy %~dp0Tools-Override\* %~dp0Tools /y >nul + set _toolRuntime=%~dp0Tools set _dotnet=%_toolRuntime%\dotnetcli\dotnet.exe |