I want to copy different files (dll and data images, ...).
But when I insert the code to my post build settings of my project I got an error.
The code I use is:
cp /Libraries/bin/Debug_X86/* /Debug/*
The error that I have is:
process_begin: CreateProcess(NULL, cp /Libraries/bin/Debug_X86/* /Debug/*, ...) failed.
My folder structure is:
Project
- Game
- GameData
- GameEngine
- Libraries
__ - bin
____ -Debug_X86
Any idee how I can fix this?
Copy files after compiling
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Copy files after compiling
cp is not a standard windows command...
You should use copy, xcopy etc
Eran
You should use copy, xcopy etc
Eran
Make sure you have read the HOW TO POST thread
Re: Copy files after compiling
Ok I have changed the script to:
xcopy /I /Libraries/bin/Debug_X86/ /Debug/
Does not work yet. But is there a variable that points to the project folder. For example {Project} that does link to C:\Project \Folder?
Or does the script always run in the project main folder?
xcopy /I /Libraries/bin/Debug_X86/ /Debug/
Does not work yet. But is there a variable that points to the project folder. For example {Project} that does link to C:\Project \Folder?
Or does the script always run in the project main folder?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Copy files after compiling
This is very vague. Please explain what is not workingslimmeke wrote:Does not work yet
By default, the working directory is set to the project folderslimmeke wrote:ut is there a variable that points to the project folder
PS. Please read the HOW TO POST thread (link in my signature)
Eran
Make sure you have read the HOW TO POST thread
Re: Copy files after compiling
I have changed my script to:
xcopy /I Libraries\bin\Debug_X86\ Debug\.
When I run this in the cmd everything works fine.
When I do this in the post build I get some error:
mingw32-make.exe[1]: Entering directory 'D:/Downloads/SimuVille'
Executing Post Build commands ...
File not found - Debug_X86 Debug@echo
mingw32-make.exe[1]: *** [PostBuild] Error 4
mingw32-make.exe: *** [All] Error 2
xcopy /I Libraries\bin\Debug_X86\ Debug\
@echo Done
0 File(s) copied
SimuVille.mk:88: recipe for target 'PostBuild' failed
xcopy /I Libraries\bin\Debug_X86\ Debug\.
When I run this in the cmd everything works fine.
When I do this in the post build I get some error:
mingw32-make.exe[1]: Entering directory 'D:/Downloads/SimuVille'
Executing Post Build commands ...
File not found - Debug_X86 Debug@echo
mingw32-make.exe[1]: *** [PostBuild] Error 4
mingw32-make.exe: *** [All] Error 2
xcopy /I Libraries\bin\Debug_X86\ Debug\
@echo Done
0 File(s) copied
SimuVille.mk:88: recipe for target 'PostBuild' failed
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Copy files after compiling
The problem is that your command ends with a backspace "\", which means: "the command continues on the next line"
So the built-in
is treated as part of your command...
Change your post build command to (note the missing backspace at the end of the command)
Eran
So the built-in
Code: Select all
@echo Done
Change your post build command to (note the missing backspace at the end of the command)
Code: Select all
xcopy /I Libraries\bin\Debug_X86\ Debug
Make sure you have read the HOW TO POST thread