mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Prefer using pythonw on Windows
This commit is contained in:
parent
2123c03fa1
commit
30d43c30b7
@ -29,6 +29,7 @@
|
|||||||
#include <paths.h>
|
#include <paths.h>
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
#include <python_manager.h>
|
#include <python_manager.h>
|
||||||
|
#include <thread_pool.h>
|
||||||
#include <wx_filename.h>
|
#include <wx_filename.h>
|
||||||
|
|
||||||
|
|
||||||
@ -134,7 +135,10 @@ void PYTHON_MANAGER::Execute( const wxString& aArgs,
|
|||||||
// If we need to use the async monitor thread approach and preserve the stdout
|
// If we need to use the async monitor thread approach and preserve the stdout
|
||||||
// contents in the future, a more complicated hack might be necessary.
|
// contents in the future, a more complicated hack might be necessary.
|
||||||
if( !aSaveOutput )
|
if( !aSaveOutput )
|
||||||
auto future = std::async( std::launch::async, monitor, process );
|
{
|
||||||
|
thread_pool& tp = GetKiCadThreadPool();
|
||||||
|
auto ret = tp.submit( monitor, process );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,7 +147,7 @@ wxString PYTHON_MANAGER::FindPythonInterpreter()
|
|||||||
{
|
{
|
||||||
// First, attempt to use a Python we distribute with KiCad
|
// First, attempt to use a Python we distribute with KiCad
|
||||||
#if defined( __WINDOWS__ )
|
#if defined( __WINDOWS__ )
|
||||||
wxFileName pythonExe = FindKicadFile( "python.exe" );
|
wxFileName pythonExe = FindKicadFile( "pythonw.exe" );
|
||||||
|
|
||||||
if( pythonExe.IsFileExecutable() )
|
if( pythonExe.IsFileExecutable() )
|
||||||
return pythonExe.GetFullPath();
|
return pythonExe.GetFullPath();
|
||||||
@ -174,7 +178,7 @@ wxString PYTHON_MANAGER::FindPythonInterpreter()
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
wxArrayString output;
|
wxArrayString output;
|
||||||
|
|
||||||
if( 0 == wxExecute( wxS( "where python.exe" ), output, wxEXEC_SYNC ) )
|
if( 0 == wxExecute( wxS( "where pythonw.exe" ), output, wxEXEC_SYNC ) )
|
||||||
{
|
{
|
||||||
if( !output.IsEmpty() )
|
if( !output.IsEmpty() )
|
||||||
return output[0];
|
return output[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user