diff options
| author | Phil Christensen <philc@microsoft.com> | 2019-02-27 11:56:29 -0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-02-27 11:56:29 -0800 |
| commit | 2cc7fa27e57f1129d1f37ccb009563509ca25720 (patch) | |
| tree | 3c75e423b71e54f6f65ec085c5d3d190d9d0d1a9 /scripts/bootstrap.ps1 | |
| parent | 3830517ec7519b823f5d8c404710889c6bd00278 (diff) | |
| parent | 2dfa568d186e4f0d199040929f9b3e44f27c8943 (diff) | |
| download | vcpkg-2cc7fa27e57f1129d1f37ccb009563509ca25720.tar.gz vcpkg-2cc7fa27e57f1129d1f37ccb009563509ca25720.zip | |
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/philc/5254
Diffstat (limited to 'scripts/bootstrap.ps1')
| -rw-r--r-- | scripts/bootstrap.ps1 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 42eabd01b..07a9fcbaa 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -25,7 +25,7 @@ $withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) { - if ($object -eq $null) + if ($null -eq $object) { return $false } @@ -36,12 +36,12 @@ function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Par function getProgramFiles32bit() { $out = ${env:PROGRAMFILES(X86)} - if ($out -eq $null) + if ($null -eq $out) { $out = ${env:PROGRAMFILES} } - if ($out -eq $null) + if ($null -eq $out) { throw "Could not find [Program Files 32-bit]" } @@ -138,7 +138,7 @@ function getVisualStudioInstances() function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) { $VisualStudioInstances = getVisualStudioInstances - if ($VisualStudioInstances -eq $null) + if ($null -eq $VisualStudioInstances) { throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed." } @@ -166,7 +166,7 @@ function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) if (Test-Path $VCFolder) { Write-Verbose "Picking: $instanceCandidate" - return "$path\MSBuild\Current\Bin\MSBuild.exe", "v141" + return "$path\MSBuild\Current\Bin\MSBuild.exe", "v142" } } @@ -192,7 +192,7 @@ function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) } } - throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." + throw "Could not find MSBuild version with C++ support. VS2015, VS2017, or VS2019 (with C++) needs to be installed." } function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK = $False, [Parameter(Mandatory=$False)][switch]$DisableWin81SDK = $False, @@ -210,7 +210,7 @@ function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK = # Windows 10 SDK function CheckWindows10SDK($path) { - if ($path -eq $null) + if ($null -eq $path) { return } @@ -262,7 +262,7 @@ function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK = # Windows 8.1 SDK function CheckWindows81SDK($path) { - if ($path -eq $null) + if ($null -eq $path) { return } @@ -396,7 +396,7 @@ if ($ec -ne 0) } Write-Host "`nBuilding vcpkg.exe... done.`n" -Write-Verbose("Placing vcpkg.exe in the correct location") +Write-Verbose "Placing vcpkg.exe in the correct location" Copy-Item "$vcpkgReleaseDir\vcpkg.exe" "$vcpkgRootDir\vcpkg.exe" Copy-Item "$vcpkgReleaseDir\vcpkgmetricsuploader.exe" "$vcpkgRootDir\scripts\vcpkgmetricsuploader.exe" |
