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. How to deploy when using Resource System? (Windows 10)
Forum Updated to NodeBB v4.3 + New Features

How to deploy when using Resource System? (Windows 10)

Scheduled Pinned Locked Moved Solved Installation and Deployment
11 Posts 2 Posters 1.0k 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.
  • I Offline
    I Offline
    Ijon_Tichi
    wrote on 23 Mar 2020, 19:24 last edited by Ijon_Tichi
    #2

    windeployqt Output:

    D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release>windeployqt --release JACK-Tool.exe
    D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release\JACK-Tool.exe 64 bit, release executable
    Direct dependencies: Qt5Core Qt5Gui Qt5Widgets
    All dependencies : Qt5Core Qt5Gui Qt5Widgets
    To be deployed : Qt5Core Qt5Gui Qt5Widgets
    Unable to find the platform plugin.

    the .pro file contains:

    RESOURCES += \
    jack-ressourcen.qrc

    J 1 Reply Last reply 24 Mar 2020, 06:03
    0
    • I Ijon_Tichi
      23 Mar 2020, 19:24

      windeployqt Output:

      D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release>windeployqt --release JACK-Tool.exe
      D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release\JACK-Tool.exe 64 bit, release executable
      Direct dependencies: Qt5Core Qt5Gui Qt5Widgets
      All dependencies : Qt5Core Qt5Gui Qt5Widgets
      To be deployed : Qt5Core Qt5Gui Qt5Widgets
      Unable to find the platform plugin.

      the .pro file contains:

      RESOURCES += \
      jack-ressourcen.qrc

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 24 Mar 2020, 06:03 last edited by
      #3

      @Ijon_Tichi Usually resources are built into the executable, so it should work. See "Compiled-In Resources" in https://doc.qt.io/qt-5/resources.html
      Can you show how you're using your resources?
      Also, do you see any warnings when you start your app from cmd.exe?

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

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Ijon_Tichi
        wrote on 24 Mar 2020, 15:31 last edited by
        #4

        hello jsulm

        i use a *.qrc (jack-ressourcen.qrc) over the Qt Creator
        <RCC>
        <qresource prefix="/images">
        <file>ressourcen/jack-logo.jpg</file>
        <file>ressourcen/Startbild.jpg</file>
        <file>ressourcen/JACK-mittel.jpg</file>
        <file>ressourcen/JACK-groß.jpg</file>
        </qresource>
        </RCC>

        in the source code i use the ressources

        ...
        QImage imageLogo(":/images/ressourcen/jack-logo.jpg","JPG");
        ...
        ui->label_imageLogo->setPixmap(QPixmap::fromImage(imageLogo));
        ...

        When i rum with Qt Creator (debug or relase) it works the imageLogo is displayed.

        Whan i run from cmd.exe there ist no error, the program works, but the imageLogo is not shown.

        A image, that i generate by QPainter thru the Program is shown, there no problem running from CMD :
        ...
        QImage imageSchablone(2480, 3508, QImage::Format_RGB32);
        ...
        // calculating the image
        imageSchablone = aktSchablone.berechnen(aktuellerTonarm);
        ....
        // show the image
        // PixMapSchablone is a lable on the ui
        ui->PixMapSchablone->setPixmap( QPixmap::fromImage(imageSchablone).scaledToHeight(900));
        ...

        1 Reply Last reply
        0
        • I Offline
          I Offline
          Ijon_Tichi
          wrote on 24 Mar 2020, 16:42 last edited by
          #5

          I have testet with aditional images in the QRessource System.
          The progam.exe get bigger, so i think the images are link into the program.

          ... but the the images are not shown when i rum from cmd.exe

          1 Reply Last reply
          0
          • I Offline
            I Offline
            Ijon_Tichi
            wrote on 25 Mar 2020, 07:43 last edited by
            #6

            also show a image direct from file only work when run from Qt Creator (Debug or Release), wenn run from cmd.exe the image is not shown.
            ...
            QImage imageStartSeite("D:\QT-Creator-Projekte\JACK-Tool\Startbild.jpg","JPG");
            ...

            J 1 Reply Last reply 25 Mar 2020, 08:10
            0
            • I Ijon_Tichi
              25 Mar 2020, 07:43

              also show a image direct from file only work when run from Qt Creator (Debug or Release), wenn run from cmd.exe the image is not shown.
              ...
              QImage imageStartSeite("D:\QT-Creator-Projekte\JACK-Tool\Startbild.jpg","JPG");
              ...

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 25 Mar 2020, 08:10 last edited by
              #7

              @Ijon_Tichi I think your problem is that you do not deploy your app properly before starting outside of QtCreator, so it can't find needed plug-in.
              See https://doc.qt.io/qt-5/windows-deployment.html

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

              1 Reply Last reply
              0
              • I Offline
                I Offline
                Ijon_Tichi
                wrote on 25 Mar 2020, 08:32 last edited by
                #8

                thanks jsulm,
                yes, i readed this many time but i unterstand it not full, i am a beginner in Qt.
                The windeployqt doesn't tell what plug-ins is needed.
                Even when i copy all plug-ins folders into the working directory my jpg-files are not loaded.
                Maybe there is a format problem to my jpg-files

                I think, i have the needed plug-in to handle jpg, all I/O opterations (store, ..) with jpg that are calculated by the program works.

                Wenn i use *.png images in the QRessource System it works fine, even from cmd.exe
                So i have changed to the *.png format.

                to me it is all fine, further i use png format

                thanks jsulm to your help

                Ijon

                J 1 Reply Last reply 25 Mar 2020, 08:37
                0
                • I Ijon_Tichi
                  25 Mar 2020, 08:32

                  thanks jsulm,
                  yes, i readed this many time but i unterstand it not full, i am a beginner in Qt.
                  The windeployqt doesn't tell what plug-ins is needed.
                  Even when i copy all plug-ins folders into the working directory my jpg-files are not loaded.
                  Maybe there is a format problem to my jpg-files

                  I think, i have the needed plug-in to handle jpg, all I/O opterations (store, ..) with jpg that are calculated by the program works.

                  Wenn i use *.png images in the QRessource System it works fine, even from cmd.exe
                  So i have changed to the *.png format.

                  to me it is all fine, further i use png format

                  thanks jsulm to your help

                  Ijon

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 25 Mar 2020, 08:37 last edited by
                  #9

                  @Ijon_Tichi So, did you actually use windeployqt tool? It should copy the plug-in. Also, the plugins need to bi in a subdirectory as shown in the above link in an example:

                  The executable	plugandpaint.exe
                  The Basic Tools plugin	plugins\pnp_basictools.dll
                  The ExtraFilters plugin	plugins\pnp_extrafilters.dll
                  The Qt Windows platform plugin	platforms\qwindows.dll
                  The Qt Windows Vista style plugin	styles\qwindowsvistastyle.dll
                  The Qt Core module	Qt5Core.dll
                  The Qt GUI module	Qt5Gui.dll
                  The Qt Widgets module	Qt5Widgets.dll
                  

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

                  1 Reply Last reply
                  0
                  • I Offline
                    I Offline
                    Ijon_Tichi
                    wrote on 25 Mar 2020, 09:12 last edited by
                    #10

                    as i wrote in Post 1

                    i put

                    libgcc_s_seh-1.dll 
                    libstdc++-6.dll 
                    libwinpthread-1.dll
                    Qt5Core.dll 
                    Qt5Gui.dll 
                    Qt5Widgets.dll
                    

                    and the plugin folders

                    imageformats
                    platforms
                    printsupport
                    styles
                    

                    into the working directory.

                    but even when i copy all plug-in folders into the working directory there is the trouble with the jpg.

                    where can i find information, what plug-ins more than "imageformats" are needed to handle jpg?

                    as i wrote in post 2 i use the windeployqt tool, i have set the env (qtenv2.bat) bevor:

                    windeployqt Output:

                    D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release>windeployqt --release JACK-Tool.exe
                    D:\QT-Creator-Projekte\build-JACK-Tool-Desktop_Qt_5_14_0_MinGW_64_bit-Release\JACK-Tool.exe 64 bit, release executable
                    Direct dependencies: Qt5Core Qt5Gui Qt5Widgets
                    All dependencies : Qt5Core Qt5Gui Qt5Widgets
                    To be deployed : Qt5Core Qt5Gui Qt5Widgets
                    Unable to find the platform plugin.
                    

                    searching to the error message "Unable to find the platform plugin", i doesn't found a solution

                    I thing the ressource system work fine. By using png format it works fine.

                    1 Reply Last reply
                    0
                    • I Offline
                      I Offline
                      Ijon_Tichi
                      wrote on 25 Mar 2020, 10:11 last edited by
                      #11

                      @Ijon_Tichi said in How to deploy when using Resource System? (Windows 10):

                      Unable to find the platform plugin.

                      To solve the problem with the windeployqt i downloaded the windeployqt64releaseonly.exe from here: http://tripleboot.org/Uploads/windeployqt64releaseonly.zip

                      Discussion here:
                      https://forum.qt.io/topic/109779/windeployqt-exe-comes-with-qt-5-14-not-copy-the-dlls-to-the-app-directory/8

                      1 Reply Last reply
                      0

                      11/11

                      25 Mar 2020, 10:11

                      • Login

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