Install WebView2 on other windows nodes

We are going to run test suite twice with qtwebview, with
different backends on windows. Therefore install
webview2 to build plugin also on other nodes.

Task-number: QTBUG-128447
Task-number: QTBUG-75747
Pick-to: 6.10
Change-Id: I88da09eb9bf9e58f630ed65071d33bd4a89ac094
Reviewed-by: Toni Saario <toni.saario@qt.io>
This commit is contained in:
Michal Klocek 2025-06-06 12:17:23 +02:00
parent ecff7e6ddc
commit 539dc64e8e
5 changed files with 22 additions and 24 deletions

View File

@ -135,7 +135,7 @@ Configurations:
'VCPKG_HOST_TRIPLET=x64-windows-qt', 'VCPKG_HOST_TRIPLET=x64-windows-qt',
'VCPKG_TARGET_TRIPLET=x64-windows-qt', 'VCPKG_TARGET_TRIPLET=x64-windows-qt',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}', 'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
'WEBVIEW2_SDK_ROOT={{.Env.WEBVIEW2_SDK_ROOT_x64}}', 'WEBVIEW2_SDK_ROOT={{.Env.WEBVIEW2_SDK_ROOT_PATH}}',
] ]
- -
Id: 'windows-11_23H2-msvc2022' Id: 'windows-11_23H2-msvc2022'
@ -150,6 +150,7 @@ Configurations:
'VCPKG_HOST_TRIPLET=x64-windows-qt', 'VCPKG_HOST_TRIPLET=x64-windows-qt',
'VCPKG_TARGET_TRIPLET=x64-windows-qt', 'VCPKG_TARGET_TRIPLET=x64-windows-qt',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}', 'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
'WEBVIEW2_SDK_ROOT={{.Env.WEBVIEW2_SDK_ROOT_PATH}}',
] ]
- -
Id: 'windows-11_24H2-msvc2022' Id: 'windows-11_24H2-msvc2022'
@ -162,6 +163,7 @@ Configurations:
'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DQT_DEPLOY_FFMPEG=TRUE -DFEATURE_clangcpp=OFF -DINPUT_headersclean=ON', 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DQT_DEPLOY_FFMPEG=TRUE -DFEATURE_clangcpp=OFF -DINPUT_headersclean=ON',
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_msvc}}', 'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_msvc}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}', 'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
'WEBVIEW2_SDK_ROOT={{.Env.WEBVIEW2_SDK_ROOT_PATH}}',
] ]
- -
Id: 'windows-11_22h2-arm64-msvc2022' Id: 'windows-11_22h2-arm64-msvc2022'
@ -175,6 +177,7 @@ Configurations:
'VCPKG_HOST_TRIPLET=arm64-windows-qt', 'VCPKG_HOST_TRIPLET=arm64-windows-qt',
'VCPKG_TARGET_TRIPLET=arm64-windows-qt', 'VCPKG_TARGET_TRIPLET=arm64-windows-qt',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}', 'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
'WEBVIEW2_SDK_ROOT={{.Env.WEBVIEW2_SDK_ROOT_PATH}}',
] ]
- -
Id: 'windows-11_23H2-msvc2022-arm64' Id: 'windows-11_23H2-msvc2022-arm64'
@ -192,6 +195,7 @@ Configurations:
'OPENSSL_INCLUDE_x64={{.Env.OPENSSL_INCLUDE_x64_arm64}}', 'OPENSSL_INCLUDE_x64={{.Env.OPENSSL_INCLUDE_x64_arm64}}',
'OPENSSL_LIB_x64={{.Env.OPENSSL_LIB_x64_arm64}}', 'OPENSSL_LIB_x64={{.Env.OPENSSL_LIB_x64_arm64}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}', 'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
'WEBVIEW2_SDK_ROOT={{.Env.WEBVIEW2_SDK_ROOT_PATH}}',
] ]
- -
Id: 'windows-11_24H2-msvc2022-arm64' Id: 'windows-11_24H2-msvc2022-arm64'
@ -210,6 +214,7 @@ Configurations:
'VCPKG_HOST_TRIPLET=x64-windows-qt', 'VCPKG_HOST_TRIPLET=x64-windows-qt',
'VCPKG_TARGET_TRIPLET=arm64-windows-qt', 'VCPKG_TARGET_TRIPLET=arm64-windows-qt',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}', 'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
'WEBVIEW2_SDK_ROOT={{.Env.WEBVIEW2_SDK_ROOT_PATH}}',
] ]
- -
Id: 'windows-11-x86_64-arm64-tests' Id: 'windows-11-x86_64-arm64-tests'

View File

