Search code examples
c++qtexerelease

Easiest way to release a Qt C++ GUI program?


I am making a Qt 5.0.2 C++ GUI program that I want to release to a single .exe file. In the past, I have made simple console applications with Visual Studio 2008 and releasing it was easy and I like to "debug" my program in it's released state.

With that being said, I know that releasing a program in Qt requires a bunch of Qt libraries to go along with it. Another option was to use an installer?

I really want to avoid complicated things for my users. (They are generally young) So a simple, standalone exe would be ideal.

Any ways of doing this? :)

EDIT: This is not the same as the "duplicate" post. lpapp has decided to go to almost all of my questions and falsely mark them as duplicates even though they are not all over an argument. This question is not about bug fixing a release or finding out why it doesn't work, it is about finding the easiest way to release a program so that the users don't have to jump through lots of hoops to run my program.


Solution

  • Write an installer for it.

    On windows, InnoSetup is very easy & quick to use.

    You will need to include the Qt dll's you need. Additionally you will need to make sure that any plugins you use (e.g. if you open png or jpeg files) are distributed correctly, consult the Qt documentation about this. Test the install on a computer (or virtual machine) that you have not installed the Qt SDK on to make sure that it works.

    You will also need to deploy the VS2008 runtime distributable too if you dynamically link to it (the default).