Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add entries to Info.plist in Qt

Tags:

info.plist

qt

qt5

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.

like image 881
Oliver Moran Avatar asked May 31 '13 11:05

Oliver Moran


2 Answers

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

like image 154
Evgeny Avatar answered Nov 10 '22 10:11

Evgeny


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.

like image 3
boyal Avatar answered Nov 10 '22 11:11

boyal