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. Run binarycreator after install from .pro
Forum Updated to NodeBB v4.3 + New Features

Run binarycreator after install from .pro

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 512 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.
  • G Offline
    G Offline
    g1ennr
    wrote on last edited by
    #1

    What is a convenient way to run binarycreator from the .pro file to automate setup package creation?

    I have created a deployable folder using windeployqt and also an appropriate package directory using the install target:

    wdq.extra += $$[QT_INSTALL_BINS]/windeployqt --no-qml --no-sql "$$shell_path($$PREFIX/myapp.exe)" $$escape_expand(\n\t)
    INSTALLS += wdq
    

    How can I run binarycreator from the .pro file? It has to run after the install target so windeployqt gets run before it.
    Can I just use QMAKE_EXTRA_TARGETS?

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

      Hi,

      AFAIK, that would it yes. The variable documentation shows how to setup dependencies.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      G 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        AFAIK, that would it yes. The variable documentation shows how to setup dependencies.

        G Offline
        G Offline
        g1ennr
        wrote on last edited by
        #3

        This worked:

        qif.target = .binarycreator
        qif.commands += echo "Building $${qif.target}" $$escape_expand(\n\t)
        qif.commands += $$shell_path($$[QT_INSTALL_BINS]/../../../Tools/QtInstallerFramework/4.8/bin/binarycreator.exe) \
                     --offline-only -c "$$shell_path($$PREFIX/../../../config/config.xml)" -p "$$shell_path($$PREFIX/../../)" \
                     $$shell_path($${OUT_PWD}/MyAppSetup.exe) $$escape_expand(\n\t)
        # type nul >> <filename> is the equivalent of touch
        qif.commands += type nul >> $$OUT_PWD/.binarycreator $$escape_expand(\n\t)
        qif.depends = install
        
        QMAKE_EXTRA_TARGETS += qif
        

        To make it run use: make .binarycreator

        1 Reply Last reply
        2
        • G g1ennr has marked this topic as solved on
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          One thing, a make target starting with a dot is pretty unusual. This is not something developers / users would expect.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          G 1 Reply Last reply
          0
          • SGaistS SGaist

            One thing, a make target starting with a dot is pretty unusual. This is not something developers / users would expect.

            G Offline
            G Offline
            g1ennr
            wrote on last edited by
            #5

            Yeah, but that's what the Qt documentation on adding custom targets does. Although I guess in that case they aren't intending for the target to be referred to explicitly.

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

              Oh, I missed it.

              Since it's a Makefile target, it implies that it should be a file or a phony target such as clean.

              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