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. QtIFW QtPatch.cpp
Forum Updated to NodeBB v4.3 + New Features

QtIFW QtPatch.cpp

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 2 Posters 1.1k Views 1 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
    Lachrymology
    wrote on last edited by
    #1

    Hi all,

    I'm new to the Qt Installer Framework and I've found this file:
    https://github.com/qtproject/installer-framework/blob/master/src/libs/installer/qtpatch.cpp

    I'm asking myself if it does what I think it does, namely to replace the static paths compiled into QtCore*.dll and qmake.exe.

    If this is the case how do I teach my installer to fullfil this task?

    Kind regards,
    Mike

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

      Hi,

      What do you mean by "teach my installer to fulfil this task" ?

      AFAIK, it's done for you automatically when running the installer.

      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
      • L Offline
        L Offline
        Lachrymology
        wrote on last edited by
        #3

        Hi @SGaist,

        I was expecting that QtIFW runs the patching automatically - but for me it doesn't. I have my own compiled Qt solution. I've taken an example of the QtIFW put my app and the dependend dlls into data.

        After creating the installer and executing it the app and dlls got extracted but the dlls are remaining untouched - therefore I asked what conditions should be met to run the patch.

        First of all I'm compiling Qt with a libinfix. To exclude this as an error source I renamed the core to Qt5Core.dll that the IFW is able to detect it as a file which needs to be patched - but it makes no difference. The dll still contains the old qt_prfxpath and not the path to the target install dir.

        Any ideas?

        Kind regards,
        Mike

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

          Can you provide a minimal compilable example that shows that behaviour ?

          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
          • L Offline
            L Offline
            Lachrymology
            wrote on last edited by Lachrymology
            #5

            Hi @SGaist ,

            like I said, I made a full copy of this example:

            QtIFW-3.0.2\examples\tutorial
            

            to:

            QtIFW-3.0.2\examples\tutorial2
            

            Added my app and the Qt5Core.dll into:

            QtIFW-3.0.2\examples\tutorial2\packages\com.vendor.product\data
            

            I opened the console, switched to the bin dir of QtIFW and run this command:

            binarycreator.exe --offline-only -t installerbase.exe -p "C:\Qt\QtIFW-3.0.2\examples\tutorial2\packages" -c "C:\Qt\QtIFW-3.0.2\examples\tutorial2\config\config.xml" "C:\Qt\QtIFW-3.0.2\examples\tutorial2\Installer.exe"
            

            Nothing more.
            The Qt5Core.dll and my app are copied to the install destination, but the DLL still has the qt_prfxpath of the build, not of the install destination or at least a dot to use the current dir.

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

              Just thought of something: the usual way to prepare your application before packaging it is to follow the deployment procedure (usually using windeployqt) and then use that to create the installer.

              That way you ensure that your application is ready to run.

              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

              • Login

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