Loading change_log.txt +15 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,21 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. 2008-June-06 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ +all: Online doc format changed to PDF format. This is **very** easier to handle, because : - Openoffice has a very good pdf export function. - Only one file for application - Is standart (The old html format used a zipped archive, not standart) - the doc tree is less complex (see doc/help/fr or doc/help/en for the new tree). If a localized doc file is not found, the english version is automatically loaded instead. No need to copy the same pdf file in subdirectory. 2008-June-06 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ +all: Loading common/basicframe.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ #include "fctsys.h" #include <wx/fontdlg.h> #include "common.h" #include "online_help.h" #include "id.h" Loading Loading @@ -220,6 +221,7 @@ wxString WinEDA_BasicFrame::GetLastProject( int rang ) void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event ) /**************************************************************/ { #if defined ONLINE_HELP_FILES_FORMAT_IS_HTML if( m_Parent->m_HtmlCtrl == NULL ) { m_Parent->InitOnLineHelp(); Loading @@ -237,6 +239,19 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event ) msg.Printf( _( "Help file %s not found" ), m_Parent->m_HelpFileName.GetData() ); DisplayError( this, msg ); } #elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF wxString fullfilename = FindKicadHelpPath() + m_Parent->m_HelpFileName; if ( wxFileExists(fullfilename) ) GetAssociatedDocument( this, wxEmptyString, fullfilename ); else // Try to find file in English format: { fullfilename = FindKicadHelpPath() + wxT("../en/") + m_Parent->m_HelpFileName;; GetAssociatedDocument( this, wxEmptyString, fullfilename ); } #else #error Help files format not defined #endif } Loading common/eda_doc.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -195,15 +195,17 @@ bool GetAssociatedDocument( wxFrame* frame, const wxString& LibPath, { success = TRUE; command.Empty(); if( wxFileExists( wxT( "/usr/bin/kpdf" ) ) ) command = wxT( "xpdf " ) + fullfilename; command = wxT( "kpdf " ) + fullfilename; else if( wxFileExists( wxT( "/usr/bin/konqueror" ) ) ) command = wxT( "konqueror " ) + fullfilename; else if( wxFileExists( wxT( "/usr/bin/gpdf" ) ) ) command = wxT( "gpdf " ) + fullfilename; if( wxFileExists( wxT( "/usr/bin/xpdf" ) ) ) command = wxT( "xpdf " ) + fullfilename; if( command.IsEmpty() ) // not started { DisplayError( frame, _( " Cannot find the PDF viewer (kpdf, gpdf or konqueror) in /usr/bin/" ) ); _( " Cannot find the PDF viewer (kpdf, gpdf, konqueror or xpdf) in /usr/bin/" ) ); success = FALSE; } else Loading common/edaappl.cpp +15 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include "build_version.h" #include "hotkeys_basic.h" #include "macros.h" #include "online_help.h" #include "bitmaps.h" Loading Loading @@ -223,7 +224,13 @@ void WinEDA_App::InitEDA_Appl( const wxString& name ) } /* Prepare On Line Help */ #if defined ONLINE_HELP_FILES_FORMAT_IS_HTML m_HelpFileName = name + wxT( ".html" ); #elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF m_HelpFileName = name + wxT( ".pdf" ); #else #error Help files format not defined #endif // Init parameters for configuration SetVendorName( wxT( "kicad" ) ); Loading Loading @@ -281,6 +288,8 @@ void WinEDA_App::InitOnLineHelp() { wxString fullfilename = FindKicadHelpPath(); #if defined ONLINE_HELP_FILES_FORMAT_IS_HTML m_HelpFileName = fullfilename + wxT( ".html" ); fullfilename += wxT( "kicad.hhp" ); if( wxFileExists( fullfilename ) ) { Loading @@ -291,6 +300,11 @@ void WinEDA_App::InitOnLineHelp() m_HtmlCtrl->SetTitleFormat( wxT( "Kicad Help" ) ); m_HtmlCtrl->AddBook( fullfilename ); } #elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF m_HtmlCtrl = NULL; #else #error Help files format not defined #endif } Loading common/gestfich.cpp +6 −11 Original line number Diff line number Diff line Loading @@ -74,7 +74,8 @@ static wxString s_HelpPathList[] = { #else wxT( "/usr/share/doc/kicad/help/" ), wxT( "/usr/local/share/doc/kicad/help/" ), wxT( "/usr/local/kicad/" ), // default install for "universal tarballs" and build for a server wxT( "/usr/local/kicad/doc/" ), // default install for "universal tarballs" and build for a server (new) // wxT( "/usr/local/kicad/" ), // default install for "universal tarballs" and build for a server (old) #endif wxT( "end_list" ) // End of list symbol, do not change }; Loading Loading @@ -103,18 +104,12 @@ static wxString s_KicadBinaryPathList[] = { #ifdef __WINDOWS__ wxT( "c:/kicad/bin/" ), wxT( "d:/kicad/bin/" ), wxT( "c:/kicad/winexe/" ), // TODO: must be removed wxT( "d:/kicad/winexe/" ), // TODO: must be removed wxT( "c:/Program Files/kicad/bin/" ), wxT( "d:/Program Files/kicad/bin/" ), wxT( "c:/Program Files/kicad/winexe/" ), // TODO: must be removed wxT( "d:/Program Files/kicad/winexe/" ), // TODO: must be removed #else wxT( "/usr/bin/" ), wxT( "/usr/local/bin/" ), wxT( "/usr/local/kicad/bin/" ), wxT( "/usr/local/kicad/linux/" ), // TODO: must be removed wxT( "/usr/local/kicad/linux-non_unicode/" ), // TODO: must be removed #endif wxT( "end_list" ) // End of list symbol, do not change }; Loading Loading @@ -386,8 +381,8 @@ wxString FindKicadHelpPath() * from BinDir * else from environment variable KICAD * else from one of s_HelpPathList * typically c:\kicad\doc\help or /usr/share/doc/kicad/help * or /usr/local/share/doc/kicad/help * typically c:\kicad\doc\help or /usr/share/kicad/help * or /usr/local/share/kicad/help * (must have kicad in path name) * * xx = iso639-1 language id (2 letters (generic) or 4 letters): Loading @@ -410,7 +405,7 @@ wxString FindKicadHelpPath() if( tmp.Last() == '/' ) tmp.RemoveLast(); FullPath = tmp.BeforeLast( '/' ); // cd .. FullPath += wxT( "/help/" ); FullPath += wxT( "/doc/help/" ); LocaleString = g_EDA_Appl->m_Locale->GetCanonicalName(); wxString path_tmp = FullPath; Loading @@ -426,7 +421,7 @@ wxString FindKicadHelpPath() /* find kicad/help/ from environment variable KICAD */ if( !PathFound && g_EDA_Appl->m_Env_Defined ) { FullPath = g_EDA_Appl->m_KicadEnv + wxT( "/help/" ); FullPath = g_EDA_Appl->m_KicadEnv + wxT( "/doc/help/" ); if( wxDirExists( FullPath ) ) PathFound = TRUE; } Loading Loading
change_log.txt +15 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,21 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. 2008-June-06 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ +all: Online doc format changed to PDF format. This is **very** easier to handle, because : - Openoffice has a very good pdf export function. - Only one file for application - Is standart (The old html format used a zipped archive, not standart) - the doc tree is less complex (see doc/help/fr or doc/help/en for the new tree). If a localized doc file is not found, the english version is automatically loaded instead. No need to copy the same pdf file in subdirectory. 2008-June-06 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ +all: Loading
common/basicframe.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ #include "fctsys.h" #include <wx/fontdlg.h> #include "common.h" #include "online_help.h" #include "id.h" Loading Loading @@ -220,6 +221,7 @@ wxString WinEDA_BasicFrame::GetLastProject( int rang ) void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event ) /**************************************************************/ { #if defined ONLINE_HELP_FILES_FORMAT_IS_HTML if( m_Parent->m_HtmlCtrl == NULL ) { m_Parent->InitOnLineHelp(); Loading @@ -237,6 +239,19 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event ) msg.Printf( _( "Help file %s not found" ), m_Parent->m_HelpFileName.GetData() ); DisplayError( this, msg ); } #elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF wxString fullfilename = FindKicadHelpPath() + m_Parent->m_HelpFileName; if ( wxFileExists(fullfilename) ) GetAssociatedDocument( this, wxEmptyString, fullfilename ); else // Try to find file in English format: { fullfilename = FindKicadHelpPath() + wxT("../en/") + m_Parent->m_HelpFileName;; GetAssociatedDocument( this, wxEmptyString, fullfilename ); } #else #error Help files format not defined #endif } Loading
common/eda_doc.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -195,15 +195,17 @@ bool GetAssociatedDocument( wxFrame* frame, const wxString& LibPath, { success = TRUE; command.Empty(); if( wxFileExists( wxT( "/usr/bin/kpdf" ) ) ) command = wxT( "xpdf " ) + fullfilename; command = wxT( "kpdf " ) + fullfilename; else if( wxFileExists( wxT( "/usr/bin/konqueror" ) ) ) command = wxT( "konqueror " ) + fullfilename; else if( wxFileExists( wxT( "/usr/bin/gpdf" ) ) ) command = wxT( "gpdf " ) + fullfilename; if( wxFileExists( wxT( "/usr/bin/xpdf" ) ) ) command = wxT( "xpdf " ) + fullfilename; if( command.IsEmpty() ) // not started { DisplayError( frame, _( " Cannot find the PDF viewer (kpdf, gpdf or konqueror) in /usr/bin/" ) ); _( " Cannot find the PDF viewer (kpdf, gpdf, konqueror or xpdf) in /usr/bin/" ) ); success = FALSE; } else Loading
common/edaappl.cpp +15 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include "build_version.h" #include "hotkeys_basic.h" #include "macros.h" #include "online_help.h" #include "bitmaps.h" Loading Loading @@ -223,7 +224,13 @@ void WinEDA_App::InitEDA_Appl( const wxString& name ) } /* Prepare On Line Help */ #if defined ONLINE_HELP_FILES_FORMAT_IS_HTML m_HelpFileName = name + wxT( ".html" ); #elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF m_HelpFileName = name + wxT( ".pdf" ); #else #error Help files format not defined #endif // Init parameters for configuration SetVendorName( wxT( "kicad" ) ); Loading Loading @@ -281,6 +288,8 @@ void WinEDA_App::InitOnLineHelp() { wxString fullfilename = FindKicadHelpPath(); #if defined ONLINE_HELP_FILES_FORMAT_IS_HTML m_HelpFileName = fullfilename + wxT( ".html" ); fullfilename += wxT( "kicad.hhp" ); if( wxFileExists( fullfilename ) ) { Loading @@ -291,6 +300,11 @@ void WinEDA_App::InitOnLineHelp() m_HtmlCtrl->SetTitleFormat( wxT( "Kicad Help" ) ); m_HtmlCtrl->AddBook( fullfilename ); } #elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF m_HtmlCtrl = NULL; #else #error Help files format not defined #endif } Loading
common/gestfich.cpp +6 −11 Original line number Diff line number Diff line Loading @@ -74,7 +74,8 @@ static wxString s_HelpPathList[] = { #else wxT( "/usr/share/doc/kicad/help/" ), wxT( "/usr/local/share/doc/kicad/help/" ), wxT( "/usr/local/kicad/" ), // default install for "universal tarballs" and build for a server wxT( "/usr/local/kicad/doc/" ), // default install for "universal tarballs" and build for a server (new) // wxT( "/usr/local/kicad/" ), // default install for "universal tarballs" and build for a server (old) #endif wxT( "end_list" ) // End of list symbol, do not change }; Loading Loading @@ -103,18 +104,12 @@ static wxString s_KicadBinaryPathList[] = { #ifdef __WINDOWS__ wxT( "c:/kicad/bin/" ), wxT( "d:/kicad/bin/" ), wxT( "c:/kicad/winexe/" ), // TODO: must be removed wxT( "d:/kicad/winexe/" ), // TODO: must be removed wxT( "c:/Program Files/kicad/bin/" ), wxT( "d:/Program Files/kicad/bin/" ), wxT( "c:/Program Files/kicad/winexe/" ), // TODO: must be removed wxT( "d:/Program Files/kicad/winexe/" ), // TODO: must be removed #else wxT( "/usr/bin/" ), wxT( "/usr/local/bin/" ), wxT( "/usr/local/kicad/bin/" ), wxT( "/usr/local/kicad/linux/" ), // TODO: must be removed wxT( "/usr/local/kicad/linux-non_unicode/" ), // TODO: must be removed #endif wxT( "end_list" ) // End of list symbol, do not change }; Loading Loading @@ -386,8 +381,8 @@ wxString FindKicadHelpPath() * from BinDir * else from environment variable KICAD * else from one of s_HelpPathList * typically c:\kicad\doc\help or /usr/share/doc/kicad/help * or /usr/local/share/doc/kicad/help * typically c:\kicad\doc\help or /usr/share/kicad/help * or /usr/local/share/kicad/help * (must have kicad in path name) * * xx = iso639-1 language id (2 letters (generic) or 4 letters): Loading @@ -410,7 +405,7 @@ wxString FindKicadHelpPath() if( tmp.Last() == '/' ) tmp.RemoveLast(); FullPath = tmp.BeforeLast( '/' ); // cd .. FullPath += wxT( "/help/" ); FullPath += wxT( "/doc/help/" ); LocaleString = g_EDA_Appl->m_Locale->GetCanonicalName(); wxString path_tmp = FullPath; Loading @@ -426,7 +421,7 @@ wxString FindKicadHelpPath() /* find kicad/help/ from environment variable KICAD */ if( !PathFound && g_EDA_Appl->m_Env_Defined ) { FullPath = g_EDA_Appl->m_KicadEnv + wxT( "/help/" ); FullPath = g_EDA_Appl->m_KicadEnv + wxT( "/doc/help/" ); if( wxDirExists( FullPath ) ) PathFound = TRUE; } Loading