User forums > Using Code::Blocks
How to run shell script
binnyshah:
yes it is windows based...but is there no way to run shell script directly from code::blocks?
@reckless::I dint quite understand your suggestion...can u pls guide in detail if that is fine with you
reckless:
i can try (not very good at explaining).
first of you need msys from mingw's site. its a small unix shell environment, install it to the default location c:\msys\1.0 now open up codeblocks hit settings -> compiler and debugger and go to the tab named toolchain executables. besides the program files tab theres another tab called additional paths, open that.
hit the button named add in that tab a small window called add directory will open, theres a small button in it with ... 3 dots hit that one, (its the same as browse) and point it at C:\msys\1.0\bin voila you can now access sh.exe.
if the project is allready setup for using that shell script things should work now, if not you may have to tinker a bit with settings to tell it to run sh.exe on that script.
hope i was clear enough.
binnyshah:
Thank you sooo much..I could finally run the shell script..
But alas...with an error..
The shell script which runs well normally gives the below error from code-blocks
line 7: --without-contrib: command not found
pls find below the code:
if [ -z $CONTRIBS ]
then
CONTRIBS=/usr/win32
fi
$CONFIG \
--without-contrib \
--enable-update-check \
--enable-lua \
--enable-faad \
--enable-flac \
--enable-theora \
--enable-twolame \
--enable-quicktime \
--enable-real \
--enable-avcodec --enable-merge-ffmpeg \
--enable-dca \
--enable-mpc \
--enable-libass \
--enable-x264 \
--enable-schroedinger \
--enable-realrtsp \
--enable-live555 --with-live555-tree=$CONTRIBS/live.com \
--enable-dvdread --with-dvdnav-config-path=$CONTRIBS/bin \
--enable-shout \
--enable-goom \
--enable-caca \
--enable-portaudio \
--enable-sdl --with-sdl-config-path=$CONTRIBS/bin \
--enable-qt4 \
--enable-mozilla --with-mozilla-sdk-path=$CONTRIBS/gecko-sdk \
--enable-activex \
--enable-sse --enable-mmx \
--enable-libcddb \
--enable-zvbi --disable-telx \
--disable-dvb \
--disable-sqlite \
--enable-peflags
reckless:
ah i see its for the mozilla plugin.
now the damn thing is that you will probably have to use the mozilla sdk to make that part working.
the mozilla sdk uses a special version of msys and normally uses msvc as the compiler as opposed to the normal msys which uses mingw.
unfortunatly i newer dabbled in setting it up so im a bit blank on how to help with that.
stahta01:
As was suggested before, use a windows batch file.
Get the code to work using a windows batch file from the windows cmd prompt. Then call the batch file inside Code::Blocks.
This should allow to to figure out if batch file is wrong or Code::Blocks is causing problem.
Tim S.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version