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 copy the compiled file to a specific directory
Forum Updated to NodeBB v4.3 + New Features

How to copy the compiled file to a specific directory

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 932 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.
  • K Offline
    K Offline
    kloveridge
    wrote on last edited by
    #1

    In Visual Studio, there is a pre and post compile command where I can run scripts (like a batch script) that might copy the compiled output from Visual Studio. In Qt Creator, there is the "Add Build Step" which seems like it is where I can put a command (like a copy command), but I'm clearly not getting it. It just errors out now when I compile with the copy command. I'm doing it wrong.

    So the question is, how do I insert a copy command into the compile pipeline in Qt Creator?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      adolby
      wrote on last edited by
      #2

      Take a look at these StackOverflow questions and answers. It shows how to edit your .pro file to achieve a file copy after build:

      http://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output

      In summary, you can use the INSTALLS variable of qmake:

      http://stackoverflow.com/a/3991210/1583123

      Or you can use QMAKE_COPY to copy files to the destination directory (or any arbitrary directory):

      http://stackoverflow.com/a/10058744/1583123

      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