Author Topic: Problems with 'Post-build step' command  (Read 6666 times)

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Problems with 'Post-build step' command
« 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?


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Problems with 'Post-build step' command
« Reply #1 on: January 25, 2006, 11:46:26 pm »
The application is probably still running (not terminated properly) so the file is still exclusively locked.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Re: Problems with 'Post-build step' command
« Reply #2 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!
« Last Edit: January 26, 2006, 12:37:46 am by ironhead »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Problems with 'Post-build step' command
« Reply #3 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.
« Last Edit: January 26, 2006, 12:43:18 am by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Problems with 'Post-build step' command
« Reply #4 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
Be patient!
This bug will be fixed soon...

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: Problems with 'Post-build step' command
« Reply #5 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
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool:

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Re: Problems with 'Post-build step' command
« Reply #6 on: January 26, 2006, 12:37:07 pm »
That works perfectly, many thanx! :)