← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Log of opened and closed applications in KiCad launcher


Hi Jacobo, thanks for the patch!,

    Doesn't look bad for me, but please check:

   * You removed the WINDOWS special case, does it work in Windows now
without removing
the "aFlags" ?

-bool ProcessExecute( const wxString& aCommandLine, int aFlags )
+int ProcessExecute( const wxString& aCommandLine, int aFlags, wxProcess
*callback )
-#ifdef __WINDOWS__
-    int        pid = wxExecute( aCommandLine );
-    return pid ? true : false;
-    wxProcess* process = wxProcess::Open( aCommandLine, aFlags );
-    return (process != NULL) ? true : false;
+    return wxExecute( aCommandLine, aFlags, callback );

   * Line 280 of patch: +    if( pid > 0 ) {    <-- check coding style
policy, opening brace must be at the next line.

   I checked it manually, all the other coding style looks right to my eye.

2013/1/14 Jacobo Aragunde Pérez <jaragunde@xxxxxxxxxx>

> Hi,
> we have been doing some changes in the launcher, to make it more aware
> of what's happening with its children applications.
> In particular, we have added a log of the opened and closed
> applications. When the launcher starts another KiCad application a
> message will be logged to the message area in the window. When the
> application is closed, the launcher will be notified and it will show
> another message. And since a picture is worth a thousand words, I'm
> attaching a screenshot to complement the explanation.
> This patch implies some changes in the way children applications are
> spawned. In particular:
> * We modified ProcessExecute at common.cpp to always use wxExecute. It
> was only used in Windows compilations but it works perfectly in Linux
> too, and should work in OS X also. I guess
> * ExecuteFile at gestfich.cpp and ProcessExecute at common.cpp now
> receive a callback as a parameter and return an identifier of the
> process or 0 in case of error.
> Do you think this is useful in upstream KiCad? Also feel free to comment
> on the patch or suggest changes.
> Best regards,
> --
> Jacobo Aragunde
> Software Engineer at Igalia
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


Miguel Angel Ajo Pelayo
+34 636 52 25 69
skype: ajoajoajo

Follow ups