Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个会经常更改版本的应用程序,我不想像此解决方案那样在每个新版本中手动生成 info.plist 文件。
我试过这个片段:
QApplication a(argc, argv); a.setApplicationVersion(APP_VERSION); a.setOrganizationName(ORG_NAME); a.setOrganizationDomain(ORG_NAME);
但它不会改变任何事情,即使我删除应用程序包并制作一个新的......
我通过运行手工脚本解决了这个问题:
# For the plist version QMAKE_INFO_PLIST += $${TARGET}/data/default.plist QMAKE_POST_LINK += sed -i -e "s/@VERSION@/$$VERSION/g" "./$${TARGET}.app/Contents/Info.plist";