In Qt, it is possible to specify an Info.plist
file to use when building on Mac, as follows:
QMAKE_INFO_PLIST = MyInfo.plist
This replaces the Qt auto-generated Info.plist
file with another one.
Rather than replace Qt's auto generated one entirely, is it possible to add individual entries?
I don't think it will make little practical difference but I'd like to be able to do it because I feel it would be "tidier" to just add the additional items I want rather than brutally replace the whole file.
Unfortunately this is impossible. But Qt makes your life easier with some variables that you can use in plist
file. From Qt documentation:
In the .plist file, you can define some variables, e.g., @EXECUTABLE@, which qmake will replace with the actual executable name. Other variables include @ICON@, @TYPEINFO@, @LIBRARY@, and @SHORT_VERSION@.
Find a file named 'Info.list.app'. This is the template of Info.list. You can use it as a start point and append you own entries. It is typically location like Qt5.7.0/Src/qtbase/mkspecs/macx-ios-clang/Info.plist.app in your QT root dir.
See Qt documentation for more detail.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With