User forums > Help
"custom commands" bug?
mandrav:
I use custom comands in the CB project file itself. In the custom commands I just add "update.bat" (no quotes) and I have a file called "update.bat" which contains the commands to be executed. Can you try it this way and post the results?
Yiannis.
mandrav:
Actually, under windows, I think ShellExecute() is called in this situation (by wxWidgets, under the hood).
"Copy" is doomed to fail, if that is so because it's a built-in command, not an executable. In this case you have two options:
a) do it like I told you (create a batch file and call it), or
b) install unxutils which contain cp.exe, rm.exe etc, and use these in your custom commands
HTH,
Yiannis.
sés:
Ok, it works using a batch file... ¬¬
I think I'll download unxutils
Cyrano_1968:
Hi,
I tried to solve this problem in this way: I inserterd in the "post-build steps" the command:
cmd /c copy "*.h" "C:\Include\*.h"
(The folder "C:\Include" is just an example, of course).
It's important to use cmd.exe with the parameter /c, otherwise it won't terminate its execution and your CodeBlocks will be waiting for it undefinitely.
Bye Bye... Cyrano
thomas:
--- Quote from: mandrav on February 11, 2005, 02:07:33 pm ---Actually, under windows, I think ShellExecute() is called in this situation (by wxWidgets, under the hood).
--- End quote ---
No, CreateProcessEx is used. That's why copy does not work. If you execute update.bat, the default application for .bat will be started (which is cmd). But if you execute copy, it fails because there is no copy.exe anywhere (copy is a builtin command).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version