26 #include <wx/stdpaths.h> 53 maybe.
AddPaths( wxGetenv( wxT(
"KICAD" ) ) );
57 maybe.
AddPaths( PATHS::GetOSXKicadUserDataDir() );
60 maybe.
AddPaths( PATHS::GetOSXKicadMachineDataDir() );
63 maybe.
AddPaths( PATHS::GetOSXKicadDataDir() );
68 maybe.
AddPaths( wxT( DEFAULT_INSTALL_PATH ) );
85 wxString bin_dir =
Pgm().GetExecutablePath();
91 bin_dir.Replace( wxFileName::GetPathSeparator( wxPATH_UNIX ),
92 wxFileName::GetPathSeparator( wxPATH_WIN ) );
95 wxFileName bin_fn( bin_dir, wxEmptyString );
102 wxString data_dir = wxStandardPaths::Get().GetDataDir();
104 if( bin_fn.GetPath() != data_dir )
111 bin_fn.RemoveLastDir();
122 maybe.
AddPaths( wxGetenv( wxT(
"PROGRAMFILES" ) ) );
124 maybe.
AddPaths( wxGetenv( wxT(
"PATH" ) ) );
128 #if defined(DEBUG) && 0 129 maybe.Show(
"maybe wish list" );
136 for(
unsigned i = 0; i < maybe.GetCount(); ++i )
138 wxFileName fn( maybe[i], wxEmptyString );
141 if( fn.GetPath().AfterLast( fn.GetPathSeparator() ) == wxT(
"bin" ) )
145 if( !fn.GetDirCount() )
150 aSearchStack->
AddPaths( fn.GetPath() );
153 fn.AppendDir( wxT(
"kicad" ) );
154 aSearchStack->
AddPaths( fn.GetPath() );
156 fn.AppendDir( wxT(
"share" ) );
157 aSearchStack->
AddPaths( fn.GetPath() );
162 fn.AppendDir( wxT(
"share" ) );
163 aSearchStack->
AddPaths( fn.GetPath() );
165 fn.AppendDir( wxT(
"kicad" ) );
166 aSearchStack->
AddPaths( fn.GetPath() );
170 #if defined(DEBUG) && 0 172 aSearchStack->Show( __func__ );
Look for files in a number of paths.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
void SystemDirsAppend(SEARCH_STACK *aSearchStack)
Append system places to aSearchStack in a platform specific way and pertinent to KiCad programs.
static wxString GetStockEDALibraryPath()
Gets the stock (install) EDA library data path, which is the base path for templates,...
void AddPaths(const wxString &aPaths, int aIndex=-1)
Insert or append path(s).