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. Best practices for including external programs in a Qt program
Forum Updated to NodeBB v4.3 + New Features

Best practices for including external programs in a Qt program

Scheduled Pinned Locked Moved Solved Installation and Deployment
4 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.
  • Chris HennesC Offline
    Chris HennesC Offline
    Chris Hennes
    wrote on last edited by
    #1

    When your code depends on external software and licensing allows it, do you include the external software with your distribution? If so, how do you get the Qt build system to include it?

    I'm writing a piece of software that needs to call FFmpeg to encode some video. I was hoping that for my three main target platforms I could include the FFmpeg executable along with my Qt app to make things easier for my end-users, but I don't see a straightforward way of doing this using the Qt build system. In previous versions you could abuse the DEPLOYMENT variable to accomplish it, but since that was only supposed to be for WinCE and Symbian it's dead and gone now. Obviously in an ideal world each of the platforms would only include the one they need, but I'd be happy if I could just coax qmake into including an arbitrary directory alongside every build.

    Chris Hennes, Pioneer Library System

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by VRonin
      #2

      Qt build system

      coax qmake

      It's not clear which system are you using: qmake or QBS for qmake you can use the INSTALLS variable and for QBS see here

      None of these systems is designed to be a retail installer by the way, maybe you can force linux users into using qmake but for windows and mac users a build-your-own solution is unusual. You can use the Qt Installer Framework to create real installers


      P.S.

      include the FFmpeg executable

      FFmpeg also distributes libraries (in C) to incorporate in your software without the need to call an external executable.
      https://www.ffmpeg.org/libavcodec.html

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      Chris HennesC 1 Reply Last reply
      2
      • VRoninV VRonin

        Qt build system

        coax qmake

        It's not clear which system are you using: qmake or QBS for qmake you can use the INSTALLS variable and for QBS see here

        None of these systems is designed to be a retail installer by the way, maybe you can force linux users into using qmake but for windows and mac users a build-your-own solution is unusual. You can use the Qt Installer Framework to create real installers


        P.S.

        include the FFmpeg executable

        FFmpeg also distributes libraries (in C) to incorporate in your software without the need to call an external executable.
        https://www.ffmpeg.org/libavcodec.html

        Chris HennesC Offline
        Chris HennesC Offline
        Chris Hennes
        wrote on last edited by
        #3

        @VRonin said in Best practices for including external programs in a Qt program:

        FFmpeg also distributes libraries (in C) to incorporate in your software without the need to call an external executable.
        https://www.ffmpeg.org/libavcodec.html

        Yeah, you're right, I really ought to do it the proper way and use the library. Using the executable is easy and keeps my code relatively neat, but the price is probably too high. It wasn't clear from the qmake documentation (sorry for the confusion above, I am using qmake, not QBS) whether the INSTALL variable would be used only during the equivalent of a "make install", or if it would also copy the files during a normal development build.

        Chris Hennes, Pioneer Library System

        1 Reply Last reply
        0
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by VRonin
          #4

          during the equivalent of a "make install"

          yes, that will work during make install.

          While a "normal build" should not deploy, you can use QMAKE_EXTRA_TARGETS to achieve your result

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          2

          • Login

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