← Back to team overview

kicad-developers team mailing list archive

Re: Trouble with BOM plugin execution on Windows

 

Fixed bom_all_exec.patch to according to the coding style.

2016-03-04 15:09 GMT+02:00 Константин Барановский <
baranovskiykonstantin@xxxxxxxxx>:

> Hi!
>
> I just now noticed that BOM plugins from eeschema are executed in
> background on Windows OS. And if create plugin that executes an app with
> GUI, it does not be shown.
> In my case, I am launch the python app using pythonw and it runs (I can
> see it in task manager) but does not shows. I found solution for this
> problem in using flag wxEXEC_SHOW_CONSOLE. That flag applies only for
> Windows and ignored under the other platforms.
> pythonw used only for launching the apps with GUI and must be executed
> with that flag.
> But if someone will try to use another GUI app (based on python or
> standalone, does not matter) as BOM plugin, it still does not be shown.
> So, maybe need to use wxEXEC_SHOW_CONSOLE by default?
>
> In attachment placed two patches:
> bom_pythonw_exec.patch - applied flag only for the pythonw;
> bom_all_exec.patch - applied flag for all commands.
>
> Regards, Konstantin.
>
=== modified file 'eeschema/netform.cpp'
--- eeschema/netform.cpp	2015-07-01 10:55:41 +0000
+++ eeschema/netform.cpp	2016-03-04 12:23:35 +0000
@@ -104,7 +104,7 @@
         if( aReporter )
         {
             wxArrayString output, errors;
-            int diag = wxExecute( commandLine, output, errors, wxEXEC_SYNC );
+            int diag = wxExecute( commandLine, output, errors, wxEXEC_SYNC | wxEXEC_SHOW_CONSOLE );
 
             wxString msg;
 
@@ -142,7 +142,7 @@
             }
         }
         else
-            ProcessExecute( commandLine, wxEXEC_SYNC );
+            ProcessExecute( commandLine, wxEXEC_SYNC | wxEXEC_SHOW_CONSOLE );
     }
 
     return res;


Follow ups

References