mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
Use KICAD_DATA to find stock libraries on Linux
Use the KICAD_DATA build-time variable to determine the default stock library search path on Linux instead of relying on DEFAULT_INSTALL_PATH in combination with hardcoded folder names. The search logic for Windows and macOS is refactored but remains unchanged.
This commit is contained in:
parent
e9eb5a5e21
commit
c291162567
@ -55,8 +55,6 @@ Linux install tree
|
|||||||
${prefix}/share/kicad/modules/packages3d - 3D component models (.wrl and .step format).
|
${prefix}/share/kicad/modules/packages3d - 3D component models (.wrl and .step format).
|
||||||
${prefix}/share/kicad/resources - Resource files (images, etc).
|
${prefix}/share/kicad/resources - Resource files (images, etc).
|
||||||
|
|
||||||
KiCad searches for the libraries, templates, 3D models, etc. bin/../share.
|
|
||||||
|
|
||||||
Warning:
|
Warning:
|
||||||
Do not change the KiCad tree, or the location of binary files. Otherwise
|
Do not change the KiCad tree, or the location of binary files. Otherwise
|
||||||
KiCad may not be able to find some or all of its required files.
|
KiCad may not be able to find some or all of its required files.
|
||||||
|
@ -281,19 +281,10 @@ bool PGM_BASE::InitPgm()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
wxFileName baseSharePath;
|
wxFileName baseSharePath;
|
||||||
#if defined( __WXMSW__ )
|
#ifdef __WXMAC__
|
||||||
// Make the paths relative to the executable dir as KiCad might be installed anywhere
|
baseSharePath.AssignDir( PATHS::GetOSXKicadMachineDataDir() );
|
||||||
// It follows the Windows installer paths scheme, where binaries are installed in
|
|
||||||
// PATH/bin and extra files in PATH/share/kicad
|
|
||||||
baseSharePath.AssignDir( m_bin_dir + "\\.." );
|
|
||||||
baseSharePath.Normalize();
|
|
||||||
#else
|
#else
|
||||||
baseSharePath.AssignDir( wxString( wxT( DEFAULT_INSTALL_PATH ) ) );
|
baseSharePath.AssignDir( PATHS::GetStockDataPath( false ) );
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined( __WXMAC__ )
|
|
||||||
baseSharePath.AppendDir( "share" );
|
|
||||||
baseSharePath.AppendDir( "kicad" );
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// KICAD6_FOOTPRINT_DIR
|
// KICAD6_FOOTPRINT_DIR
|
||||||
|
@ -67,6 +67,12 @@ void SystemDirsAppend( SEARCH_STACK* aSearchStack )
|
|||||||
// Use as second ranked place.
|
// Use as second ranked place.
|
||||||
maybe.AddPaths( wxT( DEFAULT_INSTALL_PATH ) );
|
maybe.AddPaths( wxT( DEFAULT_INSTALL_PATH ) );
|
||||||
|
|
||||||
|
#ifdef __WXGTK__
|
||||||
|
// On Linux, the stock data install path is defined by KICAD_DATA.
|
||||||
|
// Useful when multiple versions of KiCad are installed in parallel.
|
||||||
|
maybe.AddPaths( PATHS::GetStockDataPath( false ) );
|
||||||
|
#endif
|
||||||
|
|
||||||
// Add the directory for the user-dependent, program specific data files.
|
// Add the directory for the user-dependent, program specific data files.
|
||||||
// According to wxWidgets documentation:
|
// According to wxWidgets documentation:
|
||||||
// Unix: ~/.appname
|
// Unix: ~/.appname
|
||||||
|
Loading…
x
Reference in New Issue
Block a user