Add KICAD6_3RD_PARTY env variable
This commit is contained in:
parent
b0d8f613e9
commit
4be115ca55
|
@ -41,6 +41,7 @@ static const ENV_VAR::ENV_VAR_LIST predefinedEnvVars = {
|
|||
"KICAD6_TEMPLATE_DIR",
|
||||
"KICAD_USER_TEMPLATE_DIR",
|
||||
"KICAD_PTEMPLATES",
|
||||
"KICAD6_3RD_PARTY",
|
||||
};
|
||||
|
||||
|
||||
|
@ -78,6 +79,9 @@ static void initialiseEnvVarHelp( STRING_MAP& aMap )
|
|||
aMap["KICAD_USER_TEMPLATE_DIR"] =
|
||||
_( "Optional. Can be defined if you want to create your own project "
|
||||
"templates folder.");
|
||||
aMap["KICAD6_3RD_PARTY"] =
|
||||
_( "A directory containing 3rd party plugins, libraries and other "
|
||||
"downloadable content.");
|
||||
aMap["KIPRJMOD"] =
|
||||
_("Internally defined by KiCad (cannot be edited) and is set "
|
||||
"to the absolute path of the currently loaded project file. This environment "
|
||||
|
|
|
@ -126,6 +126,15 @@ wxString PATHS::GetDefaultUser3DModelsPath()
|
|||
return tmp.GetPath();
|
||||
}
|
||||
|
||||
wxString PATHS::GetDefault3rdPartyPath()
|
||||
{
|
||||
wxFileName tmp;
|
||||
getUserDocumentPath( tmp );
|
||||
|
||||
tmp.AppendDir( "3rdparty" );
|
||||
|
||||
return tmp.GetPath();
|
||||
}
|
||||
|
||||
wxString PATHS::GetDefaultUserProjectsPath()
|
||||
{
|
||||
|
@ -309,6 +318,7 @@ void PATHS::EnsureUserPathsExist()
|
|||
EnsurePathExists( GetDefaultUserSymbolsPath() );
|
||||
EnsurePathExists( GetDefaultUserFootprintsPath() );
|
||||
EnsurePathExists( GetDefaultUser3DModelsPath() );
|
||||
EnsurePathExists( GetDefault3rdPartyPath() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -522,6 +522,8 @@ void COMMON_SETTINGS::InitializeEnvironment()
|
|||
|
||||
addVar( wxT( "KICAD_USER_TEMPLATE_DIR" ), PATHS::GetUserTemplatesPath() );
|
||||
|
||||
addVar( wxT( "KICAD6_3RD_PARTY" ), PATHS::GetDefault3rdPartyPath() );
|
||||
|
||||
path = basePath;
|
||||
path.AppendDir( wxT( "library" ) );
|
||||
addVar( wxT( "KICAD6_SYMBOL_DIR" ), path.GetFullPath() );
|
||||
|
|
|
@ -81,6 +81,11 @@ public:
|
|||
*/
|
||||
static wxString GetStockEDALibraryPath();
|
||||
|
||||
/**
|
||||
* Gets the default path for PCM packages
|
||||
*/
|
||||
static wxString GetDefault3rdPartyPath();
|
||||
|
||||
/**
|
||||
* Gets the stock (install) scripting path
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue