From 61025de86571fc1f5c80588e4023f67b8b88a0f4 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sun, 21 Mar 2021 07:05:40 -0700 Subject: [PATCH] Update default paths for symbols/footprints Changes the default search path (if not initialized) to "symbols" from "library" and to "footprints" from "modules" --- common/kiface_base.cpp | 13 +++++++++++++ common/settings/common_settings.cpp | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/common/kiface_base.cpp b/common/kiface_base.cpp index 2550e5cf69..a5cd091cff 100644 --- a/common/kiface_base.cpp +++ b/common/kiface_base.cpp @@ -55,6 +55,15 @@ static void setSearchPaths( SEARCH_STACK* aDst, KIWAY::FACE_T aId ) fn.RemoveLastDir(); fn.RemoveLastDir(); // "../../" up twice, removing library/doc/ + + fn.AppendDir( wxT( "symbols" ) ); + aDst->AddPaths( fn.GetPath() ); + + fn.AppendDir( wxT( "doc" ) ); + aDst->AddPaths( fn.GetPath() ); + + fn.RemoveLastDir(); + fn.RemoveLastDir(); // "../../" up twice, removing symbols/doc/ } // Add PCB library file path to search path list. @@ -64,6 +73,10 @@ static void setSearchPaths( SEARCH_STACK* aDst, KIWAY::FACE_T aId ) aDst->AddPaths( fn.GetPath() ); fn.RemoveLastDir(); + fn.AppendDir( wxT( "footprints" ) ); + aDst->AddPaths( fn.GetPath() ); + fn.RemoveLastDir(); + // Add 3D module library file path to search path list. fn.AppendDir( wxT( "3dmodels" ) ); aDst->AddPaths( fn.GetPath() ); diff --git a/common/settings/common_settings.cpp b/common/settings/common_settings.cpp index 19428ce565..abce46d6a3 100644 --- a/common/settings/common_settings.cpp +++ b/common/settings/common_settings.cpp @@ -501,7 +501,7 @@ void COMMON_SETTINGS::InitializeEnvironment() wxFileName basePath( PATHS::GetStockEDALibraryPath(), wxEmptyString ); wxFileName path( basePath ); - path.AppendDir( wxT( "modules" ) ); + path.AppendDir( wxT( "footprints" ) ); addVar( wxT( "KICAD6_FOOTPRINT_DIR" ), path.GetFullPath() ); path = basePath; @@ -552,6 +552,6 @@ void COMMON_SETTINGS::InitializeEnvironment() addVar( wxT( "KICAD6_3RD_PARTY" ), PATHS::GetDefault3rdPartyPath() ); path = basePath; - path.AppendDir( wxT( "library" ) ); + path.AppendDir( wxT( "symbols" ) ); addVar( wxT( "KICAD6_SYMBOL_DIR" ), path.GetFullPath() ); }