iOS, FFmpeg: Add documentation/commenting

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 <artem.dyomin@qt.io>
Reviewed-by: Nils Petter Skålerud <nils.petter.skalerud@qt.io>
This commit is contained in:
Nils Petter Skålerud
2026-02-11 09:39:22 +01:00
committed by Artem Dyomin
parent 919a4ae240
commit c3fe5fe6fe

View File

@@ -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"