From dec4bc972528a24142830ca3ff47ae2c7ffc0e0f Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Fri, 29 Sep 2017 14:18:47 -0700 Subject: [PATCH] Update VS templates based on VS versions Commit migrated from https://github.com/dotnet/core-setup/commit/ea2cc892d61ed4671bc4b2aba9aeb7c5896d73e4 --- src/installer/corehost/Windows/gen-buildsys-win.bat | 5 +++-- src/installer/corehost/build.cmd | 8 ++++---- src/installer/uwp/Windows/gen-buildsys-win.bat | 3 +-- src/installer/uwp/build.cmd | 15 +-------------- 4 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/installer/corehost/Windows/gen-buildsys-win.bat b/src/installer/corehost/Windows/gen-buildsys-win.bat index 6ceb951..8d70f26 100644 --- a/src/installer/corehost/Windows/gen-buildsys-win.bat +++ b/src/installer/corehost/Windows/gen-buildsys-win.bat @@ -10,8 +10,9 @@ if %1=="/?" GOTO :USAGE setlocal set __sourceDir=%~dp0.. -:: VS 2015 is the minimum supported toolset -set __VSString=14 2015 +set __VSString=%2 + :: Remove quotes +set __VSString=%__VSString:"=% :: Set the target architecture to a format cmake understands. ANYCPU defaults to x64 set __RIDArch=%3 diff --git a/src/installer/corehost/build.cmd b/src/installer/corehost/build.cmd index 71d0def..3ee5b6a 100644 --- a/src/installer/corehost/build.cmd +++ b/src/installer/corehost/build.cmd @@ -68,8 +68,8 @@ exit /b 1 :VS2017 :: Setup vars for VS2017 -set __VSVersion=vs2017 set __PlatformToolset=v141 +set __VSVersion=15 2017 if NOT "%__BuildArch%" == "arm64" ( :: Set the environment for the native build call "%VS150COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" %__VCBuildArch% @@ -78,8 +78,8 @@ goto :SetupDirs :VS2015 :: Setup vars for VS2015build -set __VSVersion=vs2015 set __PlatformToolset=v140 +set __VSVersion=14 2015 if NOT "%__BuildArch%" == "arm64" ( :: Set the environment for the native build call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %__VCBuildArch% @@ -125,9 +125,9 @@ if /i "%__BuildArch%" == "arm64" ( call :PrivateToolSet ) -echo Calling "%__nativeWindowsDir%\gen-buildsys-win.bat %~dp0 %__VSVersion% %__BuildArch% %__CommitSha% %__HostVersion% %__AppHostVersion% %__HostResolverVersion% %__HostPolicyVersion%" +echo Calling "%__nativeWindowsDir%\gen-buildsys-win.bat %~dp0 "%__VSVersion%" %__BuildArch% %__CommitSha% %__HostVersion% %__AppHostVersion% %__HostResolverVersion% %__HostPolicyVersion%" pushd "%__IntermediatesDir%" -call "%__nativeWindowsDir%\gen-buildsys-win.bat" %~dp0 %__VSVersion% %__BuildArch% %__CommitSha% %__HostVersion% %__AppHostVersion% %__HostResolverVersion% %__HostPolicyVersion% %__PortableBuild% +call "%__nativeWindowsDir%\gen-buildsys-win.bat" %~dp0 "%__VSVersion%" %__BuildArch% %__CommitSha% %__HostVersion% %__AppHostVersion% %__HostResolverVersion% %__HostPolicyVersion% %__PortableBuild% popd :CheckForProj diff --git a/src/installer/uwp/Windows/gen-buildsys-win.bat b/src/installer/uwp/Windows/gen-buildsys-win.bat index 05512ba..72df643 100644 --- a/src/installer/uwp/Windows/gen-buildsys-win.bat +++ b/src/installer/uwp/Windows/gen-buildsys-win.bat @@ -16,8 +16,7 @@ echo %5 setlocal set __sourceDir=%1 -:: VS 2015 is the minimum supported toolset -set __VSString=14 2015 +set __VSString=15 2017 :: Set the target architecture to a format cmake understands. ANYCPU defaults to x64 set cm_BaseRid=win10-%2 diff --git a/src/installer/uwp/build.cmd b/src/installer/uwp/build.cmd index 1b1fc4b..4e9b956 100644 --- a/src/installer/uwp/build.cmd +++ b/src/installer/uwp/build.cmd @@ -59,24 +59,11 @@ exit /b 1 :VS2017 :: Setup vars for VS2017 -set __VSVersion=vs2017 set __PlatformToolset=v141 if NOT "%__BuildArch%" == "arm64" ( :: Set the environment for the native build call "%VS150COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" %__VCBuildArch% ) -goto :SetupDirs - -:VS2015 -:: Setup vars for VS2015build -set __VSVersion=vs2015 -set __PlatformToolset=v140 -if NOT "%__BuildArch%" == "arm64" ( - :: Set the environment for the native build - call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %__VCBuildArch% -) - -:SetupDirs :: Setup to cmake the native components echo Commencing build of native UWP components echo. @@ -137,7 +124,7 @@ exit /b 0 IF ERRORLEVEL 1 ( exit /b 1 ) - + goto :eof :Failure -- 2.7.4