Commit 6858d10c authored by charras's avatar charras

default path kicad/share added when searching kicad data

parent c77e62eb
...@@ -5,6 +5,15 @@ Started 2007-June-11 ...@@ -5,6 +5,15 @@ 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-June-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+all:
Default path kicad/share added when searching kicad data (like library, internat ...)
Kicad data Default paths are now (windows version and linux server install)
1 - kicad/share
2 - kicad
2008-June-15 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2008-June-15 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+eeschema: +eeschema:
......
...@@ -83,14 +83,14 @@ static wxString s_HelpPathList[] = { ...@@ -83,14 +83,14 @@ static wxString s_HelpPathList[] = {
// Path list for kicad data files // Path list for kicad data files
static wxString s_KicadDataPathList[] = { static wxString s_KicadDataPathList[] = {
#ifdef __WINDOWS__ #ifdef __WINDOWS__
wxT( "c:/kicad/" ),
wxT( "d:/kicad/" ),
wxT( "c:/kicad/share/" ), wxT( "c:/kicad/share/" ),
wxT( "d:/kicad/share/" ), wxT( "d:/kicad/share/" ),
wxT( "c:/Program Files/kicad/" ), wxT( "c:/kicad/" ),
wxT( "d:/Program Files/kicad/" ), wxT( "d:/kicad/" ),
wxT( "c:/Program Files/kicad/share/" ), wxT( "c:/Program Files/kicad/share/" ),
wxT( "d:/Program Files/kicad/share/" ), wxT( "d:/Program Files/kicad/share/" ),
wxT( "c:/Program Files/kicad/" ),
wxT( "d:/Program Files/kicad/" ),
#else #else
wxT( "/usr/share/kicad/" ), wxT( "/usr/share/kicad/" ),
wxT( "/usr/local/share/kicad/" ), wxT( "/usr/local/share/kicad/" ),
...@@ -469,7 +469,7 @@ wxString FindKicadFile( const wxString& shortname ) ...@@ -469,7 +469,7 @@ wxString FindKicadFile( const wxString& shortname )
/* Search the executable file shortname in kicad binary path /* Search the executable file shortname in kicad binary path
* and return full file name if found or shortname * and return full file name if found or shortname
* kicad binary path is * kicad binary path is
* kicad/winexe or kicad/linux * kicad/bin
* *
* kicad binary path is found from: * kicad binary path is found from:
* BinDir * BinDir
...@@ -552,7 +552,7 @@ void SetRealLibraryPath( const wxString& shortlibname ) ...@@ -552,7 +552,7 @@ void SetRealLibraryPath( const wxString& shortlibname )
* Sinon g_UserLibDirBuffer = /usr/share/kicad/shortlibname/ * Sinon g_UserLibDirBuffer = /usr/share/kicad/shortlibname/
* *
* Remarque: * Remarque:
* Les \ sont remplacs par / (a la mode Unix) * Les \ sont remplaces par / (a la mode Unix)
*/ */
{ {
bool PathFound = FALSE; bool PathFound = FALSE;
...@@ -619,8 +619,18 @@ wxString ReturnKicadDatasPath() ...@@ -619,8 +619,18 @@ wxString ReturnKicadDatasPath()
tmp.RemoveLast(); tmp.RemoveLast();
data_path = tmp.BeforeLast( '/' ); // id cd ../ data_path = tmp.BeforeLast( '/' ); // id cd ../
data_path += UNIX_STRING_DIR_SEP; data_path += UNIX_STRING_DIR_SEP;
// Old versions of kicad use kicad/ as default for data
// and last versions kicad/share/
// So we search for kicad/share/ first
wxString old_path = data_path;
data_path += wxT("share/");
if( wxDirExists( data_path ) ) if( wxDirExists( data_path ) )
PathFound = TRUE; PathFound = TRUE;
else if ( wxDirExists( old_path ) )
{
data_path = old_path;
PathFound = TRUE;
}
} }
} }
......
...@@ -80,6 +80,10 @@ Linux KiCad tree: ...@@ -80,6 +80,10 @@ Linux KiCad tree:
/usr/share/kicad/modules - Module libraries for printed boards. /usr/share/kicad/modules - Module libraries for printed boards.
/usr/share/kicad/modules/packages3d - 3D component models (.wrl and .wings format). /usr/share/kicad/modules/packages3d - 3D component models (.wrl and .wings format).
if not found search kicad in
/usr/local/
and if found, kicad uses the same tree as the Windows KiCad tree above
Files '*.mod' are the libraries, and files '*.brd' are printed boards you can Files '*.mod' are the libraries, and files '*.brd' are printed boards you can
view with pcbnew. view with pcbnew.
Files *.brd show the existing modules (and 3D shapes) in libraries. Files *.brd show the existing modules (and 3D shapes) in libraries.
......
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