Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: ironhead on January 25, 2006, 11:40:18 pm

Title: Problems with 'Post-build step' command
Post by: ironhead on January 25, 2006, 11:40:18 pm
I'm trying to add a post build command to copy the .manifest file from the current directory to my 'bin' directory.  When running the build, I get:

Running project post-build steps
copy myApp.exe.manifest ..\bin
Execution of 'copy myApp.exe.manifest ..\bin' in 'D:\Source\myApp' failed.

Anybody have any ideas?

Title: Re: Problems with 'Post-build step' command
Post by: thomas on January 25, 2006, 11:46:26 pm
The application is probably still running (not terminated properly) so the file is still exclusively locked.
Title: Re: Problems with 'Post-build step' command
Post by: ironhead on January 26, 2006, 12:16:38 am
I'd agree with that, except 'myApp.exe' is built as part of the build (i.e. it's not executed) and the '.manifest' should be fine regardless.  If I run the command from cmd prompt right after the build process, it runs cleanly.

I should point out I'm using the latest nightly build.

Thanx!
Title: Re: Problems with 'Post-build step' command
Post by: thomas on January 26, 2006, 12:39:50 am
Have you checked the trivial stuff (i.e. that the paths are correct)?
You attempt to copy
D:\Source\myApp\myApp.exe.manifest
to
D:\Source\bin

Is D:\Source\bin really your bin directory?

EDIT:
If it is not something trivial, then I recommend you go to www.sysinternals.com and get the filemon utility. With this, you can track all file/directory operations that Code::Blocks is attempting.
Run it and watch for a line that says "FAILED", then you know where the beef is.
Title: Re: Problems with 'Post-build step' command
Post by: mandrav on January 26, 2006, 08:07:17 am
'copy' is a builtin command. To use builtins, start your command with 'cmd /c', e.g.
cmd /c copy myApp.exe.manifest ..\bin
Title: Re: Problems with 'Post-build step' command
Post by: 280Z28 on January 26, 2006, 08:41:11 am
'copy' is a builtin command. To use builtins, start your command with 'cmd /c', e.g.
cmd /c copy myApp.exe.manifest ..\bin

Wow I'm glad to know that now.  :lol:


I just figured I sucked at paths or something and gave up on my copy output files step. :o
Title: Re: Problems with 'Post-build step' command
Post by: ironhead on January 26, 2006, 12:37:07 pm
That works perfectly, many thanx! :)