Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79318

QLibraryInfo reports wrong paths when application is deployed and installed

    XMLWordPrintable

Details

    • Windows
    • a131d6100ca13b00721ea30e6ef0d5225002867e (qt/qtbase/5.14.0)

    Description

      In looks like something has changed in the deployment process of Qt Applications from version 5.12.5 / 5.13.0 to 5.14.0beta1. I'm using 5.14.0beta1 because of the new HiDPI features.

      QtWebEngine cannot find its resources anymore, because the library paths seem to have changed to the parent directory of the running application. Due to that fact, my application crashes, because QtWebEngine aborts the application.

      I didn't change anything to my deployment process and installer creation process. Also the application works well with  Qt 5.12.5.

      A workaround is to move the QtWebEngine resources and the translations directory to the application directory. Also adding a qt.conf with

      'Prefix = c:/Program Files/zc4'

      helps.

      Debug output of deployed program with Qt 5.14.0beta1

      Debug: main 190 "11:52:18.269" Application Dir Path: "C:/Program Files/zc4" ((null):0)
      Debug: main 191 "11:52:18.269" Application File Path: "C:/Program Files/zc4/zc4.exe" ((null):0)
      Debug: main 192 "11:52:18.269" LibraryInfo: ((null):0)
      Debug: main 193 "11:52:18.269" prefix: "C:/Program Files" ((null):0)
      Debug: main 194 "11:52:18.269" plugins: "C:/Program Files/plugins" ((null):0)
      Debug: main 195 "11:52:18.269" libraries: "C:/Program Files/lib" ((null):0)
      Debug: main 196 "11:52:18.269" translations: "C:/Program Files/translations" ((null):0)
      Debug: main 197 "11:52:18.269" binaries: "C:/Program Files/bin" ((null):0)
      Debug: main 198 "11:52:18.269" arch-independent qt-data: "C:/Program Files" ((null):0)
      Debug: main 199 "11:52:18.269" arch-dependent qt-data: "C:/Program Files" ((null):0)
      
      (...)
      Warning: Qt WebEngine resources not found at C:/Program Files/resources. Trying parent directory... ((null):0)
      Warning: Qt WebEngine resources not found at C:/Program Files. Trying application directory... ((null):0)
      Warning: Qt WebEngine resources not found at C:/Program Files/zc4. Trying fallback directory... The application MAY NOT work. ((null):0)
      Warning: Installed Qt WebEngine locales directory not found at location C:/Program Files/translations\qtwebengine_locales. Trying application directory... ((null):0)
      Warning: Qt WebEngine locales directory not found at location C:/Program Files/zc4\qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct. ((null):0)
      
      

       

      Debug output of deployed program with Qt 5.12

      Debug: main 189 "11:31:29.711" Qt version: "5.12.5" ((null):0)
      Debug: main 190 "11:31:29.711" prefix: "C:/Program Files/zc4" ((null):0)
      Debug: main 191 "11:31:29.711" plugins: "C:/Program Files/zc4/plugins" ((null):0)
      Debug: main 192 "11:31:29.711" libraries: "C:/Program Files/zc4/lib" ((null):0)
      Debug: main 193 "11:31:29.711" translations: "C:/Program Files/zc4/translations" ((null):0)
      Debug: main 194 "11:31:29.711" binaries: "C:/Program Files/zc4/bin" ((null):0)
      Debug: main 195 "11:31:29.711" arch-independent qt-data: "C:/Program Files/zc4" ((null):0)
      Debug: main 196 "11:31:29.711" arch-dependent qt-data: "C:/Program Files/zc4" ((null):0)
      
      (...)
      
      --> no QtWebEngine Warnings
      

       

       

      Attachments

        1. c_Program_Files_zc4.png
          c_Program_Files_zc4.png
          230 kB
        2. c_Program_Files_zc4_translations.png
          c_Program_Files_zc4_translations.png
          141 kB
        3. c_Program_Files_zc4_resources.png
          c_Program_Files_zc4_resources.png
          45 kB
        4. mkinstall.bat
          2 kB
        5. 64Bit.iss
          9 kB
        6. sign_setup.bat
          0.3 kB
        7. main.cpp
          31 kB
        8. version.h
          0.8 kB
        9. qtbug79318.zip
          1 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jbornema Joerg Bornemann
              hansdijkema Hans Dijkema
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes