mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-05 19:54:53 +00:00
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
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user