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. Failed to distribute applications in a MSYS2 environment
Forum Updated to NodeBB v4.3 + New Features

Failed to distribute applications in a MSYS2 environment

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
distributionmsys2
8 Posts 2 Posters 72 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.
  • Grit ClefG Offline
    Grit ClefG Offline
    Grit Clef
    wrote last edited by Grit Clef
    #1

    Hello,
    I've written a Qt app that involves file handling. On Windows I'm doing development in Msys2 all the time. Packages including Qt are installed through pacman. It was time to distribute my application. I don't use an installer or sth similar. I just created an archive including the executable and all the necessary libraries and resources (copied from Msys2 installation).
    Then the weird thing happened. The development took place under an Administrator account on my computer. I have another new Standard User, too. So I switched to that user, starting my app, opening an image file. However, the call to QImage::load() that handles that event surprisingly returned false! (While it was always true on the Administrator account with the same file.) I'm unable to figure it out... Please help me...

    jsulmJ 1 Reply Last reply
    0
    • Grit ClefG Grit Clef

      Hello,
      I've written a Qt app that involves file handling. On Windows I'm doing development in Msys2 all the time. Packages including Qt are installed through pacman. It was time to distribute my application. I don't use an installer or sth similar. I just created an archive including the executable and all the necessary libraries and resources (copied from Msys2 installation).
      Then the weird thing happened. The development took place under an Administrator account on my computer. I have another new Standard User, too. So I switched to that user, starting my app, opening an image file. However, the call to QImage::load() that handles that event surprisingly returned false! (While it was always true on the Administrator account with the same file.) I'm unable to figure it out... Please help me...

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote last edited by
      #2

      @Grit-Clef said in Failed to distribute applications in a MSYS2 environment:

      the call to QImage::load() that handles that event surprisingly returned false!

      Did you also deploy the plug-ins with your app?
      See https://doc.qt.io/qt-6/windows-deployment.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Grit ClefG Offline
        Grit ClefG Offline
        Grit Clef
        wrote last edited by
        #3

        Yes, I first used windeployqt to copy the file needed by Qt (platform dlls, imageformat dlls, and so on), then manually copied other dependencies from Msys2 installation.

        jsulmJ 1 Reply Last reply
        0
        • Grit ClefG Grit Clef

          Yes, I first used windeployqt to copy the file needed by Qt (platform dlls, imageformat dlls, and so on), then manually copied other dependencies from Msys2 installation.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote last edited by
          #4

          @Grit-Clef Run your app with QT_DEBUG_PLUGINS env variable set and check the output. See https://doc.qt.io/qt-6/debug.html
          Most probably image pöug-in for the image format you're trying to open is missing (or one of its dependencies).

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • Grit ClefG Offline
            Grit ClefG Offline
            Grit Clef
            wrote last edited by Grit Clef
            #5

            It produced the following outputs:

            loaded library imageformats/qgif.dll
            loaded library imageformats/qicns.dll
            loaded library imageformats/qico.dll
            Cannot load library imageformats\qjp2.dll: The specified module could not be found
            Cannot load library imageformats\qjpeg.dll: The specified module could not be found
            Cannot load library imageformats\qmng.dll: The specified module could not be found
            loaded library imageformats/qsvg.dll
            loaded library imageformats/qtga.dll
            Cannot load library imageformats\qtiff.dll: The specified module could not be found
            ......
            

            but those dlls are there...

            P.S. If I check Run as Administrator, then I see every dll under the directory is loaded correctly...

            jsulmJ 1 Reply Last reply
            0
            • Grit ClefG Grit Clef

              It produced the following outputs:

              loaded library imageformats/qgif.dll
              loaded library imageformats/qicns.dll
              loaded library imageformats/qico.dll
              Cannot load library imageformats\qjp2.dll: The specified module could not be found
              Cannot load library imageformats\qjpeg.dll: The specified module could not be found
              Cannot load library imageformats\qmng.dll: The specified module could not be found
              loaded library imageformats/qsvg.dll
              loaded library imageformats/qtga.dll
              Cannot load library imageformats\qtiff.dll: The specified module could not be found
              ......
              

              but those dlls are there...

              P.S. If I check Run as Administrator, then I see every dll under the directory is loaded correctly...

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote last edited by
              #6

              @Grit-Clef said in Failed to distribute applications in a MSYS2 environment:

              then I see every dll under the directory is loaded correctly

              Then check the access rights.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • Grit ClefG Offline
                Grit ClefG Offline
                Grit Clef
                wrote last edited by
                #7

                Thanks for help. I'm able to run the app on a normal account, but the strangeness still remains... I'm blaming that on the Windows account itself.

                jsulmJ 1 Reply Last reply
                0
                • Grit ClefG Grit Clef

                  Thanks for help. I'm able to run the app on a normal account, but the strangeness still remains... I'm blaming that on the Windows account itself.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote last edited by
                  #8

                  @Grit-Clef I mean to check the access rights for the DLLs where you get "could not be found" ("but those dlls are there...").

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  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