Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to publish an app?
Forum Updated to NodeBB v4.3 + New Features

How to publish an app?

Scheduled Pinned Locked Moved Unsolved General and Desktop
37 Posts 7 Posters 13.7k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • tomyT Offline
    tomyT Offline
    tomy
    wrote on last edited by A Former User
    #1

    Hi all,

    I've currently created a calculator app that has good features. I copied its .exe file from Debug directory of where it's stored and pasted that file onto desktop (Windows 7 desktop). It needs a few .dll files to be run.
    When I put those .dll-s and .exe files the same folder. It works. Now, for example, consider I want to send it to a friend or simply publish it. (I may do it again for the next apps I will create) What is the right way to do this? What should be done?
    Thanks.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      http://doc.qt.io/qt-5/deployment.html#platform-specific-notes

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      3
      • tomyT Offline
        tomyT Offline
        tomy
        wrote on last edited by tomy
        #3

        Thank you for your answer. But there may be a misunderstanding! My purpose is sending that executable file (My_First_Calculator.exe) for others to use the app. I can send it now but the problem is the .dll files. I want to make the work easy for them. Of course if I also send the .dll files with .exe they can, like me, put all in a folder and without any further work, use and enjoy it.

        I want that when they have the .exe file (My_First_Calculator.exe), they copy a copy of it on the Windows desktop and use it.

        I don't know I could convey my intention appropriately or not. :(

        And about that link, I saw it, it seems to be an instruction for commercial of large applications, but my one, isn't such. I even don't know whether I ran my app in release mode or debug mode.
        :(
        I got confused by context of that link.

        Please guide me by walking through the simplest way.
        This is my first app in Qt for sharing.

        http://uploads.im/2rWAn.jpg

        A 1 Reply Last reply
        0
        • cpperC Offline
          cpperC Offline
          cpper
          wrote on last edited by
          #4

          Looks like I had the same question some months ago: Take a look here .

          tomyT 1 Reply Last reply
          1
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on last edited by
            #5

            This link should help you.
            http://doc.qt.io/qt-5/windows-deployment.html#static-linking

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

            1 Reply Last reply
            3
            • tomyT tomy

              Thank you for your answer. But there may be a misunderstanding! My purpose is sending that executable file (My_First_Calculator.exe) for others to use the app. I can send it now but the problem is the .dll files. I want to make the work easy for them. Of course if I also send the .dll files with .exe they can, like me, put all in a folder and without any further work, use and enjoy it.

              I want that when they have the .exe file (My_First_Calculator.exe), they copy a copy of it on the Windows desktop and use it.

              I don't know I could convey my intention appropriately or not. :(

              And about that link, I saw it, it seems to be an instruction for commercial of large applications, but my one, isn't such. I even don't know whether I ran my app in release mode or debug mode.
              :(
              I got confused by context of that link.

              Please guide me by walking through the simplest way.
              This is my first app in Qt for sharing.

              http://uploads.im/2rWAn.jpg

              A Offline
              A Offline
              ambershark
              wrote on last edited by
              #6

              @tomy Yea it sounds like you want static linking. However, be aware that you need a commerical license (last time I checked) for static linking to Qt.

              So I would definitely not distribute a static linked binary unless you have a commercial license or risk some serious legal ramifications.

              The other way to do it is use the windows deployment tool.

              http://doc.qt.io/qt-5/windows-deployment.html#the-windows-deployment-tool

              My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

              1 Reply Last reply
              2
              • cpperC cpper

                Looks like I had the same question some months ago: Take a look here .

                tomyT Offline
                tomyT Offline
                tomy
                wrote on last edited by
                #7

                @cpper

                Looks like I had the same question some months ago: Take a look here .

                I read your link. And also went to the links there they were provided. And tried to go through a path and make my app ready for sending. But the result was completely awful. I became really confused by those many complicated and complex contents. :(
                Whatever I tried to find a way for my app, I couldn't. :(

                What about you? Could you share your app as you wanted? If so, please tell me what steps are needed, or how could you do it?

                @dheerendra

                This link should help you.
                http://doc.qt.io/qt-5/windows-deployment.html#static-linking

                I could find windeployqt.exe in this path
                C:\Qt\Qt5.5.1\5.5\mingw492_32\bin\windeployqt.exe
                (remember please that I used Qt Creator for creating the app)
                And also I created a release mode of the app. And now I have two folders named
                build-My_First_Calculator-Desktop-Release which contains a release folder with some files inside it. I then, went to that path (release folder) by a command line and pasted the path to windeployqt.exe. I don't know now how to add configure -static. However I type it, the command line gets an error!

                I also collected some .dll files as follows and put them in a same folder with My_First_Calculator.exe (from release folder). That .exe files is much smaller in size compared to the .exe file of the debug folder.

                libgcc_s_dw2-1.dll
                libwinpthread-1.dll
                Qt5Cored.dll
                Qt5Guid.dll
                libstdc++-6.dll
                Qt5Gui.dll
                Qt5Widgetsd.dll

                Now what should I do?
                It does not matter that I go through a hundred steps, but just guide me step-by-step, I will do it.

                @ambershark

                @tomy Yea it sounds like you want static linking. However, be aware that you need a commerical license (last time I checked) for static linking to Qt.

                What does that mean please?
                It was me who wrote the code and have the source code. I think if someone else, wants to use it (without getting permission from me) he/she should get a licence for it. Or maybe there is some misunderstanding for me (because it's the first time I do it).

                So I would definitely not distribute a static linked binary unless you have a commercial license or risk some serious legal ramifications.

                Would you please shortly say what do you mean by this, in some works? I would be grateful.

                The other way to do it is use the windows deployment tool.

                http://doc.qt.io/qt-5/windows-deployment.html#the-windows-deployment-tool

                As I said, I saw all of these, but the problem is, for a newcomer of Qt (I have just read two chapters of the official book on Qt 4.x) they are very complicated and seems complex.

                What I need is only a step-by-step solution. Thanks.

                A 1 Reply Last reply
                0
                • mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  I also liked the info here
                  http://www.tripleboot.org/?p=138

                  There is a thing to understand
                  for a Release Build use the DLLS with NO "d" in name

                  This for debug build. Notice the D

                  Qt5Widgetsd.dll

                  Please do NOT mix release and debug dlls. :)

                  tomyT 1 Reply Last reply
                  2
                  • mrjjM mrjj

                    I also liked the info here
                    http://www.tripleboot.org/?p=138

                    There is a thing to understand
                    for a Release Build use the DLLS with NO "d" in name

                    This for debug build. Notice the D

                    Qt5Widgetsd.dll

                    Please do NOT mix release and debug dlls. :)

                    tomyT Offline
                    tomyT Offline
                    tomy
                    wrote on last edited by
                    #9

                    @mrjj
                    In my folder (that .exe and .dll files exist) there are also other ended to d file names as well.
                    Qt5Cored.dll
                    Qt5Guid.dll

                    So I first delete those ones from the folder and remain it alone. Then I start reading the link until the comments. And if there is something not clear for me, I will ask here again.
                    Thanks.

                    mrjjM 1 Reply Last reply
                    0
                    • tomyT tomy

                      @mrjj
                      In my folder (that .exe and .dll files exist) there are also other ended to d file names as well.
                      Qt5Cored.dll
                      Qt5Guid.dll

                      So I first delete those ones from the folder and remain it alone. Then I start reading the link until the comments. And if there is something not clear for me, I will ask here again.
                      Thanks.

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @tomy
                      Those with d is debug version.
                      Normally you only make deployment folders for Release version but
                      a debug version is also possible. Just dont mix it :)

                      tomyT 1 Reply Last reply
                      1
                      • mrjjM mrjj

                        @tomy
                        Those with d is debug version.
                        Normally you only make deployment folders for Release version but
                        a debug version is also possible. Just dont mix it :)

                        tomyT Offline
                        tomyT Offline
                        tomy
                        wrote on last edited by
                        #11

                        @mrjj
                        Thanks.

                        What I have done are as follows:
                        1- I read the instructions carefully and on a virtual machine (Win 10 x64) created a folder named test. Then I went to the path C:\Qt\Qt5.5.1\5.5\mingw492_32 (on my real machine, a Windows 7 x64) .
                        2- Then I copied 10 .dll files from there into the test folder of virtual machine.
                        3- There are two .exe files on my system. One of the Debug mode with size about 1.4MB and one for the release mode wih size about 49KB. (Very smaller)
                        Since we need the release files I copied that .exe files into the test folder.
                        4- Then I double clicked on that file (in the test folder) but an error was shown up. I clicked on OK button of the error message and another error!

                        http://uploads.im/HJ3nO.jpg
                        http://uploads.im/OEXcL.jpg

                        My questions:
                        Why do I get these errors?
                        Consider the .exe file works well there, OK, so what is the rest of the process?

                        1 Reply Last reply
                        1
                        • mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by mrjj
                          #12

                          Hi
                          As should be clear from the link,
                          you need sub folder too called
                          platforms and dll in there.
                          alt text

                          tomyT 1 Reply Last reply
                          1
                          • mrjjM mrjj

                            Hi
                            As should be clear from the link,
                            you need sub folder too called
                            platforms and dll in there.
                            alt text

                            tomyT Offline
                            tomyT Offline
                            tomy
                            wrote on last edited by tomy
                            #13

                            @mrjj

                            Hi
                            As should be clear from the link,
                            you need sub folder too called

                            Hi,
                            What sub folder do you mean?
                            Where my Qt projects are stored there are My_First_Calculator, build-My_First_Calculator-Desktop-Debug and build-My_First_Calculator-Desktop-Release folders.

                            platforms and dll in there.

                            All the mentioned .dll files are pasted into the test folder (as shown in the images above).
                            And what platforms?

                            mrjjM 1 Reply Last reply
                            0
                            • tomyT tomy

                              @mrjj

                              Hi
                              As should be clear from the link,
                              you need sub folder too called

                              Hi,
                              What sub folder do you mean?
                              Where my Qt projects are stored there are My_First_Calculator, build-My_First_Calculator-Desktop-Debug and build-My_First_Calculator-Desktop-Release folders.

                              platforms and dll in there.

                              All the mentioned .dll files are pasted into the test folder (as shown in the images above).
                              And what platforms?

                              mrjjM Offline
                              mrjjM Offline
                              mrjj
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              @tomy

                              inside test, you must have platforms
                              and inside platforms u must have the dll as shown and written in the link / picture.

                              So your test folder is the deployment folder.

                              the
                              build-My_First_Calculator-Desktop-Debug and
                              build-My_First_Calculator-Desktop-Release
                              are the build folders.

                              1 Reply Last reply
                              1
                              • tomyT Offline
                                tomyT Offline
                                tomy
                                wrote on last edited by
                                #15

                                I got it. :)

                                I created a folder named platforms inside test and copied the qwindows into it. Now the app works well. Thanks so much.

                                This step is finished. Now the main goal. How to make one .exe file or installer file or whatsoever, for publishing the app to others please?

                                mrjjM 1 Reply Last reply
                                0
                                • tomyT tomy

                                  I got it. :)

                                  I created a folder named platforms inside test and copied the qwindows into it. Now the app works well. Thanks so much.

                                  This step is finished. Now the main goal. How to make one .exe file or installer file or whatsoever, for publishing the app to others please?

                                  mrjjM Offline
                                  mrjjM Offline
                                  mrjj
                                  Lifetime Qt Champion
                                  wrote on last edited by mrjj
                                  #16

                                  @tomy said in How to publish an app:

                                  How to make one .exe file or installer file or whatsoever, for publishing the app to others please?

                                  There are many install makers.

                                  I like this one
                                  http://www.innosetup.com/isinfo.php
                                  for windows deployment

                                  but Qt also have its own
                                  http://doc.qt.io/qtinstallerframework/

                                  That works cross platform etc.

                                  So use what ever fit the goal.

                                  This one i have been told is epic easy
                                  http://installforge.net/features/
                                  but I have not tested that claim.

                                  tomyT 1 Reply Last reply
                                  3
                                  • mrjjM mrjj

                                    @tomy said in How to publish an app:

                                    How to make one .exe file or installer file or whatsoever, for publishing the app to others please?

                                    There are many install makers.

                                    I like this one
                                    http://www.innosetup.com/isinfo.php
                                    for windows deployment

                                    but Qt also have its own
                                    http://doc.qt.io/qtinstallerframework/

                                    That works cross platform etc.

                                    So use what ever fit the goal.

                                    This one i have been told is epic easy
                                    http://installforge.net/features/
                                    but I have not tested that claim.

                                    tomyT Offline
                                    tomyT Offline
                                    tomy
                                    wrote on last edited by
                                    #17

                                    @mrjj
                                    Thank you. I went for Qt's one. I'm in Setting up Qt Installer Framework.
                                    There it says:
                                    "Clone the Qt Installer Framework source code from http://code.qt.io/cgit/installer-framework/installer-framework.git/ to get the sources for the tools."
                                    And when I go to there and click on clones at the bottom of the page, nothing will be done.

                                    mrjjM 1 Reply Last reply
                                    0
                                    • tomyT tomy

                                      @mrjj
                                      Thank you. I went for Qt's one. I'm in Setting up Qt Installer Framework.
                                      There it says:
                                      "Clone the Qt Installer Framework source code from http://code.qt.io/cgit/installer-framework/installer-framework.git/ to get the sources for the tools."
                                      And when I go to there and click on clones at the bottom of the page, nothing will be done.

                                      mrjjM Offline
                                      mrjjM Offline
                                      mrjj
                                      Lifetime Qt Champion
                                      wrote on last edited by mrjj
                                      #18

                                      @tomy
                                      well that do not work anymore as far as i know.
                                      You must use a git client.

                                      1 Reply Last reply
                                      0
                                      • tomyT Offline
                                        tomyT Offline
                                        tomy
                                        wrote on last edited by
                                        #19

                                        I found this page but there are only codes there seemingly. Is a git a tool/program to use it for making the installer? If so, where to download it?

                                        mrjjM 1 Reply Last reply
                                        0
                                        • tomyT tomy

                                          I found this page but there are only codes there seemingly. Is a git a tool/program to use it for making the installer? If so, where to download it?

                                          mrjjM Offline
                                          mrjjM Offline
                                          mrjj
                                          Lifetime Qt Champion
                                          wrote on last edited by mrjj
                                          #20

                                          @tomy
                                          GIT is the world most used tool for source code revision control.
                                          It will download the source code.

                                          https://backlogtool.com/git-guide/en/
                                          http://rogerdudler.github.io/git-guide/

                                          Make sure u understand what it is. you just need it for download.

                                          But are u sure u need to build it ?
                                          Its include in the installer.
                                          (0_1485786277438_upload-cc10dcf6-f7bf-4788-9209-08486bb74a0a

                                          tomyT 1 Reply Last reply
                                          2

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved