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. Deployment not working properly
Forum Updated to NodeBB v4.3 + New Features

Deployment not working properly

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 490 Views 2 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.
  • L Offline
    L Offline
    Luppo
    wrote on last edited by Luppo
    #1

    I have a project in QT that reads data from XPlane and FlightSimulator. This project contains 3 forms, each one from one plane. To check which plane i am using i read a arduino string that contains the id of the plane im using. When i run the project, the code reads the data from the arduino and sets the plane boolean variable to true, to open the form. If no ids are read, all 3 variables are false and no form is opened.
    In the Qt IDE it works just fine, it reads correctly the arduino signal and sets the value of the boolean variables correctly. However, when i deploy the application and send it to another computer, it stops working, like it cant read the arduino anymore. Besides that, one of the QML's just stop being loaded and a white screen is shown, like the QML has some error, but it works perfectly in the ide, so why when i deploy the application it just stops working?
    I think it is the deployment that is being done incorrectly, however the only answer for it i found was to use the --release in the windeployqt.
    Im deploying the project by building it in release mode, copying the .exe from the release build folder to another folder and running the following code:
    windeployqt --release --qmldir C:\Qt\6.6.3\mingw_64\qml C:\Users\Luppo\Desktop\project.exe

    Pl45m4P 1 Reply Last reply
    0
    • L Luppo

      I have a project in QT that reads data from XPlane and FlightSimulator. This project contains 3 forms, each one from one plane. To check which plane i am using i read a arduino string that contains the id of the plane im using. When i run the project, the code reads the data from the arduino and sets the plane boolean variable to true, to open the form. If no ids are read, all 3 variables are false and no form is opened.
      In the Qt IDE it works just fine, it reads correctly the arduino signal and sets the value of the boolean variables correctly. However, when i deploy the application and send it to another computer, it stops working, like it cant read the arduino anymore. Besides that, one of the QML's just stop being loaded and a white screen is shown, like the QML has some error, but it works perfectly in the ide, so why when i deploy the application it just stops working?
      I think it is the deployment that is being done incorrectly, however the only answer for it i found was to use the --release in the windeployqt.
      Im deploying the project by building it in release mode, copying the .exe from the release build folder to another folder and running the following code:
      windeployqt --release --qmldir C:\Qt\6.6.3\mingw_64\qml C:\Users\Luppo\Desktop\project.exe

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @Luppo said in Deployment not working properly:

      However, when i deploy the application and send it to another computer, it stops working

      What are these two systems? Platform? Architecture?
      Any third-party libs involved?
      If dynamically linked, you need to ship them with your app (in the correct version for destination device)

      Besides that, one of the QML's just stop being loaded and a white screen is shown

      Not an expert when it comes to QML, but did you include all the QML stuff with the correct paths?

      Edit:

      Check this and see if your config matches this pattern

      Also:

      • https://doc.qt.io/qt-6/windows-deployment.html#creating-the-application-package

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Luppo
        wrote on last edited by
        #3

        I am using Windows 10 for development, and i tested sending the deployed program to Windows 10 and Windows 11 systems, in none of them it worked without the QT Framework installed.
        No third-party libs involved, the only two i use for the arduino are QSerialPort and QSerialPortInfo, and in the QML that doesnt open the only lib i use exclusively on it is the QtQuick.Effects, but even without it, it still doesnt open
        If i understood the links you sent correctly yes, all the QML files i use are listed in the resources folder correctly

        Pl45m4P 1 Reply Last reply
        0
        • L Luppo

          I am using Windows 10 for development, and i tested sending the deployed program to Windows 10 and Windows 11 systems, in none of them it worked without the QT Framework installed.
          No third-party libs involved, the only two i use for the arduino are QSerialPort and QSerialPortInfo, and in the QML that doesnt open the only lib i use exclusively on it is the QtQuick.Effects, but even without it, it still doesnt open
          If i understood the links you sent correctly yes, all the QML files i use are listed in the resources folder correctly

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by Pl45m4
          #4

          @Luppo said in Deployment not working properly:

          in none of them it worked without the QT Framework installed.

          There you have it ;-)
          You are probably missing the Qt dlls, as windeployqt probably can't find them because of

          @Luppo said in Deployment not working properly:

          copying the .exe from the release build folder to another folder and running the following code:
          windeployqt --release --qmldir C:\Qt\6.6.3\mingw_64\qml C:\Users\Luppo\Desktop\project.exe

          windeployqt can not work correctly if you just copy yout program exe to a different location and run deploy from there.

          The tool can be found in QTDIR/bin/windeployqt. It needs to be run within the build environment in order to function correctly

          (https://doc.qt.io/qt-6/windows-deployment.html#the-windows-deployment-tool)

          What is the outcome of your command? Are there any dll files copied to the deploy dir?
          Like Qt6Widgets.dll, Qt6Gui.dll and you need the qt serialport dlls as well.


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          artwawA 1 Reply Last reply
          1
          • Pl45m4P Pl45m4

            @Luppo said in Deployment not working properly:

            in none of them it worked without the QT Framework installed.

            There you have it ;-)
            You are probably missing the Qt dlls, as windeployqt probably can't find them because of

            @Luppo said in Deployment not working properly:

            copying the .exe from the release build folder to another folder and running the following code:
            windeployqt --release --qmldir C:\Qt\6.6.3\mingw_64\qml C:\Users\Luppo\Desktop\project.exe

            windeployqt can not work correctly if you just copy yout program exe to a different location and run deploy from there.

            The tool can be found in QTDIR/bin/windeployqt. It needs to be run within the build environment in order to function correctly

            (https://doc.qt.io/qt-6/windows-deployment.html#the-windows-deployment-tool)

            What is the outcome of your command? Are there any dll files copied to the deploy dir?
            Like Qt6Widgets.dll, Qt6Gui.dll and you need the qt serialport dlls as well.

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

            @Pl45m4 said in Deployment not working properly:

            windeployqt can not work correctly if you just copy yout program exe to a different location and run deploy from there.

            Actually it does as long as Qt's bin dir is in path. This is my (automated) method for deployments - script copies the resulting exe to a clean dir, all 3rd party libs *deployqt can't know about and then runs the tool. Only prerequisite is the bin folder in path. There are other ways to get around this but having bin in path is fastest.

            For more information please re-read.

            Kind Regards,
            Artur

            Pl45m4P 1 Reply Last reply
            1
            • artwawA artwaw

              @Pl45m4 said in Deployment not working properly:

              windeployqt can not work correctly if you just copy yout program exe to a different location and run deploy from there.

              Actually it does as long as Qt's bin dir is in path. This is my (automated) method for deployments - script copies the resulting exe to a clean dir, all 3rd party libs *deployqt can't know about and then runs the tool. Only prerequisite is the bin folder in path. There are other ways to get around this but having bin in path is fastest.

              Pl45m4P Offline
              Pl45m4P Offline
              Pl45m4
              wrote on last edited by Pl45m4
              #6

              @artwaw

              But in this case here there is missing something at least, I think.
              Therefore @Luppo needs to verify the output of windeployqt. If everything (Qt6XXX.dll) used in the project was moved to/included in the deploy dir.


              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

              ~E. W. Dijkstra

              1 Reply Last reply
              1
              • L Offline
                L Offline
                Luppo
                wrote on last edited by Luppo
                #7

                I use the bin folder as an argument for the windeployqt command, and it doesnt work if i do it in another folder. However, running the windeployqt in the build folder worked just fine. Thanks for your help with that, i really appreciate it.
                Now i know which issue i am having with the form that doesnt open. For some reason, it says that the QtQuick.Effects module is not installed, even though i just checked to see if i have the additional libraries downloaded, and i have those. I dont know if i have to add something to my .PRO or something like that but it just says its not downloaded anymore

                1 Reply Last reply
                0
                • L Luppo has marked this topic as solved on

                • Login

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