@ -2,13 +2,13 @@
# This script installs Windows App SDK # This script installs Windows App SDK
$nugetPackage = "nuget.exe" $script:nugetPackage = "nuget.exe"
$packageRoot = "C:\Utils\WindowsAppSdk\" $script:packageRoot = "C:\Utils\WindowsAppSdk\"
$cachedUrl = "\\ci-files01-hki.ci.qt.io\provisioning\windows\nuget\$nugetPackage" $script:cachedUrl = "\\ci-files01-hki.ci.qt.io\provisioning\windows\nuget\$nugetPackage"
$officialUrl = "https://dist.nuget.org/win-x86-commandline/v6.11.0/nuget.exe" $script:officialUrl = "https://dist.nuget.org/win-x86-commandline/v6.11.0/nuget.exe"
$sdkChecksumSha1 = "5443887cfb5283da5021388d146ebb5febdc82e9" $script:sdkChecksumSha1 = "5443887cfb5283da5021388d146ebb5febdc82e9"
$package_path = "$packageRoot\\$nugetPackage" $script:package_path = "$packageRoot\\$nugetPackage"
New-Item -ItemType Directory -Path "$packageRoot" New-Item -ItemType Directory -Path "$packageRoot"
Download $officialUrl $cachedUrl $package_path Download $officialUrl $cachedUrl $package_path
@ -16,11 +16,8 @@ Verify-Checksum $package_path $sdkChecksumSha1 sha1
Write-Host "Installing Nuget" Write-Host "Installing Nuget"
Run-Executable "$package_path" "install Microsoft.WindowsAppSDK -OutputDirectory $packageRoot" Run-Executable "$package_path" "install Microsoft.WindowsAppSDK -OutputDirectory $packageRoot"
if ([System.Environment]::Is64BitProcess) { $script:cpuarch = Get-CpuArchitecture
$cppWinRt_path = "C:\Program Files*\Windows Kits\*\bin\*\x64\cppwinrt.exe" $script:cppWinRt_path = "C:\Program Files*\Windows Kits\*\bin\*\$cpuarch\cppwinrt.exe"
} else {
$cppWinRt_path = "C:\Program Files*\Windows Kits\*\bin\*\x86\cppwinrt.exe"
}
if (Resolve-Path -Path $cppWinRt_path) { if (Resolve-Path -Path $cppWinRt_path) {
$cppWinRt_path = $(Resolve-Path -Path $cppWinRt_path).Path $cppWinRt_path = $(Resolve-Path -Path $cppWinRt_path).Path
@ -30,20 +27,13 @@ else {
$cppWinRt_path = $(Resolve-Path -Path "$packageRoot\\Microsoft.Windows.CppWinRT.*\\bin\\cppwinrt.exe").Path $cppWinRt_path = $(Resolve-Path -Path "$packageRoot\\Microsoft.Windows.CppWinRT.*\\bin\\cppwinrt.exe").Path
} }
$winAppSDK_path = $(Resolve-Path -Path "$packageRoot\Microsoft.WindowsAppSDK.*").Path $script:winAppSDK_path = $(Resolve-Path -Path "$packageRoot\Microsoft.WindowsAppSDK.*").Path
$webview2_path = $(Resolve-Path -Path "$packageRoot\Microsoft.Web.WebView*").Path $script:webview2_path = $(Resolve-Path -Path "$packageRoot\Microsoft.Web.WebView*").Path
Write-Output "CppWinRT Path = $cppWinRt_path" Write-Output "CppWinRT Path = $cppWinRt_path"
Write-Output "WindowsAppSdk Path = $winAppSDK_path" Write-Output "WindowsAppSdk Path = $winAppSDK_path"
Write-Output "WebView2 Path = $webview2_path" Write-Output "WebView2 Path = $webview2_path"
if ([System.Environment]::Is64BitProcess) { Set-EnvironmentVariable "WIN_APP_SDK_ROOT_PATH" "$winAppSDK_path"
Set-EnvironmentVariable "WIN_APP_SDK_ROOT_x64" "$winAppSDK_path" Set-EnvironmentVariable "WEBVIEW2_SDK_ROOT_PATH" "$webview2_path"
Set-EnvironmentVariable "WEBVIEW2_SDK_ROOT_x64" "$webview2_path" Set-EnvironmentVariable "CPP_WIN_RT_PATH_$cpuarch" "$cppWinRt_path"
Set-EnvironmentVariable "CPP_WIN_RT_PATH_x64" "$cppWinRt_path"
} else {
Set-EnvironmentVariable "WIN_APP_SDK_ROOT_x86" "$winAppSDK_path"
Set-EnvironmentVariable "WEBVIEW2_SDK_ROOT_x86" "$webview2_path"
Set-EnvironmentVariable "CPP_WIN_RT_PATH_x86" "$cppWinRt_path"
}

View File

@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\winappsdk.ps1"

View File

@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\winappsdk.ps1"

View File

@ -0,0 +1 @@
. "$PSScriptRoot\..\common\windows\winappsdk.ps1"