User forums > Using Code::Blocks
How to run shell script
binnyshah:
Hi,
I need to run a shell script before compiling my code using code blocks.
Also need to run a make command.
Please guide.
oBFusCATed:
What do you want to achieve, exactly?
You can run shell scripts from pre/post build steps (Project->Build options->Pre/Post build steps).
Also C::B can use make to build your project if it is makefile based ( Project -> Properties -> There is somewhere a checkbox for "Makefile project")
binnyshah:
I tried adding the below to Project->Build options->Pre/Post build steps
$sh ..\..\..\..\..\..\msys\1.0\home\admin\vlc\extras\package\win32\configure-msys.sh
I got the following error
Running target pre-build steps
..\..\..\..\..\..\msys\1.0\home\admin\vlc\extras\package\win32\configure-msys.sh
Execution of ' ..\..\..\..\..\..\msys\1.0\home\admin\vlc\extras\package\win32\configure-msys.sh' in 'C:\Documents and Settings\admin\Desktop\Binny Work\CodeBlocks PRj\Sample' failed.
Nothing to be done.
Get a similar error even when tried with absolute path..
oBFusCATed:
Is this on windows? Probably you have to use batch files....
reckless:
add the bin dir from msys to additional paths so it picks up sh.exe.
and put your project someplace with a short name msys sh.exe does not like windows long names in the least. i suggest C:\projects\your-project (avoid spaces in the project name).
and aye might be easier with a batch file.
Navigation
[0] Message Index
[#] Next page
Go to full version