Automatically add Version/App Name/Activity/etc from *.pro file to AndroidManufest.xml. How?



  • Hello all!
    Is there any way to add automatically values that will be setting up into AndroidManifest.xml at time of building? Something like for Info.plist for iOS, something like this:

    QMAKE_INFO_PLIST = $$PWD/platforms/ios/phone/Info.plist
    plistupdate.commands = /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $$VERSION" $$QMAKE_INFO_PLIST
    plistupdate.commands = /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $$VERSION" $$QMAKE_INFO_PLIST
    QMAKE_EXTRA_TARGETS += plistupdate
    PRE_TARGETDEPS += plistupdate
    

  • Moderators

    You can use QMAKE_SUBSTITUTES for that. An example of how to use it https://wiki.qt.io/QMake-top-level-srcdir-and-builddir#Solution


Log in to reply