ADDED Migrate libraries button in Footprint Library Table

Allows easy migration of legacy and non-KiCad footprint libraries
This commit is contained in:
Roberto Fernandez Bautista 2023-08-28 22:44:10 +02:00
parent f693366910
commit 32b6deb8b1
8 changed files with 271 additions and 21 deletions

View File

@ -175,6 +175,7 @@ const std::string FootprintPlaceFileExtension( "pos" );
const std::string KiCadFootprintLibPathExtension( "pretty" ); // this is a directory const std::string KiCadFootprintLibPathExtension( "pretty" ); // this is a directory
const std::string LegacyFootprintLibPathExtension( "mod" ); // this is a file const std::string LegacyFootprintLibPathExtension( "mod" ); // this is a file
const std::string AltiumFootprintLibPathExtension( "PcbLib" ); // this is a file const std::string AltiumFootprintLibPathExtension( "PcbLib" ); // this is a file
const std::string CadstarFootprintLibPathExtension( "cpa" ); // this is a file
const std::string EagleFootprintLibPathExtension( "lbr" ); // this is a file const std::string EagleFootprintLibPathExtension( "lbr" ); // this is a file
const std::string GedaPcbFootprintLibFileExtension( "fp" ); // this is a file const std::string GedaPcbFootprintLibFileExtension( "fp" ); // this is a file

View File

@ -160,6 +160,7 @@ extern const std::string FootprintPlaceFileExtension;
extern const std::string KiCadFootprintFileExtension; extern const std::string KiCadFootprintFileExtension;
extern const std::string KiCadFootprintLibPathExtension; extern const std::string KiCadFootprintLibPathExtension;
extern const std::string AltiumFootprintLibPathExtension; extern const std::string AltiumFootprintLibPathExtension;
extern const std::string CadstarFootprintLibPathExtension;
extern const std::string LtspiceSchematicExtension; extern const std::string LtspiceSchematicExtension;
extern const std::string LtspiceSymbolExtension; extern const std::string LtspiceSymbolExtension;
extern const std::string GedaPcbFootprintLibFileExtension; extern const std::string GedaPcbFootprintLibFileExtension;

View File

