Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: paavo512 on April 16, 2013, 02:32:15 pm

Title: Non-interactive building with Code::Blocks
Post by: paavo512 on April 16, 2013, 02:32:15 pm
Hi,

Is there any way to force C::B to run in a non-interactive way, like a --non-interactive command line option (which is not there) or something like that, so there would be no dialog boxes, ever? I'm asking as we are using it in nightly builds on Linux, on headless servers and there is nobody watching the screen or clicking the OK buttons. It appears it sometimes wants to display some random dialogs, like "Another program instance is currently running" or some crash report window or something (it is also crashing really often, but this is another topic). It would be much preferable if it just dumped the error message to stderr and exited with an error code.

TIA
Paavo
Title: Re: Non-interactive building with Code::Blocks
Post by: stahta01 on April 16, 2013, 05:27:00 pm
There is or was a console build somewhere in SVN for Linux users with your problem.

Try looking for branch codeblocks_console.

Tim S.
Title: Re: Non-interactive building with Code::Blocks
Post by: paavo512 on April 17, 2013, 12:43:24 pm

Thanks for the response, I will try it out. First tests show that at least the "Another program instance is currently running" dialog box is still present. Maybe I can hack the code myself to deal with this.

Cheers
Paavo
Title: Re: Non-interactive building with Code::Blocks
Post by: oBFusCATed on April 17, 2013, 12:48:54 pm
Thanks for the response, I will try it out. First tests show that at least the "Another program instance is currently running" dialog box is still present. Maybe I can hack the code myself to deal with this.
There are command line options, which should help you to fix this (--multiple-instances probably).
Title: Re: Non-interactive building with Code::Blocks
Post by: Jenna on April 17, 2013, 01:07:39 pm

Thanks for the response, I will try it out. First tests show that at least the "Another program instance is currently running" dialog box is still present. Maybe I can hack the code myself to deal with this.

Definitely in the in the console-version.

It is really headless and works on servers without xserver.

It's in: http://sourceforge.net/p/codeblocks/code/HEAD/tree/branches/codeblocks_console/ and linux-only (might also work on mac).
I did not update it for a long time and it is not a clean, but more or less hackky solution. Nevertheless it works fine with the conf-file up to release 12.11, but probaly not with the conf-files from trunk.
Title: Re: Non-interactive building with Code::Blocks
Post by: paavo512 on April 17, 2013, 02:07:28 pm
[
It's in: http://sourceforge.net/p/codeblocks/code/HEAD/tree/branches/codeblocks_console/ and linux-only (might also work on mac).

Oh, I see. I found what is probably an obsolete version from http://svn.code.sf.net/p/codeblocks/code/branches/codeblocks_console

Cheers
Paavo
Title: Re: Non-interactive building with Code::Blocks
Post by: paavo512 on April 17, 2013, 02:58:45 pm
[
It's in: http://sourceforge.net/p/codeblocks/code/HEAD/tree/branches/codeblocks_console/ and linux-only (might also work on mac).

Oh, I see. I found what is probably an obsolete version from http://svn.code.sf.net/p/codeblocks/code/branches/codeblocks_console

Sorry, still do not get it. It seems SourceForge refers to the same repository which I already downloaded and compiled (http://svn.code.sf.net/p/codeblocks/code/branches/codeblocks_console) and this definitely wants to have $DISPLAY and to display build messages in a floating window, etc:

Code
altair 15:01:28 Linux> DISPLAY= /opt/codeblocks_console/bin/codeblocks --build --target=Debug BuildAcapella.workspace
Error: Unable to initialize gtk, is DISPLAY set properly?

altair 15:55:18 Linux> svn info ~/test/codeblocks_console/
Path: /home/paavo/test/codeblocks_console
Working Copy Root Path: /home/paavo/test/codeblocks_console
URL: http://svn.code.sf.net/p/codeblocks/code/branches/codeblocks_console
Repository Root: http://svn.code.sf.net/p/codeblocks/code
Repository UUID: 2a5c6006-c6dd-42ca-98ab-0921f2732cef
Revision: 8992
Node Kind: directory
Schedule: normal
Last Changed Author: jenslody
Last Changed Rev: 8423
Last Changed Date: 2012-09-30 01:26:41 +0300 (Sun, 30 Sep 2012)

Cheers
Paavo
Title: Re: Non-interactive building with Code::Blocks
Post by: paavo512 on April 17, 2013, 03:02:53 pm

Ok, discovered also /opt/codeblocks_console/bin/codeblocks_con among the installed programs, this seems to be the right one!  :)

Thanks
Paavo
Title: Re: Non-interactive building with Code::Blocks
Post by: paavo512 on April 29, 2013, 10:41:16 am

Ok, discovered also /opt/codeblocks_console/bin/codeblocks_con among the installed programs, this seems to be the right one!  :)


Yeah, the codeblocks console build seems otherwise nice, but actually it does not work. It remains hanging at random points. Is this a known problem?