aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElias Toivola <elias.toivola@qt.io>2024-02-12 16:40:46 +0200
committerElias Toivola <elias.toivola@qt.io>2024-04-21 18:21:32 +0300
commit86c53b6cce6dd903fb0a602481dad06cd4f3f50f (patch)
treefd831a9e40fa4e44fa7408b265430e5b565a8b3b
parentbefe4a61d6c6987e40e1664448e925bdce9fb411 (diff)
Update MySQL and enable it for more Windows targets
Currently MySQL is enabled only for Windows 10 22h2 msvc2022 and it uses deprecated MySQL Connector/C. This change updates MySQL client library by replacing MySQL Connector/C with MySQL 8.0 Server package which contains a newer client library that works in other Windows targets. This change also enables MySQL in other non-packaging Windows 10/11 targets except ARM, as Windows on ARM still lacks MySQL support. Task-number: QTQAINFRA-4999 Fixes: QTBUG-106097 Change-Id: I4472d3e441668bada18268fc4486bbbeefc4afd6 Reviewed-by: Dimitrios Apostolou <jimis@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r--coin/platform_configs/cmake_platforms.yaml10
-rw-r--r--coin/provisioning/common/windows/mysql.ps119
2 files changed, 12 insertions, 17 deletions
diff --git a/coin/platform_configs/cmake_platforms.yaml b/coin/platform_configs/cmake_platforms.yaml
index 181c83fd..39972128 100644
--- a/coin/platform_configs/cmake_platforms.yaml
+++ b/coin/platform_configs/cmake_platforms.yaml
@@ -114,7 +114,7 @@ Configurations:
Features: ['Sccache', "DebugAndRelease", 'WarningsAreErrors', 'UseConfigure']
Configure arguments: '-debug-and-release -make examples -developer-build -force-debug-info -qt-zlib'
Environment variables: [
- 'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\..',
+ 'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DMySQL_ROOT={{.Env.ENV_MySQL_ROOT}} -DMySQL_LIBRARY_DIR={{.Env.ENV_MySQL_LIBRARY_DIR}}',
'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DQT_DEPLOY_FFMPEG=TRUE',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
'gRPC_ROOT={{.Env.gRPC_ROOT_msvc}}',
@@ -142,7 +142,7 @@ Configurations:
Features: ['Sccache', "DebugAndRelease", 'WarningsAreErrors', 'UseConfigure']
Configure arguments: '-debug-and-release -make examples -developer-build -force-debug-info -qt-zlib'
Environment variables: [
- 'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\..',
+ 'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DMySQL_ROOT={{.Env.ENV_MySQL_ROOT}} -DMySQL_LIBRARY_DIR={{.Env.ENV_MySQL_LIBRARY_DIR}}',
'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DQT_DEPLOY_FFMPEG=TRUE',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
'gRPC_ROOT={{.Env.gRPC_ROOT_msvc}}',
@@ -235,7 +235,7 @@ Configurations:
Configure arguments: '-release -force-debug-info -separate-debug-info -nomake examples'
Environment variables: [
'Path=C:\llvm-mingw\bin;{{.Env.Path}}',
- 'CMAKE_ARGS=-DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_x64}}\.. -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
+ 'CMAKE_ARGS=-DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_x64}}\.. -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c -DMySQL_ROOT={{.Env.ENV_MySQL_ROOT}} -DMySQL_LIBRARY_DIR={{.Env.ENV_MySQL_LIBRARY_DIR}}',
'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_LLVM_MINGW}} -DQT_DEPLOY_FFMPEG=TRUE -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
'LLVM_INSTALL_DIR=C:\llvm-mingw',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_llvm_mingw}}',
@@ -261,7 +261,7 @@ Configurations:
Configure arguments: '-developer-build -release -force-debug-info -separate-debug-info -make examples'
Environment variables: [
'Path={{.Env.MINGW_PATH}}\bin;{{.Env.Path}}',
- 'CMAKE_ARGS=-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
+ 'CMAKE_ARGS=-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c -DMySQL_ROOT={{.Env.ENV_MySQL_ROOT}} -DMySQL_LIBRARY_DIR={{.Env.ENV_MySQL_LIBRARY_DIR}}',
'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MINGW}} -DQT_DEPLOY_FFMPEG=TRUE -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c -DFEATURE_native_grpc=OFF',
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_mingw}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_mingw}}',
@@ -274,7 +274,7 @@ Configurations:
Configure arguments: '-developer-build -release -force-debug-info -separate-debug-info -make examples'
Environment variables: [
'Path={{.Env.MINGW_PATH}}\bin;{{.Env.Path}}',
- 'CMAKE_ARGS=-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
+ 'CMAKE_ARGS=-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c -DMySQL_ROOT={{.Env.ENV_MySQL_ROOT}} -DMySQL_LIBRARY_DIR={{.Env.ENV_MySQL_LIBRARY_DIR}}',
'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MINGW}} -DQT_DEPLOY_FFMPEG=TRUE -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c -DFEATURE_native_grpc=OFF',
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_mingw}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_mingw}}',
diff --git a/coin/provisioning/common/windows/mysql.ps1 b/coin/provisioning/common/windows/mysql.ps1
index 82037166..10a8b633 100644
--- a/coin/provisioning/common/windows/mysql.ps1
+++ b/coin/provisioning/common/windows/mysql.ps1
@@ -6,16 +6,12 @@
# This script installs MySQL $version.
# Both x86 and x64 versions needed when x86 integrations are done on x64 machine
-$version = "6.1.11"
+$version = "8.0.36"
$installFolder = "C:\Utils"
-$officialUrl = "https://downloads.mysql.com/archives/get/p/19/file/mysql-connector-c-${version}-winx64.zip"
-$officialUrlDebug = "https://downloads.mysql.com/archives/get/p/19/file/mysql-connector-${version}-winx64-debug.zip"
-$cacheURl = "http://ci-files01-hki.ci.qt.io/input/windows/mysql-connector-c-${version}-winx64.zip"
-$cacheURlDebug = "http://ci-files01-hki.ci.qt.io/input/windows/mysql-connector-c-${version}-winx64-debug.zip"
-$sha = "93e22a1ba3944a6c8e01d3ea04c1bfb005b238f9"
-$shaDebug = "d54088a9182e2f03b4d6f44c327e341eeab16367"
-$zip = Get-DownloadLocation ("mysql-connector-c-" + $version + "-winx64.zip")
-$zipDebug = Get-DownloadLocation ("mysql-connector-c-" + $version + "-winx64-debug.zip")
+$officialUrl = "https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-${version}-winx64.zip"
+$cacheURl = "http://ci-files01-hki.ci.qt.io/input/windows/mysql-${version}-winx64.zip"
+$sha = "e5003569386006ccde9000c98e28e28073c1433d"
+$zip = Get-DownloadLocation ("mysql-" + $version + "-winx64.zip")
function Install {
param(
@@ -32,11 +28,10 @@ function Install {
}
Install $officialUrl $cacheURl $zip $sha
-Install $officialUrlDebug $cacheURlDebug $zipDebug $shaDebug
# Can't set MySQL_ROOT & MySQL_LIBRARY_DIR variables. Those will enable mysql in every windows target.
# Let's use ENV_MySQL_* and use it in platform_configs
-Set-EnvironmentVariable "ENV_MySQL_ROOT" "${installFolder}\mysql-connector-c-${version}-winx64"
-Set-EnvironmentVariable "ENV_MySQL_LIBRARY_DIR" "${installFolder}\mysql-connector-c-${version}-winx64\lib\vs14"
+Set-EnvironmentVariable "ENV_MySQL_ROOT" "${installFolder}\mysql-${version}-winx64"
+Set-EnvironmentVariable "ENV_MySQL_LIBRARY_DIR" "${installFolder}\mysql-${version}-winx64\lib"
Write-Output "MySQL = $version" >> ~/versions.txt