From 211820a689a618ac5bcbea19a8c58d345ce25ddb Mon Sep 17 00:00:00 2001 From: qu1ck Date: Sun, 2 Jan 2022 10:14:15 -0800 Subject: [PATCH] Remove KICAD_PCM cmake option --- CMakeLists.txt | 4 ---- kicad/CMakeLists.txt | 12 +++--------- kicad/dialogs/panel_kicad_launcher.cpp | 2 -- kicad/kicad_manager_frame.cpp | 4 ---- kicad/kicad_settings.cpp | 2 -- kicad/kicad_settings.h | 2 -- kicad/menubar.cpp | 2 -- kicad/tools/kicad_manager_actions.cpp | 2 -- kicad/tools/kicad_manager_actions.h | 2 -- kicad/tools/kicad_manager_control.cpp | 7 ------- 10 files changed, 3 insertions(+), 36 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f444f1434..e05c46c939 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,10 +142,6 @@ option( KICAD_GAL_PROFILE "Enable profiling info for GAL" OFF ) -option( KICAD_PCM - "Build Plugin and Content Manager" - ON ) - cmake_dependent_option( KICAD_WIN32_INSTALL_PDBS "Installs debug pdb to the bin folder, DO NOT USE (NOR REQUIRED) FOR DEBUGGING THE SOURCE ON MSVC. This is purely for release building. MSVC can find the PDBs without this." diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 4e19c4841a..a90c37d2ab 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -5,20 +5,16 @@ if( COMPILER_SUPPORTS_WARNINGS ) endif() add_definitions( -DKICAD ) +add_subdirectory( pcm ) include_directories( BEFORE ${INC_BEFORE} ) include_directories( ${CMAKE_SOURCE_DIR}/pcbnew ${CMAKE_SOURCE_DIR}/eeschema + ${CMAKE_SOURCE_DIR}/kicad/pcm ${INC_AFTER} ) -if ( KICAD_PCM ) - add_definitions( -DPCM ) - add_subdirectory( pcm ) - include_directories( ./pcm ) -endif ( KICAD_PCM ) - set( KICAD_SRCS dialogs/dialog_template_selector_base.cpp dialogs/dialog_template_selector.cpp @@ -96,9 +92,7 @@ else() ) endif() -if( KICAD_PCM ) - target_link_libraries( kicad pcm ) -endif() +target_link_libraries( kicad pcm ) install( TARGETS kicad DESTINATION ${KICAD_BIN} diff --git a/kicad/dialogs/panel_kicad_launcher.cpp b/kicad/dialogs/panel_kicad_launcher.cpp index 3020a271d3..cb0217f779 100644 --- a/kicad/dialogs/panel_kicad_launcher.cpp +++ b/kicad/dialogs/panel_kicad_launcher.cpp @@ -144,11 +144,9 @@ void PANEL_KICAD_LAUNCHER::CreateLaunchers() _( "Edit drawing sheet borders and title blocks for use in schematics and PCB " "designs" ) ); -#ifdef PCM addLauncher( KICAD_MANAGER_ACTIONS::showPluginManager, KiScaledBitmap( BITMAPS::icon_pcm, this, 48, true ), _( "Manage downloadable packages from KiCad and 3rd party repositories" ) ); -#endif Layout(); } diff --git a/kicad/kicad_manager_frame.cpp b/kicad/kicad_manager_frame.cpp index 915e4fe06f..d3156e8026 100644 --- a/kicad/kicad_manager_frame.cpp +++ b/kicad/kicad_manager_frame.cpp @@ -97,10 +97,8 @@ BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME ) END_EVENT_TABLE() -#ifdef PCM // See below the purpose of this include #include -#endif KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size ) : @@ -114,13 +112,11 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& titl m_leftWinWidth = 250; // Default value m_aboutTitle = "KiCad"; -#ifdef PCM // JPC: A very ugly hack to fix an issue on Linux: if the wxbase315u_xml_gcc_custom.so is // used **only** in PCM, it is not found in some cases at run time. // So just use it in the main module to avoid a not found issue // wxbase315u_xml_gcc_custom shared object when launching Kicad wxXmlDocument dummy; -#endif // Create the status line (bottom of the frame). Left half is for project name; right half // is for Reporter (currently used by archiver/unarchiver). diff --git a/kicad/kicad_settings.cpp b/kicad/kicad_settings.cpp index a37a77b24c..a2c839f0c3 100644 --- a/kicad/kicad_settings.cpp +++ b/kicad/kicad_settings.cpp @@ -35,7 +35,6 @@ KICAD_SETTINGS::KICAD_SETTINGS() : m_params.emplace_back( new PARAM_LIST( "system.open_projects", &m_OpenProjects, {} ) ); -#ifdef PCM m_params.emplace_back( new PARAM_LAMBDA( "pcm.repositories", [&]() -> nlohmann::json @@ -76,7 +75,6 @@ KICAD_SETTINGS::KICAD_SETTINGS() : m_params.emplace_back( new PARAM( "pcm.last_download_dir", &m_PcmLastDownloadDir, "" ) ); -#endif } diff --git a/kicad/kicad_settings.h b/kicad/kicad_settings.h index 60dadea4b7..aac6173285 100644 --- a/kicad/kicad_settings.h +++ b/kicad/kicad_settings.h @@ -37,10 +37,8 @@ public: std::vector m_OpenProjects; -#ifdef PCM std::vector> m_PcmRepositories; wxString m_PcmLastDownloadDir; -#endif protected: virtual std::string getLegacyFrameName() const override { return "KicadFrame"; } diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp index aa0c7147f2..227d74601b 100644 --- a/kicad/menubar.cpp +++ b/kicad/menubar.cpp @@ -157,9 +157,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() toolsMenu->Add( KICAD_MANAGER_ACTIONS::convertImage ); toolsMenu->Add( KICAD_MANAGER_ACTIONS::showCalculator ); toolsMenu->Add( KICAD_MANAGER_ACTIONS::editDrawingSheet ); -#ifdef PCM toolsMenu->Add( KICAD_MANAGER_ACTIONS::showPluginManager ); -#endif toolsMenu->AppendSeparator(); toolsMenu->Add( _( "Edit Local File..." ), diff --git a/kicad/tools/kicad_manager_actions.cpp b/kicad/tools/kicad_manager_actions.cpp index ba1b846680..41f33923f7 100644 --- a/kicad/tools/kicad_manager_actions.cpp +++ b/kicad/tools/kicad_manager_actions.cpp @@ -110,13 +110,11 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::editDrawingSheet( "kicad.Control.editDrawingS _( "Drawing Sheet Editor" ), _( "Edit drawing sheet borders and title block" ), BITMAPS::icon_pagelayout_editor_24 ); -#ifdef PCM TOOL_ACTION KICAD_MANAGER_ACTIONS::showPluginManager( "kicad.Control.pluginContentManager", AS_GLOBAL, MD_CTRL + 'M', "", _( "Plugin and Content Manager" ), _( "Run Plugin and Content Manager" ), BITMAPS::icon_pcm_24 ); -#endif TOOL_ACTION KICAD_MANAGER_ACTIONS::openTextEditor( "kicad.Control.openTextEditor", AS_GLOBAL, diff --git a/kicad/tools/kicad_manager_actions.h b/kicad/tools/kicad_manager_actions.h index 36f12300fb..2f719f1641 100644 --- a/kicad/tools/kicad_manager_actions.h +++ b/kicad/tools/kicad_manager_actions.h @@ -46,9 +46,7 @@ public: static TOOL_ACTION showCalculator; static TOOL_ACTION editDrawingSheet; static TOOL_ACTION openTextEditor; -#ifdef PCM static TOOL_ACTION showPluginManager; -#endif static TOOL_ACTION editOtherSch; static TOOL_ACTION editOtherPCB; diff --git a/kicad/tools/kicad_manager_control.cpp b/kicad/tools/kicad_manager_control.cpp index 580b72330c..0d6bdab3cc 100644 --- a/kicad/tools/kicad_manager_control.cpp +++ b/kicad/tools/kicad_manager_control.cpp @@ -37,10 +37,7 @@ #include #include #include - -#ifdef PCM #include "dialog_pcm.h" -#endif ///> Helper widget to select whether a new directory should be created for a project. @@ -819,7 +816,6 @@ int KICAD_MANAGER_CONTROL::Execute( const TOOL_EVENT& aEvent ) int KICAD_MANAGER_CONTROL::ShowPluginManager( const TOOL_EVENT& aEvent ) { -#ifdef PCM DIALOG_PCM pcm( m_frame ); pcm.ShowModal(); @@ -827,7 +823,6 @@ int KICAD_MANAGER_CONTROL::ShowPluginManager( const TOOL_EVENT& aEvent ) // PCM keeps the focus althougt the focus was not set to this button. // This hack force removing the focus from this button m_frame->SetFocus(); -#endif return 0; } @@ -858,7 +853,5 @@ void KICAD_MANAGER_CONTROL::setTransitions() Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::editOtherSch.MakeEvent() ); Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::editOtherPCB.MakeEvent() ); -#ifdef PCM Go( &KICAD_MANAGER_CONTROL::ShowPluginManager, KICAD_MANAGER_ACTIONS::showPluginManager.MakeEvent() ); -#endif }