Commit 8b6f6ab2 authored by plyatov's avatar plyatov

Eliminated bug - help files not found.

parent 78be716b
...@@ -5,6 +5,12 @@ Started 2007-June-11 ...@@ -5,6 +5,12 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2008-Feb-18 UPDATE Igor Plyatov <plyatov@mail.ru>
================================================================================
+help
Eliminated bug "help files not found!".
2008-Mar-3 UPDATE Dick Hollenbeck <dick@softplc.com> 2008-Mar-3 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================ ================================================================================
+pcbnew +pcbnew
......
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
// Path list for online help // Path list for online help
static wxString s_HelpPathList[] = { static wxString s_HelpPathList[] = {
#ifdef __WINDOWS__ #ifdef __WINDOWS__
wxT( "c:/kicad/doc/help" ), wxT( "c:/kicad/doc/help/" ),
wxT( "d:/kicad/doc/help" ), wxT( "d:/kicad/doc/help/" ),
wxT( "c:/Program Files/kicad/doc/help" ), wxT( "c:/Program Files/kicad/doc/help/" ),
wxT( "d:/Program Files/kicad/doc/help" ), wxT( "d:/Program Files/kicad/doc/help/" ),
#else #else
wxT( "/usr/share/doc/kicad/help" ), wxT( "/usr/share/doc/kicad/help/" ),
wxT( "/usr/local/share/doc/kicad/help" ), wxT( "/usr/local/share/doc/kicad/help/" ),
wxT( "/usr/local/kicad/share/doc/kicad/" ), // TODO: must be removed wxT( "/usr/local/kicad/share/doc/kicad/" ), // TODO: must be removed
#endif #endif
wxT( "end_list" ) // End of list symbol, do not change wxT( "end_list" ) // End of list symbol, do not change
...@@ -57,8 +57,8 @@ static wxString s_KicadDataPathList[] = { ...@@ -57,8 +57,8 @@ static wxString s_KicadDataPathList[] = {
wxT( "d:/kicad/share/" ), wxT( "d:/kicad/share/" ),
wxT( "c:/Program Files/kicad/" ), // TODO: must be removed wxT( "c:/Program Files/kicad/" ), // TODO: must be removed
wxT( "d:/Program Files/kicad/" ), // TODO: must be removed wxT( "d:/Program Files/kicad/" ), // TODO: must be removed
wxT( "c:/Program Files/kicad/share" ), wxT( "c:/Program Files/kicad/share/" ),
wxT( "d:/Program Files/kicad/share" ), wxT( "d:/Program Files/kicad/share/" ),
#else #else
wxT( "/usr/share/kicad/" ), wxT( "/usr/share/kicad/" ),
wxT( "/usr/local/share/kicad/" ), wxT( "/usr/local/share/kicad/" ),
...@@ -75,10 +75,10 @@ static wxString s_KicadBinaryPathList[] = { ...@@ -75,10 +75,10 @@ static wxString s_KicadBinaryPathList[] = {
wxT( "d:/kicad/bin/" ), wxT( "d:/kicad/bin/" ),
wxT( "c:/kicad/winexe/" ), // TODO: must be removed wxT( "c:/kicad/winexe/" ), // TODO: must be removed
wxT( "d:/kicad/winexe/" ), // TODO: must be removed wxT( "d:/kicad/winexe/" ), // TODO: must be removed
wxT( "c:/Program Files/kicad/bin" ), wxT( "c:/Program Files/kicad/bin/" ),
wxT( "d:/Program Files/kicad/bin" ), wxT( "d:/Program Files/kicad/bin/" ),
wxT( "c:/Program Files/kicad/winexe" ), // TODO: must be removed wxT( "c:/Program Files/kicad/winexe/" ), // TODO: must be removed
wxT( "d:/Program Files/kicad/winexe" ), // TODO: must be removed wxT( "d:/Program Files/kicad/winexe/" ), // TODO: must be removed
#else #else
wxT( "/usr/bin/" ), wxT( "/usr/bin/" ),
wxT( "/usr/local/bin/" ), wxT( "/usr/local/bin/" ),
...@@ -353,7 +353,8 @@ wxString FindKicadHelpPath() ...@@ -353,7 +353,8 @@ wxString FindKicadHelpPath()
* from BinDir * from BinDir
* else from environment variable KICAD * else from environment variable KICAD
* else from one of s_HelpPathList * else from one of s_HelpPathList
* typically c:\kicad\doc\help or /usr/local/kicad/doc/help or /usr/share/doc/kicad/help * typically c:\kicad\doc\help or /usr/share/doc/kicad/help
* or /usr/local/share/doc/kicad/help
* (must have kicad in path name) * (must have kicad in path name)
* *
* xx = iso639-1 language id (2 letters (generic) or 4 letters): * xx = iso639-1 language id (2 letters (generic) or 4 letters):
...@@ -370,12 +371,11 @@ wxString FindKicadHelpPath() ...@@ -370,12 +371,11 @@ wxString FindKicadHelpPath()
wxString FullPath, LangFullPath, tmp; wxString FullPath, LangFullPath, tmp;
wxString LocaleString; wxString LocaleString;
bool PathFound = FALSE; bool PathFound = FALSE;
/* find kicad/help/ */ /* find kicad/help/ */
tmp = g_EDA_Appl->m_BinDir; tmp = g_EDA_Appl->m_BinDir;
if( tmp.Last() == '/' ) if( tmp.Last() == '/' )
tmp.RemoveLast(); tmp.RemoveLast();
FullPath = tmp.BeforeLast( '/' ); // Idem cd .. FullPath = tmp.BeforeLast( '/' ); // cd ..
FullPath += wxT( "/help/" ); FullPath += wxT( "/help/" );
LocaleString = g_EDA_Appl->m_Locale->GetCanonicalName(); LocaleString = g_EDA_Appl->m_Locale->GetCanonicalName();
...@@ -397,9 +397,7 @@ wxString FindKicadHelpPath() ...@@ -397,9 +397,7 @@ wxString FindKicadHelpPath()
PathFound = TRUE; PathFound = TRUE;
} }
/* find kicad/help/ from default path list: /* find kicad/help/ from "s_HelpPathList" */
* /usr/local/kicad/help or c:/kicad/help
* (see s_HelpPathList) */
int ii = 0; int ii = 0;
while( !PathFound ) while( !PathFound )
{ {
...@@ -410,11 +408,9 @@ wxString FindKicadHelpPath() ...@@ -410,11 +408,9 @@ wxString FindKicadHelpPath()
PathFound = TRUE; PathFound = TRUE;
} }
if( PathFound ) if( PathFound )
{ {
LangFullPath = FullPath + LocaleString + UNIX_STRING_DIR_SEP; LangFullPath = FullPath + LocaleString + UNIX_STRING_DIR_SEP;
if( wxDirExists( LangFullPath ) ) if( wxDirExists( LangFullPath ) )
return LangFullPath; return LangFullPath;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment