From 07468c501431d003e2a5a615031613f3cf113499 Mon Sep 17 00:00:00 2001 From: Heikki Halmet Date: Tue, 5 Apr 2022 14:39:55 +0300 Subject: [PATCH] Install static OpenSSL libs for IFW Script will install static OpenSSL libs for x86 (created with MSVC2015) and for x64 (created with MSVC2019). Older openssl version 1.1.1l was used because with 1.1.1m there was an issue with dynamic libraries. Task-number: QTQAINFRA-4885 Task-number: QTQAINFRA-4883 Change-Id: Ie90d80b816bad1871dab6cac19dc350051d50008 Reviewed-by: Katja Marttila --- coin/provisioning/common/windows/openssl.ps1 | 27 +++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/coin/provisioning/common/windows/openssl.ps1 b/coin/provisioning/common/windows/openssl.ps1 index 4dcf58fe..d5409541 100644 --- a/coin/provisioning/common/windows/openssl.ps1 +++ b/coin/provisioning/common/windows/openssl.ps1 @@ -92,13 +92,26 @@ Set-EnvironmentVariable "OPENSSL_LIB_x86" "$installFolder\lib" # For installer framework we need static OpenSSL . # For static runtime build we need static only version from openssl libs -$static_lib_url = "http://ci-files01-hki.intra.qt.io/input/openssl/opensslx86_static-1-1.1d.7z" -$static_package = "C:\Windows\Temp\opensslx86_static-1-1.1d.7z" -Download $static_lib_url $static_lib_url $static_package -Extract-7Zip $static_package C:\Utils\ -Set-EnvironmentVariable "STATIC_OPENSSL_LIB_x86" "C:\Utils\opensslx86_static\lib" -Set-EnvironmentVariable "STATIC_OPENSSL_INCLUDE_x86" "C:\Utils\opensslx86_static\include" -Remove-Item -Path $static_package +function InstallStaticOpenssl { + + Param ( + [string]$compressed_static_openssl, + [string]$arch + ) + + $url = "http://ci-files01-hki.intra.qt.io/input/openssl/$compressed_static_openssl.7z" + $static_openssl_package = "C:\Windows\Temp\$compressed_static_openssl.7z" + Download $url $url $static_openssl_package + Extract-7Zip $static_openssl_package C:\Utils\ + Set-EnvironmentVariable "STATIC_OPENSSL_LIB_$arch" "C:\Utils\$compressed_static_openssl\lib" + Set-EnvironmentVariable "STATIC_OPENSSL_INCLUDE_$arch" "C:\Utils\$compressed_static_openssl\include" + Remove-Item -Path $static_openssl_package +} + +# opensslx86_static.7z is same package as opensslx86_static-1-1.1d +InstallStaticOpenssl "opensslx86_static" "x86" +InstallStaticOpenssl "opensslx64_static-1_1_1l_msvc2019" "x64" + # Store version information to ~/versions.txt, which is used to print version information to provision log. Write-Output "OpenSSL = $version" >> ~/versions.txt