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. Copy files as part of build?
QtWS25 Last Chance

Copy files as part of build?

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

    My app uses a couple of executables that it will look for in a folder called "apps", adjacent to the main app.
    I want to be able to create the "apps" folder and copy my two files there, as part of doing a build.
    Right now I am doing this with a custom build step that does "make install" and doing something like
    this in my .profile:

     install_it.path = build/apps
     install_it.files += src-apps/some-app
     install_it.files += src-apps/another-app
     INSTALLS += install_it
    

    But this does not thrill me, in that (I think) custom build steps only line in Creator, and only on my system. Someone else should be able to install Qt, get my project from git build and run without extra setup steps.

    Is there a way to do what I want here, but without using a custom build step, or requiring "make install"?

    cheers

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fredrossperry
      wrote on last edited by
      #2

      OK, Answering my own question. You can (apparently) create a series of commands using QMAKE_POST_LINK.

      QMAKE_POST_LINK += $$quote(mkdir -p ./apps $$escape_expand(\n\t))
      QMAKE_POST_LINK += $$quote(cp ./../../macApps/gs ./apps/gs $$escape_expand(\n\t))
      QMAKE_POST_LINK += $$quote(cp ./../../macApps/gxps ./apps/gxps $$escape_expand(\n\t))
      
      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