Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Deploy application and Installer



  • I am currently working on a legacy application. I'm using Qt Creator 4.7.1. My problem is I do not understand the procedure described in the Qt documentation. I have the application source code. I build the release version. I can run windeployqt.exe in the release application directory. That does not create the installer. The Qt Installer Framework seems to be what creates the installer; but how do I link the source code to the installer. Does anyone have a clear understanding of the procedure to create the installer?

    http://doc.qt.io/qtinstallerframework/ifw-creating-installers.html

    The link above goes through some steps that I have followed but I can't find where the application is actually linked to the installer. I ran the tutorial but the installer output did not do anything.

    Perhaps I'm missing something. Any help is appreciated. Thanks.

    ndijkhoffz


  • Moderators

    @ndijkhoffz said in Deploy application and Installer:

    Perhaps I'm missing something. Any help is appreciated. Thanks.

    Yes. There is no magical link between your application and the installer. They are 2 completely separate things. You don't have to use either of them.

    Here's, in short, how it works:

    • when you compile your app, you get an executable
    • that executable does not have any libraries around it, it's just a bare EXE. It won't run on other PCs by itself
    • if you want to get something that will work on another PC, you need the dependencies. That's what windeployqt.exe does for you - it automatically copies all necessary DLLs to the same directory that your EXE resides in
    • now you have something that will work on other PCs - you just need to copy the whole directory (exe + dlls)
    • if you want an installer, then first you need to choose installer technology: Qt has Qt Installer Framework, sure, but you can also use others (InstallShield, Bitrock, Nullsoft installer, and many, many others)
    • if you choose QtIFW like you seem to have done, you need to follow the IFW manual. So, put your whole directory into a package dir, add some meta information, and then you're ready to go

    If you have any specific questions, post them on this forum and we'll help you :-) I know it can be a bit overwhelming at first, but once you learn a bit more how it works, it is not particularly hard.



  • @sierdzio I was able to deploy with the windeployqt.exe --compiler-runtime. This did the trick. Thanks.


Log in to reply