Commit 2aa27122 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

Eliminate many assumptions in Pcbnew's library manager, pertaining to locality of libraries and

their type, by using the more abstract PLUGIN::Footprint*() functions.

This is an intermediate phase only, other changes will be necessary as library table support comes in.
Encapsulate usage of library path searching, since that will go away as library table support comes in.
Add FOOTPRINT_EDIT_FRAME::{get,set}LibPath() and FOOTPRINT_EDIT_FRAME::{get,set}LibNickName() functions
to provide this encapsulation.
parent cb62f5c8
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -4,6 +4,16 @@ KiCad ChangeLog 2012
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.


2012-Nov-19 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
Eliminate many assumptions in Pcbnew's library manager, pertaining to locality of libraries and
their type, by using the more abstract PLUGIN::Footprint*() functions.

This is an intermediate phase only, other changes will be necessary as library table support comes in.
Encapsulate usage of library path searching, since that will go away as library table support comes in.
Add FOOTPRINT_EDIT_FRAME::{get,set}LibPath() and FOOTPRINT_EDIT_FRAME::{get,set}LibNickName() functions
to provide this encapsulation.

2012-Nov-14 UPDATE Dick Hollenbeck <dick@softplc.com>
2012-Nov-14 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
================================================================================
1) Switch to boost hashtable support from wx macros which did not handle std::string.
1) Switch to boost hashtable support from wx macros which did not handle std::string.
+0 −12
Original line number Original line Diff line number Diff line
@@ -20,15 +20,9 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
# reports.
# reports.
#
#


option(USE_PCBNEW_SEXPR_FILE_FORMAT
       "Use Pcbnew s-expression file format support (default OFF)." )

option(USE_PCBNEW_NANOMETRES
option(USE_PCBNEW_NANOMETRES
       "Use nanometers for Pcbnew internal units instead of deci-mils (default ON)." ON)
       "Use nanometers for Pcbnew internal units instead of deci-mils (default ON)." ON)


option(USE_PCBNEW_SEXPR_FOOTPRINT_LIBS
       "Use Pcbnew s-expression footprint library format (default OFF).")

# Russian GOST patch
# Russian GOST patch
option(wxUSE_UNICODE "enable/disable building unicode (default OFF)")
option(wxUSE_UNICODE "enable/disable building unicode (default OFF)")
option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)")
option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)")
@@ -91,12 +85,6 @@ else (KICAD_STABLE_VERSION )
    endif(KICAD_TESTING_VERSION )
    endif(KICAD_TESTING_VERSION )
endif(KICAD_STABLE_VERSION )
endif(KICAD_STABLE_VERSION )


# Nanometers must be enabled when USE_PCBNEW_SEXPR_FILE_FORMAT=ON.
if( USE_PCBNEW_SEXPR_FILE_FORMAT AND NOT USE_PCBNEW_NANOMETRES )
    set( TMP "The Pcbnew s-expression file format requires nano-meter internal units to be " )
    set( TMP "${TMP} enabled using -DUSE_PCBNEW_NANOMETRES=ON." )
    message( FATAL_ERROR ${TMP} )
endif( USE_PCBNEW_SEXPR_FILE_FORMAT AND NOT USE_PCBNEW_NANOMETRES )


#================================================
#================================================
# Set flags for GCC.
# Set flags for GCC.
+0 −2
Original line number Original line Diff line number Diff line
@@ -60,8 +60,6 @@


/// Definitions to enable the s-expression file formats and nanometer units.
/// Definitions to enable the s-expression file formats and nanometer units.
#cmakedefine USE_PCBNEW_NANOMETRES
#cmakedefine USE_PCBNEW_NANOMETRES
#cmakedefine USE_PCBNEW_SEXPR_FILE_FORMAT
#cmakedefine USE_PCBNEW_SEXPR_FOOTPRINT_LIBS


/// The legacy file format revision of the *.brd file created by this build
/// The legacy file format revision of the *.brd file created by this build
#if defined(USE_PCBNEW_NANOMETRES)
#if defined(USE_PCBNEW_NANOMETRES)
+0 −14
Original line number Original line Diff line number Diff line
@@ -506,13 +506,6 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )


    tmp << wxT( "Options: " );
    tmp << wxT( "Options: " );


    tmp << wxT( "USE_PCBNEW_SEXPR_FILE_FORMAT=" );
#ifdef USE_PCBNEW_SEXPR_FILE_FORMAT
    tmp << wxT( "ON\n" );
#else
    tmp << wxT( "OFF\n" );
#endif

    tmp << wxT( "         USE_PCBNEW_NANOMETRES=" );
    tmp << wxT( "         USE_PCBNEW_NANOMETRES=" );
#ifdef USE_PCBNEW_NANOMETRES
#ifdef USE_PCBNEW_NANOMETRES
    tmp << wxT( "ON\n" );
    tmp << wxT( "ON\n" );
@@ -520,13 +513,6 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
    tmp << wxT( "OFF\n" );
    tmp << wxT( "OFF\n" );
#endif
#endif


    tmp << wxT( "         USE_PCBNEW_SEXPR_FOOTPRINT_LIBS=" );
#ifdef USE_PCBNEW_SEXPR_FOOTPRINT_LIBS
    tmp << wxT( "ON\n" );
#else
    tmp << wxT( "OFF\n" );
#endif

    tmp << wxT( "         KICAD_GOST=" );
    tmp << wxT( "         KICAD_GOST=" );
#ifdef KICAD_GOST
#ifdef KICAD_GOST
    tmp << wxT( "ON\n" );
    tmp << wxT( "ON\n" );
+1 −1
Original line number Original line Diff line number Diff line
@@ -54,7 +54,7 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( wxArrayString& aFootprintsLibNames )
        {
        {
            wxFileName filename = aFootprintsLibNames[ii];
            wxFileName filename = aFootprintsLibNames[ii];


            filename.SetExt( FootprintLibFileExtension );
            filename.SetExt( LegacyFootprintLibPathExtension );


            wxString libPath = wxGetApp().FindLibraryPath( filename );
            wxString libPath = wxGetApp().FindLibraryPath( filename );


Loading