Copying files to output directory
-
- CodeLite Curious
- Posts: 4
- Joined: Sat Feb 06, 2016 3:10 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Copying files to output directory
Is there any way to copy some files to output automatically on build? Like if I have some images in my project to copy them to Debug/ folder.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Copying files to output directory
Project settings->Pre/Post build commands->Post build
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 4
- Joined: Sat Feb 06, 2016 3:10 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Copying files to output directory
So I have to write to commands to copy the files manually?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Copying files to output directory
Yes you do
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 4
- Joined: Sat Feb 06, 2016 3:10 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Copying files to output directory
Ok I wrote a script in ruby for copying the files but when I try to run it through the post build it crashes like this:
And I run it like this :
Edit: The script is working when run normally
Edit 2: I managed to find a workaround by using a bat file which just simply executes the upper ^ command and executing the bat file instead of the .rb file. But if you have any other suggestions I'm open to hear them.
Code: Select all
F:/RubyScripts/copyToOutput.rb Content ./Debug OpenGIne.project
process_begin: CreateProcess(F:\RubyScripts\copyToOutput.rb, F:/RubyScripts/copyToOutput.rb Content ./Debug OpenGIne.project, ...) failed.
make (e=193): Error 193
mingw32-make.exe[1]: *** [PostBuild] Error 193
OpenGIne.mk:85: recipe for target 'PostBuild' failed
mingw32-make.exe[1]: Leaving directory 'F:/Google Drive/Programming/OpenGL/CodeLite/OpenGIne'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target 'All' failed
====2 errors, 4 warnings, total time: 00:00:13 seconds====
Code: Select all
F:/RubyScripts/copyToOutput.rb Content $(IntermediateDirectory) $(ProjectName).project
Edit 2: I managed to find a workaround by using a bat file which just simply executes the upper ^ command and executing the bat file instead of the .rb file. But if you have any other suggestions I'm open to hear them.
Last edited by Rokner on Sun Feb 07, 2016 12:19 am, edited 1 time in total.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Copying files to output directory
Your command is pasted as is into the Makefile in the 'PostBuild' stage.
My guess is that Makefile does not know how to launch .rb files
Usually (never used Ruby myself), most interpreted languages can also be run like this:
So try using it like this
My guess is that Makefile does not know how to launch .rb files
Usually (never used Ruby myself), most interpreted languages can also be run like this:
Code: Select all
/path/to/ruby.exe <script-name>
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 4
- Joined: Sat Feb 06, 2016 3:10 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Copying files to output directory
Yeah this works too. I'll probably use it.