Executables should have embedded plist on macOS
Host environment
- Operating system: macOS
- Architecture: x86 or ARM
- QEMU flavor: Any
- QEMU version: 7.0.0 (probably any)
Description of problem
QEMU binaries on macOS should have an embedded property list (plist
).
The bundle identifier of an application, as well as many other settings, are usually not set programmatically but through an Info.plist
file found within the application bundle (.app
) which is a property list (basically a settings file in XML format).
When liking a command line binary, you can tell the linker to embed such a property list inside the binary and the system will respect that when loading the binary. Having an embedded Info.plist
is highly recommended for all macOS applications, even command line tools, as many system features will not work correctly (or are not even possible) unless they have one (not in all places the binary name will work instead of a bundle identifier).
All you need to do is writing a plist file by hand (for a list of available keys, see Apple's documentation) and then tell the liker to embed it into the binary:
-sectcreate __TEXT __info_plist YourPlistFile.plist
This makes it far easier to set app specific settings correctly, as in #334 for example. Also things like sudden termination can be disabled completely that way without a single line of code.