+ Reply to Thread
Results 1 to 4 of 4

Thread: Completed my first app and want to deploy

  1. #1
    Join Date
    Sep 2017
    Posts
    28
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Default Completed my first app and want to deploy

    I find it weird why Qt don't have a simple "Deploy" button to build a distributable build.
    Instead I read around it seems there need to use command line and copying files and folders
    here and there.

    But most the notes I read I can't make sense of. Anybody have a real noob step by step tutorial
    for this?

  2. #2
    Join Date
    Jan 2017
    Posts
    50
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Completed my first app and want to deploy

    You didn't write your OS, but generalyhttp://wiki.qt.io/Building_Qt_Installers. For Windows I suggest to use InnoSetup. Yes, you have to copy there a few dll files. You can use http://www.dependencywalker.com/ to check which dll's are important.
    I found this tutorial, you can try it as well - http://doc.qt.io/qt-5/windows-deploy...eployment-tool - your_qt_installpath/version/compiler/bin/windeployqt.exe YourApplication.exe.

  3. #3
    Join Date
    Jul 2017
    Posts
    24
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Completed my first app and want to deploy

    Before releasing a program, you should make sure that it works on several different operating systems. Then you make a source tarball. I use CMake, so I use CPack to make the source tarball; if you use qmake, I'll let someone else explain that. Once you have the source tarball, publish it so that others can compile and run it.

  4. #4
    Join Date
    Sep 2017
    Posts
    28
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: Completed my first app and want to deploy

    Anyways.

    I managed to solve it by asking in StackOverflow. Here is the details:

    1. at the left panel of Qt Creator IDE, there is a "appname Debug" icon with small arrow on it. click that and change to "Release".
    2. Then click Run. This will build the exe in "release" folder and run it.
    3. Goto release folder (for example: G:\QT\build-AppName-Desktop_Qt_5_9_1_MinGW_32bit-Release\release)
    and you will find AppName.exe there.
    4. To deploy you must use this exe (and not the exe in the debug folder).
    5. To deploy, you must goto DOS prompt, traverse to this release folder and type

    C:\Qt\5.9.1\mingw53_32\bin\windeployqt.exe AppName.exe
    Note: C:\Qt is where you install your Qt SDK.

    You need to specify the full path of windeployqt.exe because the PATH is not included
    in DOS. Or you can modify your dos path to include it so it would be easier to run this command.

    6. Then you will see it will create additional files in that folder.
    7. For Qt5.9 that I use, I also needed to copy additional dll files to this folder to make it able to run.
    Goto C:\Qt\5.9.1\mingw53_32\bin and copy these 3 dll to your release folder:
    - libgcc_s_dw2-1.dll
    - libstdc++-6.dll
    - libwinpthread-1.dll

    Then your exe should be able to run without Qt and you can pack the files for distribution.
    (Test by close Qt Creator and double click the exe).

    That's it. Thankyou.
    Last edited by GeneCode; 18th September 2017 at 03:46.

+ Reply to Thread

Similar Threads

  1. Replies: 2
    Last Post: 31st August 2017, 13:47
  2. How can we know that a widget has completed painting or ready to display
    By srav219 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 25th May 2015, 14:10
  3. Replies: 3
    Last Post: 18th July 2013, 05:12
  4. Replies: 5
    Last Post: 24th October 2010, 07:54
  5. How to know when the server has completed the painting of the widget...??
    By kapoorsudhish in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 16th April 2010, 14:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts