Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Batch build - optionally not show BatchLogWin dialog

<< < (2/2)

blauzahn:
Hello,

I also would like to be able to use a headless build. But I am not in favour of sprinkling the code with "yet some more simple if", possibly spread across multiple files though.

My feeling is, that a solution closer to the one proposed by @obfuscated could be more appropriate -- that is runtime polymorphic use. I admit, I have not studied cb's codebase in this regard lately. One problem with the classic oo-way, here deriving the UI and Non UI classes from a common base class, is that very often it creates a lot of high coupling and accidential complexity.

In the codebases I mainly work on, we prefer alternatives to classic oo instead, like a type erasing wrapper or std::variant.

I guess, in order to preserve the current functionality in cb yet provide the means to headless mode, a handfull of functions have to be provided.

In case someone is not familiar with type erasure, std::function is an example thereof, albeit providing one single member-function (op()) only. Maybe you have already watched on youtube a quite famous talk within the C++ community, held by Adobe's Sean Parent from the GoingNative 2014 conference "C++ Seasoning" (see: https://www.youtube.com/watch?v=W2tWOdzgXHA) and maybe also a talk by Louis Dionne (https://www.youtube.com/watch?v=OtU51Ytfe04).

In headless mode, does MainFrame::SetupGUILogging have to be called in the first place?

btw: I haven't seen obfuscated here for a while. I hope, he is fine and just too busy doing his daily work to post here.

Have a nice day.

Navigation

[0] Message Index

[*] Previous page

Go to full version