diff options
author | Artem Dyomin <artem.dyomin@qt.io> | 2023-12-19 12:59:42 +0100 |
---|---|---|
committer | Artem Dyomin <artem.dyomin@qt.io> | 2024-02-02 07:23:19 +0000 |
commit | 0fe99775c04769a00c35614d4fad8b62eedb775d (patch) | |
tree | 8f86fae9b0b9e8cc49c6ee3a772a1215087c72e1 /coin/provisioning/common | |
parent | 483694d725177c28d58d1ac4a94c1a6ae4ddeaea (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.7 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>
Diffstat (limited to 'coin/provisioning/common')
-rw-r--r-- | coin/provisioning/common/windows/install-ffmpeg.ps1 | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/coin/provisioning/common/windows/install-ffmpeg.ps1 b/coin/provisioning/common/windows/install-ffmpeg.ps1 index 77ea1824..ced26144 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("MINGW_PATH", [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 { |