pcbnew: Prevent GITHUB plugin from being registered

If the user does not build the GITHUB plugin (deprecated), we cannot use
it in our footprint load and should remove the define to ensure
accidental use is caught at compile time.
This commit is contained in:
Seth Hillbrand 2019-01-14 23:40:25 -08:00
parent 47492f9452
commit 9458ae8221
3 changed files with 8 additions and 1 deletions

View File

@ -300,7 +300,9 @@ PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent,
wxArrayString choices;
choices.Add( IO_MGR::ShowType( IO_MGR::KICAD_SEXP ) );
#if defined(BUILD_GITHUB_PLUGIN)
choices.Add( IO_MGR::ShowType( IO_MGR::GITHUB ) );
#endif
choices.Add( IO_MGR::ShowType( IO_MGR::LEGACY ) );
choices.Add( IO_MGR::ShowType( IO_MGR::EAGLE ) );
choices.Add( IO_MGR::ShowType( IO_MGR::GEDA_PCB ) );

View File

@ -155,6 +155,7 @@ IO_MGR::PCB_FILE_T IO_MGR::GuessPluginTypeFromLibPath( const wxString& aLibPath
}
else
{
#if defined(BUILD_GITHUB_PLUGIN)
// There is no extension for a remote repo, so test the server name.
wxURI uri( aLibPath );
@ -162,6 +163,7 @@ IO_MGR::PCB_FILE_T IO_MGR::GuessPluginTypeFromLibPath( const wxString& aLibPath
{
ret = GITHUB;
}
#endif
}
return ret;

View File

@ -56,8 +56,11 @@ public:
EAGLE,
PCAD,
GEDA_PCB, ///< Geda PCB file formats.
GITHUB, ///< Read only http://github.com repo holding pretty footprints
//N.B. This needs to be commented out to ensure compile-type errors
#if defined(BUILD_GITHUB_PLUGIN)
GITHUB, ///< Read only http://github.com repo holding pretty footprints
#endif
// add your type here.
// ALTIUM,