From 4a4215c2e526ffd688bb37734b83c2e53d6ce1b7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 13 Jun 2018 11:54:33 -0700 Subject: Win7 compat. Fail if 64-bit requested on 32-bit machine --- scripts/bootstrap.ps1 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 7df98fac7..ef94c632b 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -329,16 +329,19 @@ if ($disableMetrics) $platform = "x86" $vcpkgReleaseDir = "$vcpkgSourcesPath\release" -# x86_64 architecture is 9 -$architecture=(Get-WmiObject win32_Processor -ErrorAction SilentlyContinue).Architecture -if ([Environment]::Is64BitOperatingSystem -and $architecture -eq 9 -and $win64) +if ($win64) { + $architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture + if ($architecture -ne "64-bit") + { + throw "Cannot build 64-bit on non-64-bit system" + } + $platform = "x64" - $vcpkgReleaseDir = "$vcpkgSourcesPath\x64\Release" + $vcpkgReleaseDir = "$vcpkgSourcesPath\x64\release" } - $arguments = ( "`"/p:VCPKG_VERSION=-nohash`"", "`"/p:DISABLE_METRICS=$disableMetricsValue`"", -- cgit v1.2.3