From 6209bbdcdf1cc5dadeec1d0099c010ff2578a120 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Fri, 22 Feb 2019 11:11:32 +1000 Subject: [PATCH] build.ps1 - Remove incorrect $env:VS141COMNTOOLS -eq $null check when building VS2017 There is no such environment variable, VS2017 uses vswhere to locate the installed version. Move checks into the MSVS function and make the error message consistent --- build.ps1 | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/build.ps1 b/build.ps1 index 4e6fcbb44..cb6861aa9 100644 --- a/build.ps1 +++ b/build.ps1 @@ -135,6 +135,10 @@ function Msvs switch -Exact ($Toolchain) { 'v140' { + if($env:VS140COMNTOOLS -eq $null) { + Die "Visual Studio 2015 is not installed on your development machine, unable to continue." + } + $MSBuildExe = join-path -path (Get-ItemProperty "HKLM:\software\Microsoft\MSBuild\ToolsVersions\14.0").MSBuildToolsPath -childpath "msbuild.exe" $MSBuildExe = $MSBuildExe -replace "Framework64", "Framework" $VisualStudioVersion = '14.0' @@ -168,7 +172,7 @@ function Msvs if(-not (Test-Path $VS2017InstallPath)) { - Die "Visual Studio 2017 was not found" + Die "Visual Studio 2017 is not installed on your development machine, unable to continue." } $MSBuildExe = "msbuild.exe" @@ -243,16 +247,6 @@ function VSX [string] $Toolchain ) - if($Toolchain -eq 'v140' -and $env:VS140COMNTOOLS -eq $null) { - Warn "Toolchain $Toolchain is not installed on your development machine, skipping build." - Return - } - - if($Toolchain -eq 'v141' -and $env:VS141COMNTOOLS -eq $null) { - Warn "Toolchain $Toolchain is not installed on your development machine, skipping build." - Return - } - Write-Diagnostic "Starting to build targeting toolchain $Toolchain" Msvs "$Toolchain" 'Release' 'x86'