Files
third_party_mesa3d/.gitlab-ci/windows/mesa_vs_init.ps1
Yonggang Luo a740b8430a ci/vs2019: Add a dedicated script for entering VS dev shell
Then we can remove cmd.exe invocations, and spread those configure commands
over multiple lines since they're not strings anymore.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16934>
2022-06-14 21:14:33 +00:00

12 lines
680 B
PowerShell

$vsInstallPath=& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version 16.0 -property installationpath
Write-Output "vswhere.exe installPath: $vsInstallPath"
$vsInstallPath = if ("$vsInstallPath" -eq "" ) { "C:\BuildTools" } else { "$vsInstallPath" }
Write-Output "Final installPath: $vsInstallPath"
Import-Module (Join-Path $vsInstallPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
# https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B
# VS2015 14.0
# VS2017 14.16
# VS2019 14.29
# VS2022 14.32
Enter-VsDevShell -VsInstallPath $vsInstallPath -SkipAutomaticLocation -DevCmdArguments '-vcvars_ver=14.29 -arch=x64 -no_logo -host_arch=amd64'