26#include <wx/stdpaths.h>
54 maybe.
AddPaths( wxGetenv( wxT(
"KICAD" ) ) );
58 maybe.
AddPaths( PATHS::GetOSXKicadUserDataDir() );
61 maybe.
AddPaths( PATHS::GetOSXKicadMachineDataDir() );
64 maybe.
AddPaths( PATHS::GetOSXKicadDataDir() );
69 maybe.
AddPaths( wxT( DEFAULT_INSTALL_PATH ) );
92 bin_dir.Replace( wxFileName::GetPathSeparator( wxPATH_UNIX ),
93 wxFileName::GetPathSeparator( wxPATH_WIN ) );
96 wxFileName bin_fn( bin_dir, wxEmptyString );
103 wxString data_dir = wxStandardPaths::Get().GetDataDir();
105 if( bin_fn.GetPath() != data_dir )
112 bin_fn.RemoveLastDir();
123 maybe.
AddPaths( wxGetenv( wxT(
"PROGRAMFILES" ) ) );
125 maybe.
AddPaths( wxGetenv( wxT(
"PATH" ) ) );
129#if defined(DEBUG) && 0
130 maybe.Show(
"maybe wish list" );
137 for(
unsigned i = 0; i < maybe.GetCount(); ++i )
139 wxFileName fn( maybe[i], wxEmptyString );
142 if( fn.GetPath().AfterLast( fn.GetPathSeparator() ) == wxT(
"bin" ) )
146 if( !fn.GetDirCount() )
151 aSearchStack->
AddPaths( fn.GetPath() );
154 fn.AppendDir( wxT(
"kicad" ) );
155 aSearchStack->
AddPaths( fn.GetPath() );
157 fn.AppendDir( wxT(
"share" ) );
158 aSearchStack->
AddPaths( fn.GetPath() );
163 fn.AppendDir( wxT(
"share" ) );
164 aSearchStack->
AddPaths( fn.GetPath() );
166 fn.AppendDir( wxT(
"kicad" ) );
167 aSearchStack->
AddPaths( fn.GetPath() );
171#if defined(DEBUG) && 0
173 aSearchStack->Show( __func__ );
185 for(
unsigned i = 0; i < bases.GetCount(); ++i )
187 wxFileName fn( bases[i], wxEmptyString );
195 fn.AppendDir( wxT(
"library" ) );
198 fn.AppendDir( wxT(
"doc" ) );
204 fn.AppendDir( wxT(
"symbols" ) );
207 fn.AppendDir( wxT(
"doc" ) );
217 fn.AppendDir( wxT(
"modules" ) );
221 fn.AppendDir( wxT(
"footprints" ) );
226 fn.AppendDir( wxT(
"3dmodels" ) );
232 fn.AppendDir( wxT(
"template" ) );
237 aDst->
AddPaths( wxT(
"/usr/local/share" ) );
FACE_T
Known KIFACE implementations.
static wxString GetStockEDALibraryPath()
Gets the stock (install) EDA library data path, which is the base path for templates,...
virtual const wxString & GetExecutablePath() const
Look for files in a number of paths.
void AddPaths(const wxString &aPaths, int aIndex=-1)
Insert or append path(s).
PGM_BASE & Pgm()
The global Program "get" accessor.
void GlobalPathsAppend(SEARCH_STACK *aDst, KIWAY::FACE_T aId)
Initialize aDst SEARCH_STACK with KIFACE (DSO) specific settings.
void SystemDirsAppend(SEARCH_STACK *aSearchStack)
Append system places to aSearchStack in a platform specific way and pertinent to KiCad programs.
System directories search utilities.