Author Topic: Build must copy a complete directory tree stucture from "src" to "bin"  (Read 4359 times)

Offline chameleon

  • Multiple posting newcomer
  • *
  • Posts: 40
Hi guys.
I check the structure of CBP file and I realize that can be cross-platform.

I work with OpenCL which has many compile-at-runtime text files.
I want these files in my source "src/opencl/" directory.
I add these files as "Others" in my CBP project.
But there is no copy operation to target "bin" directory.

So I want "Other" files in my project:
- Copy from source "src" to target "bin" directory with the same structure "src/opencl/matrix.cl" -> "bin/opencl/matrix.cl"
- Copy only if newer.
- Copy with a cross-platform method. "copy %source_file %target_file" is not working on linux and "cp %source_file %target_file" is not working on windows.

How can I do this?

Regards
Pavlos Gessos.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
1. Do as C::B does and shell script for linux and bat file for windows
2. Try a squirrel script in the post build steps, I think it is possible, but I've not tried it, ever
3. Use rsync
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline chameleon

  • Multiple posting newcomer
  • *
  • Posts: 40
hm....
This is not so cross-platform approach.

My poor opinion:
Add an extra "compiler" in the list of supported compilers with name "Copy if newer".

Of course any other similar approach is ok.

Is ok to add a feature request? "Copy source to target if newer".