User forums > Using Code::Blocks

Preventing Code::Blocks Build log dialog box from appearing when building a .cbp

(1/3) > >>

nhiorns:
I am using the command line to rebuild a codeblocks project with the following command:

codeblocks --rebuild ProjectName.cbp > build.txt

This rebuilds the project and prints the build log to the build.txt file.

The build log is however also displayed in a pop up dialog box which I do not want. Is there any way of getting the project to build without this dialog box appearing? The code::blocks documentation states that using '> <filename>' redirects output to the file specified, which it does, but it does not prevent the dialog box from opening.

MortenMacFly:
...if you run Code::Blocks with the /? option, you'll see all available command line switches.

These are:

Usage: codeblocks.exe [/h] [/?] [--safe-mode] [/na] [/nd] [/ns] [--multiple-instance] [/d] [/nc] [/v] [--prefix <str>] [/p <str>] [--no-log] [--log-to-file] [--debug-log-to-file] [--profile <str>] [--rebuild] [--build] [--clean] [--target <str>] [--no-batch-window-close] [--batch-build-notify] [--script <str>] [--file <str>] [filename(s)...]
  /h, --help                     show this help message
  /?, --?                        show this help message (alias for help)
  --safe-mode                    load in safe mode (all plugins will be disabled)
  /na, --no-check-associations   don't perform any association checks
  /nd, --no-dde                  don't start a DDE server
  /ns, --no-splash-screen        don't display a splash screen while loading
  --multiple-instance            allow running multiple instances
  /d, --debug-log                display application's debug log
  /nc, --no-crash-handler        don't use the crash handler (useful for debugging C::B)
  /v, --verbose                  show more debugging messages
  --prefix=<str>                 the shared data dir prefix
  /p, --personality=<str>        the personality to use: "ask" or <personality-name>
  --no-log                       turn off the application log
  --log-to-file                  redirect application log to a file
  --debug-log-to-file            redirect application debug log to a file
  --profile=<str>                synonym to personality
  --rebuild                      clean and then build the project/workspace
  --build                        just build the project/workspace
  --clean                        clean the project/workspace
  --target=<str>                 the target for the batch build
  --no-batch-window-close        do not auto-close log window when batch build is done
  --batch-build-notify           show message when batch build is done
  --script=<str>                 execute script file
  --file=<str>                   open file and optionally jump to specific line (file[:line])


...in particular:
--batch-build-notify           show message when batch build is done

nhiorns:
Thanks for the reply.

I knew that switch already and in fact that one causes another dialog box to pop up notifying me that the build is complete. This is on top of the build log box which appears when I run the script, so this is further from my goal I'm afraid.

I am running codeblocks on a linux system, and so when the codeblocks dialog box appears, I have to then click to activate it and it then starts printing the build log to screen. This is not very command-line-esque, I would like to be able to execute the command which will build the project with no further interaction on my part. I don't mind if the build log is printed to the terminal (which it is) or even to a file, but I do not want an extra box popping up containing the same info.

I have tried the:
--log-to-file
--no-log
switches, which do not solve my problem either!

Noel

stahta01:
I suggest trying the option

--- Code: -----profile="batch"
--- End code ---
because you need to rule out the idea that you set a option in CB that does this.
Creating a new profile just for batch builds that is created with the CB default setting might help you get ride of this issue.

You might also try before or after that.
Unchecking the items under the "view" menu.

Edited: The quotes around profile option.


Tim S.

MortenMacFly:
...I was about to say the same: Try with a clean config for batch builds. Because for me it works just fine here, however, I've done some modification to the batch build system. I would need to check against trunk and/or simply a nightly.

Navigation

[0] Message Index

[#] Next page

Go to full version