mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Linux, FFmpeg: Make install-ffmpeg-linux.sh take an output parameter
Currently, this script is hardcoded to output to the directory
'/usr/local/'. This output is stored in the variable 'prefix'. However,
this variable is used inconsistently in the script, meaning we cannot
actually modify the variable to change the output directory.
This patch does the following:
- Applies the 'prefix' variable where necessary.
- Allows an optional command-line parameter to be applied to 'prefix',
allowing one to specify where the output directory. This is
particularly useful for local builds.
No changes to current CI behavior.
Pick-to: 6.10 6.8
Change-Id: I51f83ce3844c2aa9db778b1c54091acb64a227e6
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
(cherry picked from commit e3966f2ffc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
committed by
Qt Cherry-pick Bot
parent
d9cdae957b
commit
99f5a9ba83
@@ -3,6 +3,10 @@
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# This script builds and installs FFmpeg static or shared (default) libs
|
||||
# It can take an optional output parameter for installation:
|
||||
#
|
||||
# install-ffmpeg-linx.sh shared ~/my/install/path
|
||||
|
||||
set -ex
|
||||
|
||||
source "${BASH_SOURCE%/*}/../unix/ffmpeg-installation-utils.sh"
|
||||
@@ -12,7 +16,8 @@ build_type=$(get_ffmpeg_build_type "$1")
|
||||
ffmpeg_source_dir=$(download_ffmpeg)
|
||||
ffmpeg_name=$(basename "$ffmpeg_source_dir")
|
||||
ffmpeg_config_options=$(get_ffmpeg_config_options "$build_type")
|
||||
prefix="/usr/local/$ffmpeg_name"
|
||||
default_prefix="/usr/local/$ffmpeg_name"
|
||||
prefix="${2:-$default_prefix}"
|
||||
pkgconfig_path="$PKG_CONFIG_PATH"
|
||||
|
||||
install_ff_nvcodec_headers() {
|
||||
@@ -95,5 +100,6 @@ if [ "$build_type" == "shared" ]; then
|
||||
"$fix_dependencies" "$output_dir"
|
||||
fi
|
||||
|
||||
sudo mv "$output_dir" "/usr/local"
|
||||
sudo mkdir -p "$prefix"
|
||||
sudo mv "$output_dir"/* "$prefix"
|
||||
set_ffmpeg_dir_env_var "FFMPEG_DIR" "$prefix"
|
||||
|
||||
Reference in New Issue
Block a user