[Interest] Deploying Qt to MacOs still...errr, sucks?

René J.V. Bertin rjvbertin at gmail.com
Mon Feb 9 19:07:47 CET 2015


On Monday February 09 2015 16:46:18 Daniel França wrote:
> Hi guys,
> I know the subject is a little rude, but 2 years ago I'd a lot of problems
> trying to deploy an app to OS X, as you can see here:
> http://stackoverflow.com/questions/20895398/cant-deploy-qt-5-2-quick-app-to-mac-osx
...
> I can't image that in 2 years no one cared about deployment on OSX.
> 
> Any feedback is welcome.

Any? Ok :)

FWIW, have a look at the Charm time tracker: https://github.com/KDAB/Charm . It uses cmake instead of bare qmake, but that might actually allow you to generate an Xcode project.

Anyway, it bundles the application for standard OS X style deployment in the install phase, using cmake scripts that I haven't tried to analyse but could serve as an example. The only thing it misses for some reason is the cocoa platform plugin. Rather annoying as nothing works without it of course, but probably easy enough to correct.

Just take care to invoke cmake such that it finds the appropriate qmake and cmake modules, e.g.

%> env PATH="/usr/local/qt/5/5.4/clang_64/bin:$PATH" cmake .. -DCMAKE_MODULE_PATH=/usr/local/qt/5/5.4/clang_64/lib/cmake

do a make followed by

%> make install DESTDIR=someplace

which will create someplace/Applications/ with a standalone Charm.app inside.

Sounds easy enough to me if you can address the platform plugin issue, and as I said, cmake is capable of generating Xcode projects, if Qt Creator's native support for cmake projects doesn't cut it for you.

Enjoy :)

R.



More information about the Interest mailing list