Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Deploying on other PC's doesn't work
QtWS25 Last Chance

Deploying on other PC's doesn't work

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
18 Posts 9 Posters 8.2k Views
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #8

    Can you be more precise about the "doesn't work" ?

    Is it crashing at startup ?
    Is there a functionality missing ?
    Do you have any external dependencies ?
    From a quick look at the screenshots you posted, I would say no but it doesn't hurt to check.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    1
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #9

      To add to @SGaist

      Did you try to start the exe on the other machine via command prompt?

      If I understand correctly, you can start the application in creator, but also externally on the developer's machine?

      It is only the deployment machine giving you a hard time?
      I suggest to try another PC too. Possibly your deployment machine has some fishy dlls.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • F Offline
        F Offline
        FlyingHubert
        wrote on last edited by
        #10

        Thanks for your answers.
        I'll try to post some more detailed information (maybe even my project) asap.

        The application doesn't start at all or more precisely it crashes silently when started. I assume that it fails at loading some dll's.
        I don't think I've got any external dependencies. I only use the qt gui and the xml modul.

        I tried to start the app via doubleclick on 2 different Win 10 PC's.

        (maybe at the weekend I'll find some time to investigate more deeply)

        Good Evening,

        Lukas

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #11

          Then you should start it from a command line with the QT_DEBUG_PLUGINS environment variable set to 1. That should give you more clues about what is happening.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • F FlyingHubert

            Hi Community,

            I've worked on a little project for a while now and i want to deploy it to another pc with Windows without QT installed.
            I'm using Qt 5.9 installed today via Qt Online Installer and im using mingw as compiler (the standard from the online installer).

            The App itself is running smoothly when started via Qt Creator. When i copy the necessary DLL's and my release EXE in one folder it starts and works properly but when i copy it to another PC without QT installed it won't work at all.

            There is no message/error that something is missing. The App just doesn't show up. There is also no process in the task manager. But the Event Viewer says that the App crashed but i cannot figure out why.

            Things I've tried:

            • Copy the DLL's by hand
            • Copy the DLL's via windeployqt
            • Copy all DLL's in the /bin/... folder and all folders from /plugins/...

            I really don't know whats going wrong and I need some help :/

            Greetings Lukas

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by JKSH
            #12

            @FlyingHubert said in Deploying on other PC's doesn't work:

            The App itself is running smoothly when started via Qt Creator. When i copy the necessary DLL's and my release EXE in one folder it starts and works properly

            This is good. Now, let's do a sanity check.

            On your same Development computer which can run your release EXE properly, temporarily rename the C:\Qt\ folder to something else. Now, try running your release EXE again. Does it still work properly?

            • If the answer is "Yes", that means your deployment is missing a non-Qt component
            • If the answer is "No", that means your deployment is missing a Qt DLL.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            5
            • Paul H.P Offline
              Paul H.P Offline
              Paul H.
              wrote on last edited by
              #13

              In addition to what JKSH recommended, another tool that may help you is Process Explorer. Start your application from the deploy directory on your working machine, Then locate the application in Process Explorer and select it. In the bottom pane will be all the dlls that are being used, along with the path to them. Click the "Path" bar so they are sorted by path, and see if there are any that are not located in the C:\Windows... or your deploy directory.

              1 Reply Last reply
              1
              • artwawA Offline
                artwawA Offline
                artwaw
                wrote on last edited by
                #14

                Hi,
                to clarify: you did put the plugins in their respective directories together with running dlls (qtcore.dll etc.) in the program folder?
                I've encountered the behavior you describe - it was my fault, I forgot about plugins directory tree, just used the runtime dlls.

                For more information please re-read.

                Kind Regards,
                Artur

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  FlyingHubert
                  wrote on last edited by FlyingHubert
                  #15

                  Hi everyone,

                  I read all your comments and tried many different things... but because I can't get it running smoothly and because I haven't worked on the code and its purpose for a month now I decided to rewrite the whole program and try to figure out when and where it can't be executed on another PC anymore.

                  Thanks for your help and all the comments. I will do another thread if I get in trouble again.

                  Two last questions:

                  • Which guide would you recommend to deploy QT applications on windows platform.
                    Is it "http://doc.qt.io/qt-5/windows-deployment.html" because that one didn't work out that well for me :(
                  • And which compiler would you use to compile - is mingw okay? (I need a free one if possible.)

                  Greetings Lukas

                  artwawA 1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #16

                    Visual Studio also has a free edition.

                    Dependency Walker and windeployqt are usually enough to get your application running however without more details about your project it's difficult to help you find why it's not working properly once deployed.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • F FlyingHubert

                      Hi everyone,

                      I read all your comments and tried many different things... but because I can't get it running smoothly and because I haven't worked on the code and its purpose for a month now I decided to rewrite the whole program and try to figure out when and where it can't be executed on another PC anymore.

                      Thanks for your help and all the comments. I will do another thread if I get in trouble again.

                      Two last questions:

                      • Which guide would you recommend to deploy QT applications on windows platform.
                        Is it "http://doc.qt.io/qt-5/windows-deployment.html" because that one didn't work out that well for me :(
                      • And which compiler would you use to compile - is mingw okay? (I need a free one if possible.)

                      Greetings Lukas

                      artwawA Offline
                      artwawA Offline
                      artwaw
                      wrote on last edited by
                      #17

                      @FlyingHubert I personally compile with mingw but deploy with Inno Setup - apart from regular tools it has IDE that works, involves Pascal Script to automate things and gives me total control over the installation or upgrade process. It is easy to learn the basics of that although documentation is somewhat scarce (for more advanced tasks some knowledge of Pascal would be recommended). And it is freeware.
                      Very unfortunately for myself I found deployment tools included with Qt a bit clumsy.

                      For more information please re-read.

                      Kind Regards,
                      Artur

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mrengel
                        wrote on last edited by
                        #18

                        Hello @FlyingHubert

                        I SOLVED, this is how mi app start to wok in other PCs:

                        The problem was when I was reading a file in my program at a specific path (example: C:\Program Files (x86)\TestQT1\test.txt) and when I execute the .exe file from another PC, the path was slightly different and it was crashing at the beggining.

                        I know this is a very old post at the time but I was looking for the same problem so hard and I spent a lot of time to find this issue, so I hope this information will be usefull for any other people

                        Regards.

                        1 Reply Last reply
                        0

                        • Login

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