Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finished coding desktop app in Qt. How to deploy and distribute it?

Ok, this is indeed a newbish question but I have to take a first step somewhere.

I've just had experience with DevC++ console applications, which means a simple .exe would be produced from the compiling, running from cmd. That was all, you could send the .exe to a gentleman running the same OS and he could run your little program.

What happens with Qt Creator projects, though? I've finally finished my dekstop application, wrote and debugged everything that needed to be done, I sort of have some nice GUI going, everything's working nice but... How do I acually give it to other people that don't have QtC to run it through?

Any guide that covers this?

like image 798
Dimitris Sfounis Avatar asked May 30 '12 20:05

Dimitris Sfounis


People also ask

How do I deploy a Qt program in Windows?

To deploy the application, we must make sure that we copy the relevant Qt DLLs (corresponding to the Qt modules used in the application) and the Windows platform plugin, qwindows. dll , as well as the executable to the same directory tree in the release subdirectory.

How do I create a standalone Qt application?

To build the Qt project as a standalone executable file run qmake and nmake. After that you should execute mt.exe to embed a manifest inside the application to avoid error such as missing MSVCP90. dll when the application is started on other computers.


3 Answers

Deployment
Here are some guides helping you to deploy your application on different platforms:

  • X11
  • Windows
  • Mac OS X
  • Embedded Linux
  • Symbian

Installation
I can highly recommend

  • NSIS
  • Inno Setup

Distribution
Have a look at this site. Here you can present your application to others and let them download it.


The subject of your question is simple, but I'm sure it will help many people! Your question is a good contribution.

like image 121
Exa Avatar answered Oct 08 '22 12:10

Exa


Well, last thing you do is find out dependencies - shared libraries, and squeeze that all into installer. :)

Resources:

Qt has a nice page called Deploying an Application on Windows, as a part of their documentation. So all the dependencies related stuff is covered there.

List of best free installers is available here.

like image 35
Andrejs Cainikovs Avatar answered Oct 08 '22 12:10

Andrejs Cainikovs


My suggestion is to invest some time in writing a CMake script and then using CPack for the distribution.

Here is a very simple example http://www.cmake.org/Wiki/BundleUtilitiesExample

with this you are able to deploy a mac application. Then you can also extend it to create Debian or RPM packages!

The CMake mailing list is always a source of useful suggestion.

In windows you probably have to redistribute the Qt DLL with your program, as well as for Mac you have to include Qt libraries in your bundle.

like image 31
linello Avatar answered Oct 08 '22 10:10

linello