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:
committed by
Wayne Stambaugh
parent
a97ccbf7ed
commit
c5e77e9739
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user