mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Windows 11 21H2 will be replaced by 22H2 version Task-number: QTQAINFRA-5203 Pick-to: 6.4 Change-Id: Iad18055cf84d9c1ff38984611c820b1c23d663a2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Matti Paaso <matti.paaso@qt.io>
23 lines
632 B
PowerShell
23 lines
632 B
PowerShell
# The DirectX SDK installer requires .Net framework 3.5 which isn't installed
|
|
# by default
|
|
|
|
$netFeature = "NetFx3"
|
|
try {
|
|
$netFeatureState = (Get-WindowsOptionalFeature -Online -FeatureName "$netFeature").State
|
|
if ($netFeatureState -eq "Enabled") {
|
|
Write-Host ".Net Framework is already installed"
|
|
exit 0
|
|
}
|
|
} catch {
|
|
Write-Host "Could not find .Net Framework Windows feature."
|
|
exit 1
|
|
}
|
|
|
|
Write-Host "Installing .Net Framework client"
|
|
try {
|
|
Enable-WindowsOptionalFeature -Online -FeatureName "$netFeature" -All -NoRestart
|
|
} catch {
|
|
Write-Host "Could not install .Net framework"
|
|
exit 1
|
|
}
|