@ -272,17 +272,18 @@ protected:
}; };
PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, PROJECT* aProject,
FP_LIB_TABLE* aGlobal, const wxString& aGlobalTblPath, FP_LIB_TABLE* aGlobalTable, const wxString& aGlobalTblPath,
FP_LIB_TABLE* aProject, const wxString& aProjectTblPath, FP_LIB_TABLE* aProjectTable, const wxString& aProjectTblPath,
const wxString& aProjectBasePath ) : const wxString& aProjectBasePath ) :
PANEL_FP_LIB_TABLE_BASE( aParent ), PANEL_FP_LIB_TABLE_BASE( aParent ),
m_global( aGlobal ), m_globalTable( aGlobalTable ),
m_projectTable( aProjectTable ),
m_project( aProject ), m_project( aProject ),
m_projectBasePath( aProjectBasePath ), m_projectBasePath( aProjectBasePath ),
m_parent( aParent ) m_parent( aParent )
{ {
m_global_grid->SetTable( new FP_LIB_TABLE_GRID( *aGlobal ), true ); m_global_grid->SetTable( new FP_LIB_TABLE_GRID( *aGlobalTable ), true );
// add Cut, Copy, and Paste to wxGrids // add Cut, Copy, and Paste to wxGrids
m_path_subs_grid->PushEventHandler( new GRID_TRICKS( m_path_subs_grid ) ); m_path_subs_grid->PushEventHandler( new GRID_TRICKS( m_path_subs_grid ) );
@ -361,9 +362,9 @@ PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent,
populateEnvironReadOnlyTable(); populateEnvironReadOnlyTable();
if( aProject ) if( aProjectTable )
{ {
m_project_grid->SetTable( new FP_LIB_TABLE_GRID( *aProject ), true ); m_project_grid->SetTable( new FP_LIB_TABLE_GRID( *aProjectTable ), true );
setupGrid( m_project_grid ); setupGrid( m_project_grid );
} }
else else
@ -733,6 +734,149 @@ void PANEL_FP_LIB_TABLE::moveDownHandler( wxCommandEvent& event )
} }
// @todo refactor this function into single location shared with PANEL_SYM_LIB_TABLE
void PANEL_FP_LIB_TABLE::onMigrateLibraries( wxCommandEvent& event )
{
if( !m_cur_grid->CommitPendingChanges() )
return;
wxArrayInt selectedRows = m_cur_grid->GetSelectedRows();
if( selectedRows.empty() && m_cur_grid->GetGridCursorRow() >= 0 )
selectedRows.push_back( m_cur_grid->GetGridCursorRow() );
wxArrayInt rowsToMigrate;
wxString kicadType = IO_MGR::ShowType( IO_MGR::KICAD_SEXP );
wxString msg;
for( int row : selectedRows )
{
if( m_cur_grid->GetCellValue( row, COL_TYPE ) != kicadType )
rowsToMigrate.push_back( row );
}
if( rowsToMigrate.size() <= 0 )
{
wxMessageBox( wxString::Format( _( "Select one or more rows containing libraries "
"to save as current KiCad format." ) ) );
return;
}
else
{
if( rowsToMigrate.size() == 1 )
{
msg.Printf( _( "Save '%s' as current KiCad format "
"and replace entry in table?" ),
m_cur_grid->GetCellValue( rowsToMigrate[0], COL_NICKNAME ) );
}
else
{
msg.Printf( _( "Save %d libraries as current KiCad format "
"and replace entries in table?" ),
(int) rowsToMigrate.size() );
}
if( !IsOK( m_parent, msg ) )
return;
}
for( int row : rowsToMigrate )
{
wxString libName = m_cur_grid->GetCellValue( row, COL_NICKNAME );
wxString relPath = m_cur_grid->GetCellValue( row, COL_URI );
wxString resolvedPath = ExpandEnvVarSubstitutions( relPath, m_project );
wxFileName legacyLib( resolvedPath );
if( !legacyLib.Exists() )
{
msg.Printf( _( "Library '%s' not found." ), relPath );
DisplayErrorMessage( this, msg );
continue;
}
wxFileName newLib( resolvedPath );
newLib.AppendDir( newLib.GetName() + "." + KiCadFootprintLibPathExtension );
newLib.SetName( "" );
newLib.ClearExt();
if( newLib.DirExists() )
{
msg.Printf( _( "Folder '%s' already exists. Do you want overwrite any existing footprints?" ),
newLib.GetFullPath() );
switch( wxMessageBox( msg, _( "Migrate Library" ),
wxYES_NO | wxCANCEL | wxICON_QUESTION, m_parent ) )
{
case wxYES: break;
case wxNO: continue;
case wxCANCEL: return;
}
}
wxString options = m_cur_grid->GetCellValue( row, COL_OPTIONS );
std::unique_ptr<STRING_UTF8_MAP> props( LIB_TABLE::ParseOptions( options.ToStdString() ) );
if( convertLibrary( props.get(), legacyLib.GetFullPath(), newLib.GetFullPath() ) )
{
relPath = NormalizePath( newLib.GetFullPath(), &Pgm().GetLocalEnvVariables(),
m_project );
// Do not use the project path in the global library table. This will almost
// assuredly be wrong for a different project.
if( m_cur_grid == m_global_grid && relPath.Contains( "${KIPRJMOD}" ) )
relPath = newLib.GetFullPath();
m_cur_grid->SetCellValue( row, COL_URI, relPath );
m_cur_grid->SetCellValue( row, COL_TYPE, kicadType );
}
else
{
msg.Printf( _( "Failed to save footprint library file '%s'." ), newLib.GetFullPath() );
DisplayErrorMessage( this, msg );
}
}
}
bool PANEL_FP_LIB_TABLE::convertLibrary( STRING_UTF8_MAP* aOldFileProps,
const wxString& aOldFilePath,
const wxString& aNewFilePath)
{
IO_MGR::PCB_FILE_T oldFileType = IO_MGR::GuessPluginTypeFromLibPath( aOldFilePath );
if( oldFileType == IO_MGR::FILE_TYPE_NONE )
return false;
PLUGIN::RELEASER oldFilePI( IO_MGR::PluginFind( oldFileType ) );
PLUGIN::RELEASER kicadPI( IO_MGR::PluginFind( IO_MGR::KICAD_SEXP ) );
wxArrayString fpNames;
wxFileName newFileName( aNewFilePath );
try
{
if( !newFileName.DirExists() )
wxMkDir( aNewFilePath );
bool bestEfforts = false; // throw on first error
oldFilePI->FootprintEnumerate( fpNames, aOldFilePath, bestEfforts, aOldFileProps );
for ( const wxString& fpName : fpNames )
{
std::unique_ptr<const FOOTPRINT> fp( oldFilePI->GetEnumeratedFootprint( aOldFilePath, fpName, aOldFileProps ) );
kicadPI->FootprintSave( aNewFilePath, fp.get() );
}
}
catch( ... )
{
return false;
}
return true;
}
void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event ) void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
{ {
if( !m_cur_grid->CommitPendingChanges() ) if( !m_cur_grid->CommitPendingChanges() )
@ -899,20 +1043,20 @@ bool PANEL_FP_LIB_TABLE::TransferDataFromWindow()
if( verifyTables() ) if( verifyTables() )
{ {
if( *global_model() != *m_global ) if( *global_model() != *m_globalTable )
{ {
m_parent->m_GlobalTableChanged = true; m_parent->m_GlobalTableChanged = true;
m_global->Clear(); m_globalTable->Clear();
m_global->TransferRows( global_model()->m_rows ); m_globalTable->TransferRows( global_model()->m_rows );
} }
if( project_model() && *project_model() != *m_project ) if( project_model() && *project_model() != *m_projectTable )
{ {
m_parent->m_ProjectTableChanged = true; m_parent->m_ProjectTableChanged = true;
m_project->Clear(); m_projectTable->Clear();
m_project->TransferRows( project_model()->m_rows ); m_projectTable->TransferRows( project_model()->m_rows );
} }
return true; return true;
@ -1010,7 +1154,7 @@ void InvokePcbLibTableEditor( KIWAY* aKiway, wxWindow* aCaller )
if( aKiway->Prj().IsNullProject() ) if( aKiway->Prj().IsNullProject() )
projectTable = nullptr; projectTable = nullptr;
dlg.InstallPanel( new PANEL_FP_LIB_TABLE( &dlg, globalTable, globalTablePath, dlg.InstallPanel( new PANEL_FP_LIB_TABLE( &dlg, &aKiway->Prj(), globalTable, globalTablePath,
projectTable, projectTablePath, projectTable, projectTablePath,
aKiway->Prj().GetProjectPath() ) ); aKiway->Prj().GetProjectPath() ) );

View File

@ -26,6 +26,7 @@
class FP_LIB_TABLE; class FP_LIB_TABLE;
class FP_LIB_TABLE_GRID; class FP_LIB_TABLE_GRID;
class PROJECT;
/** /**
@ -35,9 +36,9 @@ class PANEL_FP_LIB_TABLE : public PANEL_FP_LIB_TABLE_BASE
{ {
public: public:
PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, PROJECT* aProject,
FP_LIB_TABLE* aGlobal, const wxString& aGlobalTblPath, FP_LIB_TABLE* aGlobalTable, const wxString& aGlobalTblPath,
FP_LIB_TABLE* aProject, const wxString& aProjectTblPath, FP_LIB_TABLE* aProjectTable, const wxString& aProjectTblPath,
const wxString& aProjectBasePath ); const wxString& aProjectBasePath );
~PANEL_FP_LIB_TABLE() override; ~PANEL_FP_LIB_TABLE() override;
@ -57,6 +58,7 @@ private:
void deleteRowHandler( wxCommandEvent& event ) override; void deleteRowHandler( wxCommandEvent& event ) override;
void moveUpHandler( wxCommandEvent& event ) override; void moveUpHandler( wxCommandEvent& event ) override;
void moveDownHandler( wxCommandEvent& event ) override; void moveDownHandler( wxCommandEvent& event ) override;
void onMigrateLibraries( wxCommandEvent& event ) override;
void onSizeGrid( wxSizeEvent& event ) override; void onSizeGrid( wxSizeEvent& event ) override;
void adjustPathSubsGridColumns( int aWidth ); void adjustPathSubsGridColumns( int aWidth );
@ -65,6 +67,9 @@ private:
/// by examining all the full_uri columns. /// by examining all the full_uri columns.
void populateEnvironReadOnlyTable(); void populateEnvironReadOnlyTable();
void populatePluginList(); void populatePluginList();
bool convertLibrary( STRING_UTF8_MAP* aOldFileProps, const wxString& aOldFilePath,
const wxString& aNewFilePath );
FP_LIB_TABLE_GRID* global_model() const FP_LIB_TABLE_GRID* global_model() const
{ {
@ -82,8 +87,9 @@ private:
} }
// caller's tables are modified only on OK button and successful verification. // caller's tables are modified only on OK button and successful verification.
FP_LIB_TABLE* m_global; FP_LIB_TABLE* m_globalTable;
FP_LIB_TABLE* m_project; FP_LIB_TABLE* m_projectTable;
PROJECT* m_project;
wxString m_projectBasePath; wxString m_projectBasePath;
DIALOG_EDIT_LIBRARY_TABLES* m_parent; DIALOG_EDIT_LIBRARY_TABLES* m_parent;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // C++ code generated with wxFormBuilder (version 3.10.0-4761b0c)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -151,6 +151,12 @@ PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID i
bButtonsSizer->Add( m_delete_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 ); bButtonsSizer->Add( m_delete_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
bButtonsSizer->Add( 20, 0, 1, wxEXPAND, 5 );
m_migrate_libs_button = new wxButton( this, wxID_ANY, _("Migrate Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_migrate_libs_button, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxALL, 8 ); bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxALL, 8 );
wxStaticText* stPathsLabel; wxStaticText* stPathsLabel;
@ -203,6 +209,7 @@ PANEL_FP_LIB_TABLE_BASE::PANEL_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID i
m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this ); m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this ); m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this ); m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
m_migrate_libs_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
m_path_subs_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this ); m_path_subs_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
} }
@ -214,6 +221,7 @@ PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE()
m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this ); m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this ); m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this ); m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
m_migrate_libs_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
m_path_subs_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this ); m_path_subs_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
} }

View File

@ -796,6 +796,90 @@
<event name="OnButtonClick">deleteRowHandler</event> <event name="OnButtonClick">deleteRowHandler</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">20</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Migrate Libraries</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_migrate_libs_button</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">onMigrateLibraries</event>
</object>
</object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // C++ code generated with wxFormBuilder (version 3.10.0-4761b0c)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO *NOT* EDIT THIS FILE! // PLEASE DO *NOT* EDIT THIS FILE!
@ -51,6 +51,7 @@ class PANEL_FP_LIB_TABLE_BASE : public wxPanel
STD_BITMAP_BUTTON* m_move_up_button; STD_BITMAP_BUTTON* m_move_up_button;
STD_BITMAP_BUTTON* m_move_down_button; STD_BITMAP_BUTTON* m_move_down_button;
STD_BITMAP_BUTTON* m_delete_button; STD_BITMAP_BUTTON* m_delete_button;
wxButton* m_migrate_libs_button;
WX_GRID* m_path_subs_grid; WX_GRID* m_path_subs_grid;
// Virtual event handlers, override them in your derived class // Virtual event handlers, override them in your derived class
@ -59,6 +60,7 @@ class PANEL_FP_LIB_TABLE_BASE : public wxPanel
virtual void moveUpHandler( wxCommandEvent& event ) { event.Skip(); } virtual void moveUpHandler( wxCommandEvent& event ) { event.Skip(); }
virtual void moveDownHandler( wxCommandEvent& event ) { event.Skip(); } virtual void moveDownHandler( wxCommandEvent& event ) { event.Skip(); }
virtual void deleteRowHandler( wxCommandEvent& event ) { event.Skip(); } virtual void deleteRowHandler( wxCommandEvent& event ) { event.Skip(); }
virtual void onMigrateLibraries( wxCommandEvent& event ) { event.Skip(); }
virtual void onSizeGrid( wxSizeEvent& event ) { event.Skip(); } virtual void onSizeGrid( wxSizeEvent& event ) { event.Skip(); }

View File

@ -162,6 +162,10 @@ IO_MGR::PCB_FILE_T IO_MGR::GuessPluginTypeFromLibPath( const wxString& aLibPath
{ {
ret = ALTIUM_DESIGNER; ret = ALTIUM_DESIGNER;
} }
else if( fn.GetExt() == CadstarFootprintLibPathExtension )
{
ret = CADSTAR_PCB_ARCHIVE;
}
// Test this one anyways, even though it's the default guess, to avoid // Test this one anyways, even though it's the default guess, to avoid
// the wxURI instantiation below. // the wxURI instantiation below.