From 364c4851524cdfb60394b7fe329d051c1394832f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Petter=20Ska=CC=8Alerud?= Date: Tue, 13 May 2025 14:07:33 +0200 Subject: [PATCH] Coin, FFmpeg, iOS: Apply 'prefix' consistently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the provisioning script 'install-ffmpeg-ios.sh', we have a variable 'prefix' controlling where to install the finalized library. The value of this prefix is sometimes hardcoded into some of the temporary build directories, making the script break if we actually modify the 'prefix' variable. This means we currently cannot easily change the output directory. This patch modifies 'install-ffmpeg-ios.sh' so that the 'prefix' is applied consistently throughout the script, allowing us to change the output directory in the future. Pick-to: 6.8 Change-Id: I3458984aa22f8c82ed4d0bfac8ac8e71356e8789 Reviewed-by: Simo Fält (cherry picked from commit d72ace1a0d592072132d05a8fe38ebe0fdf2f7a7) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 2f2c8bf34725d3125fb9937a345a57625ab59552) --- coin/provisioning/common/unix/install-ffmpeg-ios.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coin/provisioning/common/unix/install-ffmpeg-ios.sh b/coin/provisioning/common/unix/install-ffmpeg-ios.sh index 2f6fbab4..cbf00c74 100755 --- a/coin/provisioning/common/unix/install-ffmpeg-ios.sh +++ b/coin/provisioning/common/unix/install-ffmpeg-ios.sh @@ -109,7 +109,7 @@ create_framework() { # Create a 'traditional' framework from the corresponding dylib. local framework_name="$1" local platform="$2" # For now it's either arm64 or arm64-simulator, see below. - local ffmpeg_library_path="$ffmpeg_source_dir/build_ios/${platform}/installed/usr/local/ios/ffmpeg" + local ffmpeg_library_path="$ffmpeg_source_dir/build_ios/${platform}/installed$prefix" local framework_complete_path="${ffmpeg_library_path}/framework/${framework_name}.framework/${framework_name}" sudo mkdir -p "${ffmpeg_library_path}/framework/${framework_name}.framework" @@ -139,8 +139,8 @@ create_xcframework() { local target_platform_a="$2" local target_platform_b="$3" - local fw_a="$ffmpeg_source_dir/build_ios/${target_platform_a}/installed/usr/local/ios/ffmpeg/framework/${framework_name}.framework" - local fw_b="$ffmpeg_source_dir/build_ios/${target_platform_b}/installed/usr/local/ios/ffmpeg/framework/${framework_name}.framework" + local fw_a="$ffmpeg_source_dir/build_ios/${target_platform_a}/installed$prefix/framework/${framework_name}.framework" + local fw_b="$ffmpeg_source_dir/build_ios/${target_platform_b}/installed$prefix/framework/${framework_name}.framework" sudo mkdir -p "$prefix/framework/" sudo xcodebuild -create-xcframework -framework $fw_a -framework $fw_b -output "${prefix}/framework/${framework_name}.xcframework" @@ -163,7 +163,7 @@ done # xcframeworks are already installed directly into the target output directory. # We need to install headers -sudo cp -r "$ffmpeg_source_dir/build_ios/arm64-iphoneos/installed/usr/local/ios/ffmpeg/include" $prefix +sudo cp -r "$ffmpeg_source_dir/build_ios/arm64-iphoneos/installed$prefix/include" $prefix # The set_ffmpeg_dir_env_var requires the presence of the "lib" subfolder in order to validate # our FFmpeg install. On iOS we don't use this subfolder, we only rely on the "framework" subfolder. # So we create a dummy "lib" folder to pass the check.