Skip to content

Commit

Permalink
build.ps1 - Remove older VS support
Browse files Browse the repository at this point in the history
VS2019 is required to build now

Issue #3636
  • Loading branch information
amaitland committed Sep 10, 2021
1 parent 7f870db commit 9f20964
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function TernaryReturn
function Msvs
{
param(
[ValidateSet('v140', 'v141', 'v142')]
[ValidateSet('v142')]
[Parameter(Position = 0, ValueFromPipeline = $true)]
[string] $Toolchain,

Expand All @@ -133,21 +133,12 @@ function Msvs
$VisualStudioVersion = $null
$VXXCommonTools = $null

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'
$VXXCommonTools = Join-Path $env:VS140COMNTOOLS '..\..\vc'
}
{($_ -eq 'v141') -or ($_ -eq 'v142')} {
$VS_VER = 15;
$VS_OFFICIAL_VER = 2017;
if ($_ -eq 'v142'){$VS_VER=16;$VS_OFFICIAL_VER=2019;}
switch -Exact ($Toolchain)
{
'v142'
{
$VS_VER = 16;
$VS_OFFICIAL_VER = 2019;
$programFilesDir = (${env:ProgramFiles(x86)}, ${env:ProgramFiles} -ne $null)[0]

$vswherePath = Join-Path $programFilesDir 'Microsoft Visual Studio\Installer\vswhere.exe'
Expand Down Expand Up @@ -246,7 +237,7 @@ function Msvs
function VSX
{
param(
[ValidateSet('v140', 'v141', 'v142')]
[ValidateSet('v142')]
[Parameter(Position = 0, ValueFromPipeline = $true)]
[string] $Toolchain
)
Expand Down

0 comments on commit 9f20964

Please sign in to comment.