mirror of
git://code.qt.io/qt/qt5.git
synced 2026-04-23 21:36:50 +08:00
Use vswhere to find the location of Visual Studio
vswhere tool is included since Visual Studio 2017 and is always located at the same path thus making it a more convenient way to find Visual Studio install directory. Pick-to: 6.5 Change-Id: I680af8f88779841108b436223b4667f8a7c91aba Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Lars Knoll <lars@knoll.priv.no>
This commit is contained in:
@@ -274,3 +274,12 @@ function DeleteSchedulerTask {
|
|||||||
Write-Host "Disabling $Task from Task Scheduler"
|
Write-Host "Disabling $Task from Task Scheduler"
|
||||||
SCHTASKS /DELETE /TN "Microsoft\Windows\$Task" /F
|
SCHTASKS /DELETE /TN "Microsoft\Windows\$Task" /F
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function GetVSPath {
|
||||||
|
Param (
|
||||||
|
[string]$VSWhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe",
|
||||||
|
[string]$Component = "Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
|
||||||
|
)
|
||||||
|
|
||||||
|
return (& $VSWhere -nologo -latest -products * -requires $Component -property installationPath)
|
||||||
|
}
|
||||||
|
|||||||
@@ -107,8 +107,7 @@ function InstallMingwFfmpeg {
|
|||||||
|
|
||||||
|
|
||||||
function InstallMsvcFfmpeg {
|
function InstallMsvcFfmpeg {
|
||||||
$vsPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional"
|
$vsPath = GetVSPath
|
||||||
#$vsPath = "C:\Program Files\Microsoft Visual Studio\2022\Professional"
|
|
||||||
|
|
||||||
Write-Host "Enter VisualStudio developer shell"
|
Write-Host "Enter VisualStudio developer shell"
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user