Deploying a QT Application on OS X and Linux

What is the best way to deploy a QT application? I read the documentation hosted by trolltech, but is it better to link it to a static library or dynamic libraries and set up a custom structure? I really don't want anyone using my application to download the 160mb framework in order to run a simple gui interface.

+3
source share
3 answers

Unfortunately, you will have to include the Qt libraries you need in your own package, since you cannot expect your users to have Qt installed on a Mac (whereas on Linux systems you will need at least a predefined Qt version for packaging .

There is a good tool to help you with this, called macdeployqt. You just need to call it in the application of your package, and it will pack the necessary libraries by changing the link of your binary to reference them. Without it, creating packages for the Mac is a real pain (it is still, but much less).

http://doc.trolltech.com/4.6/deployment-mac.html#the-mac-deployment-tool

Then you can make a .dmg image just like with any other application. Macdeployqt has an option that creates a base file.

+2

OS X ".app" macdeployqt, Qt, 4.5.

Qt, , , , .

, , :

  • , , , ( project.pro QT += core gui network xml).
  • "Qt-" . macdeployqt Qt, .
  • , release. Qt4, (, 90 16 ). , .
  • , UPX, 40-50%.

, .

QtGui, QtNetwork, QtCore QtXml, 16 .

, .

+3

Linux Qt, ​​- OS X .

+2

Source: https://habr.com/ru/post/1730637/


All Articles