22#include <wx/stdpaths.h>
50 maybe.
AddPaths( wxGetenv( wxT(
"KICAD" ) ) );
54 maybe.
AddPaths( PATHS::GetOSXKicadUserDataDir() );
57 maybe.
AddPaths( PATHS::GetOSXKicadMachineDataDir() );
60 maybe.
AddPaths( PATHS::GetOSXKicadDataDir() );
65 maybe.
AddPaths( wxT( DEFAULT_INSTALL_PATH ) );
88 bin_dir.Replace( wxFileName::GetPathSeparator( wxPATH_UNIX ),
89 wxFileName::GetPathSeparator( wxPATH_WIN ) );
92 wxFileName bin_fn( bin_dir, wxEmptyString );
99 wxString data_dir = wxStandardPaths::Get().GetDataDir();
101 if( bin_fn.GetPath() != data_dir )
108 bin_fn.RemoveLastDir();
119 maybe.
AddPaths( wxGetenv( wxT(
"PROGRAMFILES" ) ) );
121 maybe.
AddPaths( wxGetenv( wxT(
"PATH" ) ) );
125#if defined(DEBUG) && 0
126 maybe.Show(
"maybe wish list" );
133 for(
unsigned i = 0; i < maybe.GetCount(); ++i )
135 wxFileName fn( maybe[i], wxEmptyString );
138 if( fn.GetPath().AfterLast( fn.GetPathSeparator() ) == wxT(
"bin" ) )
142 if( !fn.GetDirCount() )
147 aSearchStack->
AddPaths( fn.GetPath() );
150 fn.AppendDir( wxT(
"kicad" ) );
151 aSearchStack->
AddPaths( fn.GetPath() );
153 fn.AppendDir( wxT(
"share" ) );
154 aSearchStack->
AddPaths( fn.GetPath() );
159 fn.AppendDir( wxT(
"share" ) );
160 aSearchStack->
AddPaths( fn.GetPath() );
162 fn.AppendDir( wxT(
"kicad" ) );
163 aSearchStack->
AddPaths( fn.GetPath() );
167#if defined(DEBUG) && 0
169 aSearchStack->Show( __func__ );
181 for(
unsigned i = 0; i < bases.GetCount(); ++i )
183 wxFileName fn( bases[i], wxEmptyString );
191 fn.AppendDir( wxT(
"library" ) );
194 fn.AppendDir( wxT(
"doc" ) );
200 fn.AppendDir( wxT(
"symbols" ) );
203 fn.AppendDir( wxT(
"doc" ) );
213 fn.AppendDir( wxT(
"modules" ) );
217 fn.AppendDir( wxT(
"footprints" ) );
222 fn.AppendDir( wxT(
"3dmodels" ) );
228 fn.AppendDir( wxT(
"template" ) );
233 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.