QMLrocks

Deployment

Wow, you're QML application works like a charm and you want to send it to a friend who wanna try it ? Then we need to deploy it, and this is the trickiest part.

Again, there are a lot of different ways to do this. Here we will only present a shared libraries approach, to avoid problems with licenses (especially if you are using plugins).

Windows

An amazing tool has been written to make Windows deployment easier : windeployqt.

// TODO

OS X

You're lucky, there is an equivalent tool for OS X : macdeployqt.

After the compilation part, you should have a .app bundle in your working directory, ours is helloworld-qml.app. Open your terminal and run the folowing command :

$ macdeployqt helloworld.app

After a couple of seconds, the process will finish (there is no output if you don't add a --verbose argument). This tool has just copied some Qt and system libraries to your bundle, updating the paths. But we have one more thing to do if we are using qml plugins (as QML-Material).

To do so, right-click on your .app in Finder, and choose Explore Contents. Create a subfolder in Resources named qml, and drag and drop your plugins directories to this folder.

After that, we need to edit the file qt.conf, and explicit the paths to our Qt plugins.

/// qt.conf example

We're done ! Copy your .app bundle to another place, like on your desktop. And run it, to check if it's still working. If yes, you can rename your Qt installation folder to another name, like Qtfree, to test if your app is now working on a clean and Qt-free environment, and if it runs fine, it means you made it ! You can now zip it and share it. If not, then you missed something. Try to recompile and do these deployment steps again.

// TODO

Linux

Sadly, there is no simple tool available on Linux.

// TODO (portable + aur package + debian)

Ubuntu Touch

// TODO

Android

// TODO