aboutsummaryrefslogtreecommitdiffstats
path: root/coin
diff options
context:
space:
mode:
authorArtem Dyomin <artem.dyomin@qt.io>2023-12-19 12:59:42 +0100
committerArtem Dyomin <artem.dyomin@qt.io>2024-02-18 14:45:21 +0000
commit37aed11625bf4b8feffd4090b370eb97fb05cd34 (patch)
treea392baea66cd0f996fc55fff9e4ec6adbfb4bbcb /coin
parent82db8fadea63d580c92209bf7b294951657b8ef2 (diff)
Enable ffmpeg shared libs shipping for Windows targets
We have to replace static linkage with dynamic one due to licensing issues. The related patch in QtMM codereview.qt-project.org/c/qt/qtmultimedia/+/523405 introduces cmake var QT_DEPLOY_FFMPEG that enables deployment of ffmpeg shared libs to the installation lib dir or the build lib dir (for dev builds). These are build/tests results for the current CR together with the patch in QtMM testresults.qt.io/coin/integration/qt/qtmultimedia/tasks/web_rescheduled_qt_qtmultimedia_1703082976669 The related patch codereview.qt-project.org/c/qt/qtbase/+/525100 fixes the deployment tool on Windows. The plan is to have the set of changes for Windows in 6.5.4, 6.6.2, 6.7.0. It was agreed that we want to backport shared ffmpeg to 6.6 and 6.5. Pick-to: 6.6 6.5 Change-Id: Ie4d8621a98fb93715c32e49c830bfd715ed0e8a5 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 0fe99775c04769a00c35614d4fad8b62eedb775d)
Diffstat (limited to 'coin')
-rw-r--r--coin/platform_configs/cmake_platforms.yaml22
-rw-r--r--coin/provisioning/common/windows/install-ffmpeg.ps110
2 files changed, 17 insertions, 15 deletions
diff --git a/coin/platform_configs/cmake_platforms.yaml b/coin/platform_configs/cmake_platforms.yaml
index 030d031f..fd5b099c 100644
--- a/coin/platform_configs/cmake_platforms.yaml
+++ b/coin/platform_configs/cmake_platforms.yaml
@@ -69,7 +69,7 @@ Configurations:
Environment variables: [
'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_x64}}\..',
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_msvc}}',
- 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DFEATURE_native_grpc=OFF',
+ 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DQT_DEPLOY_FFMPEG=TRUE -DFEATURE_native_grpc=OFF',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
]
-
@@ -80,7 +80,7 @@ Configurations:
Configure arguments: '-debug-and-release -force-debug-info -headersclean -nomake examples -qt-zlib'
Environment variables: [
'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_x64}}\..',
- 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DFEATURE_native_grpc=OFF',
+ 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DQT_DEPLOY_FFMPEG=TRUE -DFEATURE_native_grpc=OFF',
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_msvc}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
]
@@ -92,7 +92,7 @@ Configurations:
Configure arguments: '-debug-and-release -force-debug-info -headersclean -nomake examples -qt-zlib'
Environment variables: [
'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_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}} -DFEATURE_native_grpc=OFF',
+ 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DQT_DEPLOY_FFMPEG=TRUE -DFEATURE_native_grpc=OFF',
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_msvc}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
]
@@ -104,7 +104,7 @@ Configurations:
Configure arguments: '-debug-and-release -force-debug-info -headersclean -nomake examples -qt-zlib'
Environment variables: [
'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_x64}}\..',
- 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DFEATURE_native_grpc=OFF',
+ 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}} -DQT_DEPLOY_FFMPEG=TRUE -DFEATURE_native_grpc=OFF',
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_msvc}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_msvc}}',
]
@@ -116,7 +116,7 @@ Configurations:
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}}\..',
- 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}}',
+ '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}}',
]
@@ -144,7 +144,7 @@ Configurations:
Configure arguments: '-debug-and-release -make examples -developer-build -force-debug-info -qt-zlib -c++std c++20'
Environment variables: [
'CMAKE_ARGS=-DFEATURE_msvc_obj_debug_info=ON -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\..',
- 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MSVC}}',
+ '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}}',
]
@@ -213,7 +213,7 @@ Configurations:
Environment variables: [
'Path={{.Env.MINGW1120}}\bin;{{.Env.Path}}',
'CMAKE_ARGS=-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_x64}}\.. -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
- 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MINGW}} -DFEATURE_native_grpc=OFF -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
+ 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MINGW}} -DQT_DEPLOY_FFMPEG=TRUE -DFEATURE_native_grpc=OFF -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_mingw}}',
'Protobuf_ROOT={{.Env.Protobuf_ROOT_mingw}}',
]
@@ -226,7 +226,7 @@ Configurations:
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',
- 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_LLVM_MINGW}} -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
+ '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}}',
]
@@ -239,7 +239,7 @@ Configurations:
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',
- 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_LLVM_MINGW}} -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c',
+ '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}}',
]
@@ -252,7 +252,7 @@ Configurations:
Environment variables: [
'Path={{.Env.MINGW1120}}\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',
- 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MINGW}} -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c -DFEATURE_native_grpc=OFF',
+ '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}}',
]
@@ -265,7 +265,7 @@ Configurations:
Environment variables: [
'Path={{.Env.MINGW1120}}\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',
- 'NON_QTBASE_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_MINGW}} -DCMAKE_IGNORE_PREFIX_PATH=C:/strawberry/c -DFEATURE_native_grpc=OFF',
+ '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/install-ffmpeg.ps1 b/coin/provisioning/common/windows/install-ffmpeg.ps1
index 9df91897..3d08bc99 100644
--- a/coin/provisioning/common/windows/install-ffmpeg.ps1
+++ b/coin/provisioning/common/windows/install-ffmpeg.ps1
@@ -32,7 +32,8 @@ function InstallFfmpeg {
[string]$msystem,
[string]$additionalPath,
[string]$ffmpegDirEnvVar,
- [string]$toolchain
+ [string]$toolchain,
+ [bool]$shared
)
Write-Host "Configure and compile ffmpeg for $buildSystem"
@@ -47,6 +48,7 @@ function InstallFfmpeg {
$cmd += " && mkdir -p build/$buildSystem && cd build/$buildSystem"
$cmd += " && ../../configure --prefix=installed $config"
if ($toolchain) { $cmd += " --toolchain=$toolchain" }
+ if ($shared) { $cmd += " --enable-shared --disable-static" }
$cmd += " && make install -j"
Write-Host "MSYS cmd:"
@@ -66,7 +68,7 @@ function InstallFfmpeg {
function InstallMingwFfmpeg {
$mingwPath = [System.Environment]::GetEnvironmentVariable("MINGW1120", [System.EnvironmentVariableTarget]::Machine)
- return InstallFfmpeg -buildSystem "mingw" -msystem "MINGW" -additionalPath "$mingwPath\bin" -ffmpegDirEnvVar "FFMPEG_DIR_MINGW"
+ return InstallFfmpeg -buildSystem "mingw" -msystem "MINGW" -additionalPath "$mingwPath\bin" -ffmpegDirEnvVar "FFMPEG_DIR_MINGW" -shared $true
}
@@ -76,7 +78,7 @@ function InstallMsvcFfmpeg {
return $false
}
- $result = InstallFfmpeg -buildSystem "msvc" -msystem "MSYS" -toolchain "msvc" -ffmpegDirEnvVar "FFMPEG_DIR_MSVC"
+ $result = InstallFfmpeg -buildSystem "msvc" -msystem "MSYS" -toolchain "msvc" -ffmpegDirEnvVar "FFMPEG_DIR_MSVC" -shared $true
if ($result) {
# As ffmpeg build system creates lib*.a file we have to rename them to *.lib files to be recognized by WIN32
@@ -99,7 +101,7 @@ function InstallMsvcFfmpeg {
function InstallLlvmMingwFfmpeg {
- return InstallFfmpeg -buildSystem "llvm-mingw" -msystem "CLANG64" -ffmpegDirEnvVar "FFMPEG_DIR_LLVM_MINGW" -additionalPath "C:\llvm-mingw\bin"
+ return InstallFfmpeg -buildSystem "llvm-mingw" -msystem "CLANG64" -ffmpegDirEnvVar "FFMPEG_DIR_LLVM_MINGW" -additionalPath "C:\llvm-mingw\bin" -shared $true
}
function InstallAndroidArmv7 {