Re-enable KICAD_SCRIPTING_WXPYTHON

This keeps wxpython behind a build flag for platforms (mingw) that do
not yet support it.
This commit is contained in:
Seth Hillbrand 2021-04-23 13:13:03 -07:00
parent 68a5d5dc01
commit e050d42658
3 changed files with 19 additions and 2 deletions

View File

@ -54,6 +54,11 @@ cmake_dependent_option( BUILD_SMALL_DEBUG_FILES "In debug build: create smaller
# so that build option settings can be included in bug reports.
#
option( KICAD_SCRIPTING_WXPYTHON
"Build wxPython implementation for wx interface building in Python and py.shell (default ON)."
ON )
mark_as_advanced( KICAD_SCRIPTING_WXPYTHON )
option( KICAD_USE_OCE
"Build tools and plugins related to OpenCascade Community Edition (default ON)"
ON )
@ -449,6 +454,10 @@ if( MSVC )
endif()
endif()
if( KICAD_SCRIPTING_WXPYTHON )
add_definitions( -DKICAD_SCRIPTING_WXPYTHON )
endif()
if( KICAD_SPICE )
add_definitions( -DKICAD_SPICE )
endif()

View File

@ -32,6 +32,7 @@
#include <pcb_edit_frame.h>
#include <pcbnew_id.h>
#include <pgm_base.h>
#include <python_scripting.h>
#include <tool/actions.h>
#include <tool/tool_manager.h>
#include <tools/pcb_actions.h>
@ -406,8 +407,11 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
update = toolsMenu->Add( ACTIONS::updateSchematicFromPcb );
update->Enable( !Kiface().IsSingle() );
toolsMenu->AppendSeparator();
toolsMenu->Add( PCB_ACTIONS::showPythonConsole );
if( SCRIPTING::IsWxAvailable() )
{
toolsMenu->AppendSeparator();
toolsMenu->Add( PCB_ACTIONS::showPythonConsole );
}
ACTION_MENU* submenuActionPlugins = new ACTION_MENU( false, selTool );
submenuActionPlugins->SetTitle( _( "External Plugins" ) );

View File

@ -93,7 +93,11 @@ SCRIPTING::~SCRIPTING()
bool SCRIPTING::IsWxAvailable()
{
#ifdef KICAD_SCRIPTING_WXPYTHON
return true;
#else
return false;
#endif
}
bool SCRIPTING::scriptingSetup()