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
Rely on existing code to initialise the list of paths in which the KiCad
documentation might be located, thereby making SearchHelpFileFullPath
platform-agnostic and easier to read.
in most of files, including wx.h is not necessary, when only 2 or 3 wx files must be included.
Moreover, on windows, including wx.h sometimes create compil warnings about
shadowed vars defined in some specific windows headers.
Replace all instances of wxLogDebug with wxLogTrace in the common and
kicad folders to prevent unwanted debugging output.
Add new trace flags for locale and screen object tracing.
The usual smattering of code policy fixes.
* SearchHelpFileFullPath(): clean up platform specific path code, add executable path sans bin
directory on non-osx platforms, and move KICAD path variable to the beginning of the search
list.
* Minor search stack debug output improvements.