Getting QMake to generate a proper .app

爷,独闯天下 提交于 2019-12-04 13:56:11
Jérôme

I'm sure this could be of some great help for you :

deployqt

Hope this helps !

We have the same problem at Last.fm, I looked at DeployQt and it's not much use if you have third party libraries. In the end I wrote a perl script that generates a Makefile, which you can use to generate a .app and/or .dmg.

I uploaded it here: http://www.methylblue.com/detritus/QMake.dmg/

To use it add this to your application's pro file:

 macx*:!macx-xcode:release {
     system( QT=\'$$QT\' QMAKE_LIBDIR_QT=\'$$QMAKE_LIBDIR_QT\' $$ROOT_DIR/common/dist/mac/Makefile.dmg.pl $$DESTDIR $$VERSION $$LIBS > Makefile.dmg )
     QMAKE_EXTRA_INCLUDES += Makefile.dmg   
}

I'm sure it's not all yet portable, but it would be good for someone else to use and see if that is so.

This is basically the first official release of this code, so please send me bug reports, and also, improvements. Thanks.

Andy Brice

I side-stepped this problem completely by building my Qt app statically on OS X. That might not be practical for you though.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!