search fuunction done
This commit is contained in:
+10
-9
@@ -43,19 +43,20 @@ if (-not $vcpkgRoot) {
|
||||
Write-Host "VCPKG_ROOT defaulted to: $vcpkgRoot" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
$vcvars = "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
|
||||
if (-not (Test-Path $vcvars)) {
|
||||
$vswhere = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
|
||||
if (Test-Path $vswhere) {
|
||||
$vsPath = (& $vswhere -latest -prerelease -products * -property installationPath | Select-Object -First 1)
|
||||
if ($vsPath) {
|
||||
$vcvars = Join-Path $vsPath "VC\Auxiliary\Build\vcvars64.bat"
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $vcvars -or -not (Test-Path $vcvars)) {
|
||||
$vcvars = "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
}
|
||||
|
||||
if (-not (Test-Path $vcvars)) {
|
||||
$vswhere = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
|
||||
if (Test-Path $vswhere) {
|
||||
$vsPath = (& $vswhere -latest -prerelease -products * -property installationPath | Select-Object -First 1)
|
||||
if ($vsPath) {
|
||||
$vcvars = Join-Path $vsPath "VC\Auxiliary\Build\vcvars64.bat"
|
||||
}
|
||||
}
|
||||
$vcvars = "C:\Program Files\Microsoft Visual Studio\18\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
}
|
||||
|
||||
if (-not (Test-Path $vcvars)) {
|
||||
|
||||
Reference in New Issue
Block a user