Respect KICAD_DOCS when searching for help files

On Linux, the documentation and help files are potentially installed to
a non-standard location (i.e., outside of /usr/share/doc/kicad/). This
can be the case when, e.g., multiple versions of KiCad are installed in
parallel. Making KICAD_DOCS available at run-time is the only viable
solution to allow the applications to find the help files in this case.

Fixes https://gitlab.com/kicad/code/kicad/issues/7874
This commit is contained in:
Marcus A. Romer
2021-04-21 19:19:25 +00:00
committed by Wayne Stambaugh
parent a97ccbf7ed
commit c5e77e9739
5 changed files with 34 additions and 4 deletions
+16
View File
@@ -240,6 +240,22 @@ wxString PATHS::GetUserCachePath()
}
wxString PATHS::GetDocumentationPath()
{
wxString path;
#if defined( __WXMAC__ )
path = GetOSXKicadDataDir();
#elif defined( __WXMSW__ )
path = Pgm().GetExecutablePath() + "../share/doc/kicad";
#else
path = wxString::FromUTF8Unchecked( KICAD_DOCS );
#endif
return path;
}
bool PATHS::EnsurePathExists( const wxString& aPath )
{
wxFileName path( aPath );