mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[bootstrap.ps1] Add option for building 64-bit vcpkg.exe
This commit is contained in:
parent
3152af9025
commit
e7721cde19
@ -2,6 +2,7 @@
|
|||||||
param(
|
param(
|
||||||
$badParam,
|
$badParam,
|
||||||
[Parameter(Mandatory=$False)][switch]$disableMetrics = $false,
|
[Parameter(Mandatory=$False)][switch]$disableMetrics = $false,
|
||||||
|
[Parameter(Mandatory=$False)][switch]$win64 = $false,
|
||||||
[Parameter(Mandatory=$False)][string]$withVSPath = "",
|
[Parameter(Mandatory=$False)][string]$withVSPath = "",
|
||||||
[Parameter(Mandatory=$False)][string]$withWinSDK = ""
|
[Parameter(Mandatory=$False)][string]$withWinSDK = ""
|
||||||
)
|
)
|
||||||
@ -326,11 +327,23 @@ if ($disableMetrics)
|
|||||||
$disableMetricsValue = "1"
|
$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 = (
|
$arguments = (
|
||||||
"`"/p:VCPKG_VERSION=-nohash`"",
|
"`"/p:VCPKG_VERSION=-nohash`"",
|
||||||
"`"/p:DISABLE_METRICS=$disableMetricsValue`"",
|
"`"/p:DISABLE_METRICS=$disableMetricsValue`"",
|
||||||
"/p:Configuration=release",
|
"/p:Configuration=release",
|
||||||
"/p:Platform=x86",
|
"/p:Platform=$platform",
|
||||||
"/p:PlatformToolset=$platformToolset",
|
"/p:PlatformToolset=$platformToolset",
|
||||||
"/p:TargetPlatformVersion=$windowsSDK",
|
"/p:TargetPlatformVersion=$windowsSDK",
|
||||||
"/verbosity:minimal",
|
"/verbosity:minimal",
|
||||||
@ -371,5 +384,5 @@ 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 $vcpkgSourcesPath\release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null
|
Copy-Item "$vcpkgReleaseDir\vcpkg.exe" "$vcpkgRootDir\vcpkg.exe" | Out-Null
|
||||||
Copy-Item $vcpkgSourcesPath\release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null
|
Copy-Item "$vcpkgReleaseDir\vcpkgmetricsuploader.exe" "$vcpkgRootDir\scripts\vcpkgmetricsuploader.exe" | Out-Null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user