diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2018-06-13 23:56:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-13 23:56:06 -0700 |
| commit | 0ecfd89be9de055a8e25a7d17dc5860595dd29c7 (patch) | |
| tree | 8a326c2314445206c8bb617314ad518ab4f0602b /scripts | |
| parent | 0bb94b28c83e419d3d9fef2cf20070251c8576ea (diff) | |
| parent | 4a4215c2e526ffd688bb37734b83c2e53d6ce1b7 (diff) | |
| download | vcpkg-0ecfd89be9de055a8e25a7d17dc5860595dd29c7.tar.gz vcpkg-0ecfd89be9de055a8e25a7d17dc5860595dd29c7.zip | |
Merge pull request #3720 from Microsoft/dev/alkarata/bootstrapwin64
[bootstrap.ps1] Add option for building 64-bit vcpkg.exe
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/bootstrap.ps1 | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 25a769998..ef94c632b 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,26 @@ if ($disableMetrics) $disableMetricsValue = "1" } +$platform = "x86" +$vcpkgReleaseDir = "$vcpkgSourcesPath\release" + +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" +} + $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 +387,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 |
