Files
runner-images/images/win/scripts/Installers/Install-Vcpkg.ps1
Sergey Dolin d3788c5fcf Migrate validation to Pester (#1249)
* remove Validate-* scripts

* Remove references to validation scripts from .json files

* Separate "It"s by new lines

* Remove new line before the first  "It"

* Separate "It"s by new lines

* remove 32-bit WinAppDriver check

* remove explicit variable definition

Co-authored-by: Sergey Dolin <v-sedoli@micorosoft.com>
2020-07-30 10:12:49 +03:00

24 lines
742 B
PowerShell

################################################################################
## File: Install-Vcpkg.ps1
## Desc: Install vcpkg
################################################################################
Import-Module -Name ImageHelpers -Force
$Uri = 'https://github.com/Microsoft/vcpkg.git'
$InstallDir = 'C:\vcpkg'
$VcpkgExecPath = 'vcpkg.exe'
git clone --depth=1 $Uri $InstallDir -q
# Build and integrate vcpkg
Invoke-Expression "$InstallDir\bootstrap-vcpkg.bat"
Invoke-Expression "$InstallDir\$VcpkgExecPath integrate install"
# Add vcpkg to system environment
Add-MachinePathItem $InstallDir
$env:Path = Get-MachinePath
setx VCPKG_INSTALLATION_ROOT $InstallDir /M
Invoke-PesterTests -TestFile "Tools" -TestName "Vcpkg"