Qt Base (Core, Gui, Widgets, Network, ...)
Go to file
Maximilian Blochberger d65a45d2bc Fail builds on Apple platforms with invalid Info.plist
Information property lists (Info.plist) files are part of application
bundles on Apple platforms and contain basic information about the
application, such as the name of the application's executable.

The Info.plist file can have multiple formats, such as binary or XML.
Makefiles generated by qmake convert Info.plist files to XML by default,
so that variables in the Info.plist can be substituted with values
defined by qmake, such as the name of the application's executable. This
is important if users use external tools such as Xcode for modifying the
Info.plist file, which may save it in binary format. To convert the
formats, the plutil tool shipped with macOS (or the Xcode command-line
tools) is used. The Unix tool sed is then used to actually substitute
variables.

If the Info.plist file is invalid, e.g., due to an invalid tag name, the
plutil invocation fails. However, the converted plist is piped into sed
for variable substitution. The plutil command will simply write an error
message to standard out and return with a non-zero exit code. Due to the
pipe chain, make will not fail and the error message will end up in the
Info.plist in the built application bundle. The application bundle is
then invalid as well, as vital information such as the name of the
executable of the application is missing.

The change ensures that the pipe chain fails, if plutil exits with a
non-zero exit code.

The issue was introduced with my solution for QTBUG-45357. Beforehand,
Info.plists and mistakes therein were simply copied into the application
bundle.

[ChangeLog][qmake] Fail builds on Apple platforms if the Info.plist is
invalid instead of generating corrupt application bundles.

Pick-to: 6.5 6.9 6.10
Change-Id: Ibdb2a18e9bbf35a654af8534aa61188f8389c55a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2025-07-04 15:02:22 +02:00
.github/workflows
LICENSES Merge Wayland client from qtwayland repository into qtbase 2025-05-13 01:50:43 +02:00
bin CMake: Don't hard-code "libexec" in qt-configure-module 2024-08-16 12:36:35 +02:00
cmake CMake:Android: add ANDROID_PLATFORM to Core.json 2025-07-03 19:04:44 +00:00
coin Increase timeout for copying test log 2025-07-03 10:48:33 +03:00
config.tests CMake: Remove superfluous precompile_header feature and config test 2025-03-07 12:02:47 +01:00
dist Add REUSE.toml files 2024-11-05 14:36:16 +01:00
doc Android: update to Gradle 8.14.2 and AGP 8.10.1 2025-06-28 03:52:49 +03:00
examples Add missing qquaternion.h includes 2025-06-30 19:45:40 +02:00
lib
libexec Android: fix warnings in runner script 2024-12-03 20:18:21 +00:00
mkspecs Build system: support C++2c 2025-07-03 11:49:20 +00:00
qmake Fail builds on Apple platforms with invalid Info.plist 2025-07-04 15:02:22 +02:00
src Mark src/corelib/global with security score 2025-07-04 13:52:20 +02:00
tests Fail builds on Apple platforms with invalid Info.plist 2025-07-04 15:02:22 +02:00
util cldr2qlocalexml/localetools: Open files as UTF-8 2025-07-03 13:49:55 +02:00
.cmake.conf Bump minimum requirement for visionOS to version 2 2025-06-20 15:25:11 +02:00
.gitattributes
.gitignore
.gitreview Add .gitreview file 2025-03-24 23:19:04 +01:00
.tag
CMakeLists.txt CMake: Don't unconditionally enable the ASM language 2025-05-02 18:13:14 +02:00
REUSE.toml Add q23::expected as a private type 2025-05-25 23:09:56 +02:00
config_help.txt Add jemalloc support 2025-04-09 13:49:11 +02:00
configure Do not assume FHS in scripts 2024-06-25 11:44:00 +02:00
configure.bat configure.bat: Use call when calling the helper cmake scripts 2025-01-30 22:18:36 +01:00
configure.cmake Build system: support C++2c 2025-07-03 11:49:20 +00:00
dependencies.yaml
licenseRule.json Add q23::expected as a private type 2025-05-25 23:09:56 +02:00
qt_cmdline.cmake Build system: support C++2c 2025-07-03 11:49:20 +00:00