From c3fe5fe6feecd60188b8e4a0133a416574e956b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Petter=20Sk=C3=A5lerud?= Date: Wed, 11 Feb 2026 09:39:22 +0100 Subject: [PATCH] iOS, FFmpeg: Add documentation/commenting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds more commenting + documentation to the script 'install-ffmpeg-ios.sh'. Pick-to: 6.11 6.10 6.8 Change-Id: I7e0023651b868d46b3fb4604bcc6d3eb1d24b7b2 Reviewed-by: Artem Dyomin Reviewed-by: Nils Petter Skålerud --- .../common/macos/install-ffmpeg-ios.sh | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/coin/provisioning/common/macos/install-ffmpeg-ios.sh b/coin/provisioning/common/macos/install-ffmpeg-ios.sh index fbb893b5..acefc2d1 100755 --- a/coin/provisioning/common/macos/install-ffmpeg-ios.sh +++ b/coin/provisioning/common/macos/install-ffmpeg-ios.sh @@ -2,8 +2,22 @@ # Copyright (C) 2024 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -# This script will build and install FFmpeg static libs -# Can take an optional final parameter to control installation directory +# This script will build and install FFmpeg shared libraries. +# +# The script will package iOS and iOS-simulator binaries into one +# single .xcframework. This .xcframework cannot contain .dylibs +# directly. It must contain .framework files. Unlike macOS, binaries +# should NOT be lipoed together. +# +# From https://developer.apple.com/documentation/xcode/creating-a-multi-platform-binary-framework-bundle +# "Avoid using dynamic library files (.dylib files) for dynamic +# linking. An XCFramework can include dynamic library files, but only +# macOS supports these libraries for dynamic linking. Dynamic linking +# on iOS, iPadOS, tvOS, visionOS, and watchOS requires the XCFramework +# to contain .framework bundles." +# +# This script can take an optional final parameter to control +# installation directory. set -eoux pipefail # Must match or be lower than the minimum iOS version supported by the version of Qt that is @@ -158,6 +172,13 @@ build_info_plist() { # This includes creating a folder for it, and inserting Info.plist # and dylib. We also patch runpaths in the dylib to match the # frameworks directory structure. +# +# There is no command-line tool for generating .framework +# files. By inspecting .frameworks generated through Xcode, we +# have found they are primarily a directory with a very specific +# layout. The code below generates a matching layout. +# +# See https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Frameworks.html create_framework() { local ffmpeg_component_name="$1" local platform="$2"