Files
runner-images/images/win/scripts/Installers/Install-Vcpkg.ps1
T

24 lines
742 B
PowerShell
Raw Normal View History

################################################################################
## 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
2020-07-30 12:12:49 +05:00
Invoke-PesterTests -TestFile "Tools" -TestName "Vcpkg"