kicad/kicad-user-library.patch

27 lines
1.2 KiB
Diff

Index: common/kiface_i.cpp
===================================================================
--- common/kiface_i.cpp.orig
+++ common/kiface_i.cpp
@@ -53,6 +53,7 @@ static void setSearchPaths( SEARCH_STACK
fn.AppendDir( wxT( "library" ) );
aDst->AddPaths( fn.GetPath() );
+
fn.AppendDir( wxT( "doc" ) );
aDst->AddPaths( fn.GetPath() );
@@ -60,6 +61,13 @@ static void setSearchPaths( SEARCH_STACK
fn.RemoveLastDir();
fn.RemoveLastDir(); // "../../" up twice, removing library/doc/
}
+ // user local library
+ wxString homeDir = wxFileName::GetHomeDir();
+ aDst->AddPaths( homeDir + wxT( "/.local/share/kicad/library-repos/kicad-library/library" ) );
+ aDst->AddPaths( homeDir + wxT( "/.local/share/kicad/library-repos/kicad-library/modules" ) );
+ aDst->AddPaths( homeDir + wxT( "/.local/share/kicad/library-repos/kicad-library/modules/packages3d" ) );
+ aDst->AddPaths( homeDir + wxT( "/.local/share/kicad/library-repos/kicad-library/template" ) );
+
// Add PCB library file path to search path list.
if( aId == KIWAY::FACE_PCB || aId == KIWAY::FACE_CVPCB )