Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator: Run command before running executable?
Forum Updated to NodeBB v4.3 + New Features

Qt Creator: Run command before running executable?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
6 Posts 3 Posters 746 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #1

    I'd like to run a command (basically deleting a file) every time before I start a certain executable from Qt Creator (Run, not necessarily debug).

    Is this possible with Qt Creator?

    JonBJ jsulmJ 2 Replies Last reply
    0
    • A Asperamanca

      I'd like to run a command (basically deleting a file) every time before I start a certain executable from Qt Creator (Run, not necessarily debug).

      Is this possible with Qt Creator?

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2

      @Asperamanca
      I don't see where Creator allows a "pre-run" command, that would be nice.

      Can you utilise Specifying a Custom Executable to Run to perhaps execute a little script which deletes the file and then runs the real executable?

      A 1 Reply Last reply
      1
      • JonBJ JonB

        @Asperamanca
        I don't see where Creator allows a "pre-run" command, that would be nice.

        Can you utilise Specifying a Custom Executable to Run to perhaps execute a little script which deletes the file and then runs the real executable?

        A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #3

        @JonB
        Thanks! It means a couple of extra clicks, but is still much faster than the alternatives I have used so far.
        Thanks!

        JonBJ 1 Reply Last reply
        0
        • A Asperamanca has marked this topic as solved on
        • A Asperamanca

          @JonB
          Thanks! It means a couple of extra clicks, but is still much faster than the alternatives I have used so far.
          Thanks!

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

          @Asperamanca
          An alternative might be to make your executable code itself delete such a file as the very first thing it does? You might even do that only if compiled with a certain #define/command-line argument/environment variable setting?

          1 Reply Last reply
          0
          • A Asperamanca

            I'd like to run a command (basically deleting a file) every time before I start a certain executable from Qt Creator (Run, not necessarily debug).

            Is this possible with Qt Creator?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Asperamanca said in Qt Creator: Run command before running executable?:

            basically deleting a file

            What is that file? Is this a build artefact generated during the build?

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

            A 1 Reply Last reply
            1
            • jsulmJ jsulm

              @Asperamanca said in Qt Creator: Run command before running executable?:

              basically deleting a file

              What is that file? Is this a build artefact generated during the build?

              A Offline
              A Offline
              Asperamanca
              wrote on last edited by
              #6

              @jsulm
              In my case it's a file that the executable tries to parse, but fails. It's a bug, but it's another person's code, so I'd rather not change the code until it's properly fixed.

              1 Reply Last reply
              1

              • Login

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