Add entries to Info.plist in Qt
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, eg, @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.
链接地址: http://www.djcxy.com/p/13848.html上一篇: Rails 4映像目录不再存在于资产中
下一篇: 将条目添加到Qt中的Info.plist