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

batchbuild

(1/3) > >>

tiwag:
could we please have an option, which closes the batchbuild-log-window automatically, if no errors occured during building ?

this would be nice when calling codeblocks for batchbuilding from batchfiles,
so that the remaining batchfile commands can be processes without user-interaction when CB is done with batchbuilding.

also some errorlevel settings would be nice to have in order to control the batchfile execution if something went wrong during batchbuilding.

would someone (beside me) want and use such things too ?
i would be interested in your comments, in order to decide if work on such things would be of interest .

thanks

mandrav:
By default the window closes now. If you want it to stay open, use --no-batch-window-close.

tiwag:
thanks for the fast update !

but may i propose to close it only if no build error occured ?

something like:


--- Code: ---    if (m_BatchNotify)
    {
        wxString msg;
        if (m_BatchExitCode == 0)
            msg << _("Batch build ended.\n");
        else
            msg << _("Batch build stopped with errors.\n");
        msg << wxString::Format(_("Process exited with status code %d."), m_BatchExitCode);
        cbMessageBox(msg, g_AppName, m_BatchExitCode == 0 ? wxICON_INFORMATION : wxICON_WARNING);
    }
    else
        wxBell();

    if (m_pBatchBuildDialog && m_BatchWindowAutoClose && (m_BatchExitCode == 0))    // <------ change is HERE
        m_pBatchBuildDialog->EndModal(wxID_OK);
}

--- End code ---


btw. would it somehow be possible to pass the m_BatchExitCode value back to the caller envinronment ?

mandrav:

--- Quote ---but may i propose to close it only if no build error occured ?

something like:
--- End quote ---

Sure, go ahead and update it.


--- Quote ---btw. would it somehow be possible to pass the m_BatchExitCode value back to the caller envinronment ?
--- End quote ---

But it does... in CodeBlocksApp::OnExit() the return value is m_BatchExitCode for batch builds...
Is it not called?

mandrav:

--- Quote ---btw. would it somehow be possible to pass the m_BatchExitCode value back to the caller envinronment ?
--- End quote ---

On closer inspection, you 're right.


--- Quote from: wxWidgets docs wxApp::OnExit() ---The return value of this function is currently ignored, return the same value as returned by the base class method if you override it.

--- End quote ---

Navigation

[0] Message Index

[#] Next page

Go to full version