46 basePaths.Show( wxString( __func__ ) + wxS(
": basePaths" ) );
56 wxArrayString localeNameDirs;
59 localeNameDirs.Add( currentLocale->GetCanonicalName() );
63 localeNameDirs.Add( currentLocale->GetName().BeforeLast( wxS(
'_' ) ) );
66 localeNameDirs.Add( wxS(
"en" ) );
68 for( wxString& locale : localeNameDirs )
72 for( wxString& base : basePaths )
74 wxFileName
path( base, wxEmptyString );
77 path.AppendDir( wxS(
"help" ) );
78 path.AppendDir( locale );
82 path.InsertDir(
path.GetDirCount() - 2, wxS(
"doc" ) );
86 path.InsertDir(
path.GetDirCount() - 2, wxS(
"kicad" ) );
91 docPaths.Show( wxString( __func__ ) + wxS(
": docPaths (" ) + locale + wxS(
")" ) );
97 helpFile = docPaths.FindValidPath( aBaseName + wxS(
".html" ) );
99 if( !helpFile.IsEmpty() )
102 helpFile = wxS(
"file://" ) + helpFile;
107 wxLogTrace(
tracePathsAndFiles, wxS(
"Checking SEARCH_STACK for file %s.pdf" ), aBaseName );
108 helpFile = docPaths.FindValidPath( aBaseName + wxS(
".pdf" ) );
110 if( !helpFile.IsEmpty() )
static wxString GetDocumentationPath()
Gets the documentation path, which is the base path for help files.
virtual wxLocale * GetLocale()
Look for files in a number of paths.
void AddPaths(const wxString &aPaths, int aIndex=-1)
Insert or append path(s).
const wxChar *const tracePathsAndFiles
Flag to enable path and file name debug output.
PGM_BASE & Pgm()
The global Program "get" accessor.
wxString SearchHelpFileFullPath(const wxString &aBaseName)
Return the help file's full path.
void SystemDirsAppend(SEARCH_STACK *aSearchStack)
Append system places to aSearchStack in a platform specific way and pertinent to KiCad programs.
System directories search utilities.
wxLogTrace helper definitions.