mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
Merge VcpkgPowershellUtils into bootstrap.ps1
This commit is contained in:
parent
555fa8d7cc
commit
a739df905c
@ -1,25 +0,0 @@
|
||||
function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName)
|
||||
{
|
||||
if ($object -eq $null)
|
||||
{
|
||||
return $false
|
||||
}
|
||||
|
||||
return [bool]($object.psobject.Properties | Where-Object { $_.Name -eq "$propertyName"})
|
||||
}
|
||||
|
||||
function getProgramFiles32bit()
|
||||
{
|
||||
$out = ${env:PROGRAMFILES(X86)}
|
||||
if ($out -eq $null)
|
||||
{
|
||||
$out = ${env:PROGRAMFILES}
|
||||
}
|
||||
|
||||
if ($out -eq $null)
|
||||
{
|
||||
throw "Could not find [Program Files 32-bit]"
|
||||
}
|
||||
|
||||
return $out
|
||||
}
|
@ -5,10 +5,33 @@ param(
|
||||
)
|
||||
Set-StrictMode -Version Latest
|
||||
$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition
|
||||
. "$scriptsDir\VcpkgPowershellUtils.ps1"
|
||||
|
||||
$vcpkgRootDir = $scriptsDir
|
||||
$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash
|
||||
function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName)
|
||||
{
|
||||
if ($object -eq $null)
|
||||
{
|
||||
return $false
|
||||
}
|
||||
|
||||
return [bool]($object.psobject.Properties | Where-Object { $_.Name -eq "$propertyName"})
|
||||
}
|
||||
|
||||
function getProgramFiles32bit()
|
||||
{
|
||||
$out = ${env:PROGRAMFILES(X86)}
|
||||
if ($out -eq $null)
|
||||
{
|
||||
$out = ${env:PROGRAMFILES}
|
||||
}
|
||||
|
||||
if ($out -eq $null)
|
||||
{
|
||||
throw "Could not find [Program Files 32-bit]"
|
||||
}
|
||||
|
||||
return $out
|
||||
}
|
||||
|
||||
while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root"))
|
||||
{
|
||||
|
@ -19,7 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F589
|
||||
..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1
|
||||
..\scripts\ports.cmake = ..\scripts\ports.cmake
|
||||
..\scripts\SHA256Hash.ps1 = ..\scripts\SHA256Hash.ps1
|
||||
..\scripts\VcpkgPowershellUtils.ps1 = ..\scripts\VcpkgPowershellUtils.ps1
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cmake", "cmake", "{A0122231-04D5-420B-81CA-7960946E5E65}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user