revert link-time plugin registration causing plugins to be incorrectly enumerated

This commit is contained in:
Tomasz Włostowski 2017-11-04 21:00:42 +01:00
parent f5c561e281
commit a67d24a34e
8 changed files with 10 additions and 25 deletions

View File

@ -2254,7 +2254,3 @@ bool EAGLE_PLUGIN::IsFootprintLibWritable( const wxString& aLibraryPath )
}
*/
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::EAGLE, wxT("Eagle"), []() -> PLUGIN* { return new EAGLE_PLUGIN; } );
};

View File

@ -594,10 +594,6 @@ void GITHUB_PLUGIN::remoteGetZip( const wxString& aRepoURL )
}
}
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::GITHUB, wxT("Github"), []() -> PLUGIN* { return new GITHUB_PLUGIN; } );
};
#if 0 && defined(STANDALONE)
int main( int argc, char** argv )

View File

@ -1141,7 +1141,3 @@ bool GPCB_PLUGIN::IsFootprintLibWritable( const wxString& aLibraryPath )
return m_cache->IsWritable();
}
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::GEDA_PCB, wxT("GEDA/Pcb"), []() -> PLUGIN* { return new GPCB_PLUGIN; } );
};

View File

@ -204,3 +204,10 @@ void IO_MGR::Save( PCB_FILE_T aFileType, const wxString& aFileName, BOARD* aBoar
THROW_IO_ERROR( wxString::Format( FMT_NOTFOUND, ShowType( aFileType ).GetData() ) );
}
static IO_MGR::REGISTER_PLUGIN registerEaglePlugin( IO_MGR::EAGLE, wxT("Eagle"), []() -> PLUGIN* { return new EAGLE_PLUGIN; } );
static IO_MGR::REGISTER_PLUGIN registerKicadPlugin( IO_MGR::KICAD_SEXP, wxT("KiCad"), []() -> PLUGIN* { return new PCB_IO; } );
static IO_MGR::REGISTER_PLUGIN registerPcadPlugin( IO_MGR::PCAD, wxT("P-Cad"), []() -> PLUGIN* { return new PCAD_PLUGIN; } );
static IO_MGR::REGISTER_PLUGIN registerGithubPlugin( IO_MGR::GITHUB, wxT("Github"), []() -> PLUGIN* { return new GITHUB_PLUGIN; } );
static IO_MGR::REGISTER_PLUGIN registerLegacyPlugin( IO_MGR::LEGACY, wxT("Legacy"), []() -> PLUGIN* { return new LEGACY_PLUGIN; } );
static IO_MGR::REGISTER_PLUGIN registerGPCBPlugin( IO_MGR::GEDA_PCB, wxT("GEDA/Pcb"), []() -> PLUGIN* { return new GPCB_PLUGIN; } );

View File

@ -2214,7 +2214,3 @@ bool PCB_IO::IsFootprintLibWritable( const wxString& aLibraryPath )
return m_cache->IsWritable();
}
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::KICAD_SEXP, wxT("KiCad"), []() -> PLUGIN* { return new PCB_IO; } );
};

View File

@ -3505,7 +3505,3 @@ LEGACY_PLUGIN::~LEGACY_PLUGIN()
delete m_cache;
delete m_mapping;
}
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::LEGACY, wxT("Legacy"), []() -> PLUGIN* { return new LEGACY_PLUGIN; } );
};

View File

@ -89,7 +89,3 @@ BOARD* PCAD_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const P
return m_board;
}
namespace {
static IO_MGR::REGISTER_PLUGIN registerSelf( IO_MGR::PCAD, wxT("P-Cad"), []() -> PLUGIN* { return new PCAD_PLUGIN; } );
};

View File

@ -27,7 +27,7 @@ find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml stc R
add_definitions(-DBOOST_TEST_DYN_LINK -DPCBNEW)
add_dependencies( pnsrouter pcbcommon )
add_dependencies( pnsrouter pcbcommon pcad2kicadpcb github_plugin )
add_executable(test_window
test.cpp
@ -80,6 +80,8 @@ target_link_libraries( test_window
pcbcommon
bitmaps
gal
pcad2kicadpcb
github_plugin
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}