Files
runner-images-sangeeth/images/windows/scripts/build/Install-Vcpkg.ps1
2023-11-17 13:52:52 +01:00

22 lines
736 B
PowerShell

################################################################################
## File: Install-Vcpkg.ps1
## Desc: Install vcpkg
################################################################################
$Uri = 'https://github.com/Microsoft/vcpkg.git'
$InstallDir = 'C:\vcpkg'
$VcpkgExecPath = 'vcpkg.exe'
git clone $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
[Environment]::SetEnvironmentVariable("VCPKG_INSTALLATION_ROOT", $InstallDir, "Machine")
Invoke-PesterTests -TestFile "Tools" -TestName "Vcpkg"