News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Non-interactive building with Code::Blocks

Started by paavo512, April 16, 2013, 02:32:15 PM

Previous topic - Next topic

paavo512

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

stahta01

#1
There is or was a console build somewhere in SVN for Linux users with your problem.

Try looking for branch codeblocks_console.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

paavo512


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

oBFusCATed

Quote from: 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.
There are command line options, which should help you to fix this (--multiple-instances probably).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Jenna

Quote from: 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.

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.


paavo512

Quote from: paavo512 on April 17, 2013, 02:07:28 PM
[
Quote from: jens on April 17, 2013, 01:07:39 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:


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

paavo512


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

Thanks
Paavo

paavo512

Quote from: 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!  :)


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?