aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2018-06-13 11:21:12 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2018-06-13 11:21:12 -0700
commite7721cde199b381fbc1491df76029dc034cb1e49 (patch)
tree75346df90fa53756662172641d6fcfa5912fa980 /scripts
parent3152af9025cc1413d23340a1e70a0eaa4ac453d6 (diff)
downloadvcpkg-e7721cde199b381fbc1491df76029dc034cb1e49.tar.gz
vcpkg-e7721cde199b381fbc1491df76029dc034cb1e49.zip
[bootstrap.ps1] Add option for building 64-bit vcpkg.exe
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bootstrap.ps119
1 files changed, 16 insertions, 3 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
index 25a769998..7df98fac7 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -2,6 +2,7 @@
param(
$badParam,
[Parameter(Mandatory=$False)][switch]$disableMetrics = $false,
+ [Parameter(Mandatory=$False)][switch]$win64 = $false,
[Parameter(Mandatory=$False)][string]$withVSPath = "",
[Parameter(Mandatory=$False)][string]$withWinSDK = ""
)
@@ -326,11 +327,23 @@ if ($disableMetrics)
$disableMetricsValue = "1"
}
+$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)
+{
+ $platform = "x64"
+ $vcpkgReleaseDir = "$vcpkgSourcesPath\x64\Release"
+}
+
+
$arguments = (
"`"/p:VCPKG_VERSION=-nohash`"",
"`"/p:DISABLE_METRICS=$disableMetricsValue`"",
"/p:Configuration=release",
-"/p:Platform=x86",
+"/p:Platform=$platform",
"/p:PlatformToolset=$platformToolset",
"/p:TargetPlatformVersion=$windowsSDK",
"/verbosity:minimal",
@@ -371,5 +384,5 @@ Write-Host "`nBuilding vcpkg.exe... done.`n"
Write-Verbose("Placing vcpkg.exe in the correct location")
-Copy-Item $vcpkgSourcesPath\release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null
-Copy-Item $vcpkgSourcesPath\release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null
+Copy-Item "$vcpkgReleaseDir\vcpkg.exe" "$vcpkgRootDir\vcpkg.exe" | Out-Null
+Copy-Item "$vcpkgReleaseDir\vcpkgmetricsuploader.exe" "$vcpkgRootDir\scripts\vcpkgmetricsuploader.exe" | Out-Null