Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: winz on February 07, 2011, 11:15:28 am

Title: launch script/batch at end of process
Post by: winz on February 07, 2011, 11:15:28 am
Hi,

I want the computer 'beep' when a full compilation is done. I want that occur after linking operation in case of success but also if the compilation failed during compilation or linking operation.

For that I expected to call a batch (I am under win7) with a simple beep function.

I am using my own makefile (I am compiling Qt projects, the makefile is built by an external tool), so I cannot use the project build option > pre/post build step

Do you know if it is possible and how to do that?

Title: Re: launch script/batch at end of process
Post by: Jenna on February 07, 2011, 11:25:22 am
I am using my own makefile (I am compiling Qt projects, the makefile is built by an external tool), so I cannot use the project build option > pre/post build step

Why not ?
Title: Re: launch script/batch at end of process
Post by: winz on February 07, 2011, 11:33:41 am
sorry, of course I could but I already call a batch with some options when I configure my own makefile.
but in both case (if I call the batch with some makfile options or with C::B options) the batch is only called in case of successful compilation & linkage.

My compilation takes about 5mn and I would like to do some secondary job during this time and to be warn as soon current process is done... even in case of error
Title: Re: launch script/batch at end of process
Post by: winz on February 07, 2011, 03:03:05 pm
If it's not possible with C::B options, do you know if it's possible with some makefile or gcc options that I missed ?
Title: Re: launch script/batch at end of process
Post by: stahta01 on February 07, 2011, 03:08:44 pm
If it's not possible with C::B options, do you know if it's possible with some makefile or gcc options that I missed ?

State your Code::Blocks version; because it is possible to use post/pre steps with a makefile the last time I checked.

Tim S.
Title: Re: launch script/batch at end of process
Post by: Jenna on February 07, 2011, 03:12:40 pm
If it's not possible with C::B options, do you know if it's possible with some makefile or gcc options that I missed ?

State your Code::Blocks version; because it is possible to use post/pre steps with a makefile the last time I checked.

Tim S.
If I understand right, the problem is, that a failed build does not call the postbuild steps (obviously) and therefore can not play a sound, beep or whatever.
Title: Re: launch script/batch at end of process
Post by: winz on February 07, 2011, 03:21:27 pm
That's it!

I'm using  Nightly builds 6931

post/pre steps with user makefile work fine but, as you said, a failed build does not call the postbuild steps
I am looking for an other c::b option, a c::b plugin or an advice about gcc/makefile switch