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. How to add and throw a binary inside a project?
Forum Updated to NodeBB v4.3 + New Features

How to add and throw a binary inside a project?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 5 Posters 631 Views 3 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.
  • C Offline
    C Offline
    carpajr
    wrote on last edited by
    #1

    Hello!

    I'm not sure that is possible, but imagine that the main application calls a binary by QProcess sometimes.
    In my project, I have a very small binary that must be run each 1 minute more or less. I would like to know if it is possibly embedded the binary inside the project using a qrc file to map that file and throw it using qrc address inside C++ code.

    Is it possible? A crazy thing?

    Thanks!

    Pablo J. RoginaP 1 Reply Last reply
    0
    • C carpajr

      Hello!

      I'm not sure that is possible, but imagine that the main application calls a binary by QProcess sometimes.
      In my project, I have a very small binary that must be run each 1 minute more or less. I would like to know if it is possibly embedded the binary inside the project using a qrc file to map that file and throw it using qrc address inside C++ code.

      Is it possible? A crazy thing?

      Thanks!

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @carpajr said in How to add and throw a binary inside a project?:

      if it is possibly embedded the binary inside the project using a qrc file

      Yes

      throw it using qrc address inside C++ code.

      No

      You can embed your binary within your Qt application executable, then you save that binary into a temporary file and run that temporary file with QProcess on the desired interval with QTimer...

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      5
      • fcarneyF Offline
        fcarneyF Offline
        fcarney
        wrote on last edited by
        #3

        @Pablo-J.-Rogina said in How to add and throw a binary inside a project?:

        you save that binary into a temporary file and run that temporary file

        Would that trigger an antivirus/malware program?

        C++ is a perfectly valid school of magic.

        JonBJ C 2 Replies Last reply
        1
        • fcarneyF fcarney

          @Pablo-J.-Rogina said in How to add and throw a binary inside a project?:

          you save that binary into a temporary file and run that temporary file

          Would that trigger an antivirus/malware program?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @fcarney Yes

          1 Reply Last reply
          0
          • fcarneyF fcarney

            @Pablo-J.-Rogina said in How to add and throw a binary inside a project?:

            you save that binary into a temporary file and run that temporary file

            Would that trigger an antivirus/malware program?

            C Offline
            C Offline
            carpajr
            wrote on last edited by
            #5

            @fcarney said in How to add and throw a binary inside a project?:

            Would that trigger an antivirus/malware program?

            Good point.

            What is it recommendable in cases like that?

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

              Hi,

              Install both executables in a know folder structure and call the second from the first one as you are already doing.

              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
              2

              • Login

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