Files
UltraGrid/.github/scripts/Windows/find_msvc.ps1
Martin Pulec be79100e02 CI: Updates
- option not to download CUDA [Win]
- correct asset uploading
- nightly CI: use different trigger - temporarily "on push" (to
  ci-nightly)
- correctly add DLLs (using "|" as a delimiter to cope with spaces in
  names)
- extract to C:\
- remove correct test artefact [Win]
- build AJA wrapper only if we have SDK [Win]
- disable NDI by default
2020-03-19 09:53:30 +01:00

23 lines
793 B
PowerShell

#Set-PSDebug -Trace 1
# Find VS
$vswhere = "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$installDir = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
if (-Not $installDir) {
throw "Vswhere failed"
}
$path = join-path $installDir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt'
$pathPresent = test-path $path
if (-Not $pathPresent) {
throw "MSVS not found"
}
$version = gc -raw $path
if (-Not $version) {
throw "Cannot get MSVS version"
}
$version = $version.Trim()
echo "::add-path::$installDir\VC\Tools\MSVC\$version\bin\HostX64\x64" # cl
echo "::add-path::$installDir\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"
echo "::add-path::$installDir\MSBuild\Current\Bin"