From 9c7e564d7ef8787f7fe74a2bc8e9d84c00301ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Petter=20Ska=CC=8Alerud?= Date: Thu, 27 Mar 2025 10:35:45 +0100 Subject: [PATCH] Coin, iOS, FFmpeg: Stop installing .dylibs in iOS FFmpeg provisioning On iOS we no longer deploy FFmpeg .dylibs directly. As such, there is no need to install the .dylibs during provisoning. This patch removes this installation step during provisioning. Pick-to: 6.9 6.8 Change-Id: I6f901113caca4b8d602490ba05db0c9dacb8f80d Reviewed-by: Timur Pocheptsov --- .../common/unix/install-ffmpeg-ios.sh | 35 ++++--------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/coin/provisioning/common/unix/install-ffmpeg-ios.sh b/coin/provisioning/common/unix/install-ffmpeg-ios.sh index abdfbc1a..dd9fce19 100755 --- a/coin/provisioning/common/unix/install-ffmpeg-ios.sh +++ b/coin/provisioning/common/unix/install-ffmpeg-ios.sh @@ -60,33 +60,6 @@ build_ffmpeg_ios() { popd } -install_ffmpeg() { - for dir in "$@"; do - echo "Processing files in $dir ..." - pushd "$dir" >/dev/null - find . -type l -name '*.*.dylib' | while read -r f; do - dst="${f:1}" - dstdir="$(dirname "$dst")" - sudo mkdir -p "$dstdir" - - if [[ ! -f "$dst" ]]; then - echo "/dev/null 2>&1; then - echo "Lipoing $dir/$f into $dst" - sudo lipo -create -output "$dst" "$dst" "$f" - elif ! diff "$f" "$dst"; then - echo "Error: File $f in $dir doesn't match destination $dst" - exit 1 - fi - done - popd >/dev/null - done - sudo cp -r $1$prefix/include $prefix -} - build_info_plist() { local file_path="$1" local framework_name="$2" @@ -189,6 +162,12 @@ for name in $ffmpeg_libs; do create_xcframework $name "arm64-iphoneos" "x86_64-simulator" done -install_ffmpeg "$ffmpeg_source_dir/build_ios/arm64-iphoneos/installed" +# 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 +# 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. +sudo mkdir -p "${prefix}/lib" set_ffmpeg_dir_env_var "FFMPEG_DIR_IOS" $prefix