← Back to team overview

kicad-developers team mailing list archive

Re: Trouble with BOM plugin execution on Windows

 

I don't think setting the wxEXEC_SHOW_CONSOLE for a single executable
name (in the case of your patch pythonw(.exe)) is a good idea.  The
problem I foresee is someone will want launch executables X, Y, and Z
and soon this code would spiral out of control.  I would rather not add
pet behavior patches and come up with a more robust solution.  A better
patch would be to add an option to the BOM generator dialog to always
show the console for a given BOM generator configuration.  This way you
can use any executable and configure accordingly.

On 3/18/2016 10:51 AM, Константин Барановский wrote:
> Ok. I see nobody cares about this issue, except me. As I understand,
> applying that flag for all commands is to radical for other Windows
> users. But for me very important ability to start pythonw scripts with
> gui. May you apply the attached patch?
> 
> Regards, Konstantin.
> 
> 2016-03-14 22:41 GMT+02:00 Wayne Stambaugh <stambaughw@xxxxxxxxx
> <mailto:stambaughw@xxxxxxxxx>>:
> 
>     If memory serves, we removed the wxEXEC_SHOW_CONSOLE option from the
>     wxExecute() function call because it always shows a console window on
>     Windows.  Users were complaining about the console flashing while the
>     command was executed.  This was a long time ago so I may be thinking of
>     something else.  Your use case is probably not typical as you are
>     launching a GUI app from a console created by wxExecute() where
>     typically KiCad runs an external script to manipulate the netlist for
>     post processing so showing the console is annoying.  I'm not sure
>     changing this is desirable but I'm not opposed to it either.  Is it OK
>     if I forward all of the complaints about the console being temporarily
>     displayed to you?  Anyone else have any input on this?
> 
>     On 3/14/2016 2:34 PM, Константин Барановский wrote:
>     > Can anyone comment this issue?
>     >
>     >
>     > 2016-03-07 16:04 GMT+02:00 Константин Барановский
>     > <baranovskiykonstantin@xxxxxxxxx
>     <mailto:baranovskiykonstantin@xxxxxxxxx>
>     <mailto:baranovskiykonstantin@xxxxxxxxx
>     <mailto:baranovskiykonstantin@xxxxxxxxx>>>:
>     >
>     >     Fixed bom_all_exec.patch to according to the coding style.
>     >
>     >     2016-03-04 15:09 GMT+02:00 Константин Барановский
>     >     <baranovskiykonstantin@xxxxxxxxx <mailto:baranovskiykonstantin@xxxxxxxxx>
>     >     <mailto:baranovskiykonstantin@xxxxxxxxx
>     <mailto: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.
>     >
>     >
>     >
>     >
>     >
>     > _______________________________________________
>     > Mailing list: https://launchpad.net/~kicad-developers
>     > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     > Unsubscribe : https://launchpad.net/~kicad-developers
>     > More help   : https://help.launchpad.net/ListHelp
>     >
> 
>     _______________________________________________
>     Mailing list: https://launchpad.net/~kicad-developers
>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     Unsubscribe : https://launchpad.net/~kicad-developers
>     More help   : https://help.launchpad.net/ListHelp
> 
> 



Follow ups

References