24#include <wx/translation.h>
38 wxS(
"KICAD7_SYMBOL_DIR" ),
39 wxS(
"KICAD7_3DMODEL_DIR" ),
40 wxS(
"KICAD7_FOOTPRINT_DIR" ),
41 wxS(
"KICAD7_TEMPLATE_DIR" ),
42 wxS(
"KICAD_USER_TEMPLATE_DIR" ),
43 wxS(
"KICAD_PTEMPLATES" ),
44 wxS(
"KICAD7_3RD_PARTY" ),
70 aMap[wxS(
"KICAD7_FOOTPRINT_DIR" )] =
71 _(
"The base path of locally installed system "
72 "footprint libraries (.pretty folders).");
73 aMap[wxS(
"KICAD7_3DMODEL_DIR" )] =
74 _(
"The base path of system footprint 3D shapes (.3Dshapes folders).");
75 aMap[wxS(
"KICAD7_SYMBOL_DIR" )] =
76 _(
"The base path of the locally installed symbol libraries.");
77 aMap[wxS(
"KICAD7_TEMPLATE_DIR" )] =
78 _(
"A directory containing project templates installed with KiCad.");
79 aMap[wxS(
"KICAD_USER_TEMPLATE_DIR" )] =
80 _(
"Optional. Can be defined if you want to create your own project "
82 aMap[wxS(
"KICAD7_3RD_PARTY" )] =
83 _(
"A directory containing 3rd party plugins, libraries and other "
84 "downloadable content.");
85 aMap[wxS(
"KIPRJMOD" )] =
86 _(
"Internally defined by KiCad (cannot be edited) and is set "
87 "to the absolute path of the currently loaded project file. This environment "
88 "variable can be used to define files and paths relative to the currently loaded "
89 "project. For instance, ${KIPRJMOD}/libs/footprints.pretty can be defined as a "
90 "folder containing a project specific footprint library named footprints.pretty." );
91 aMap[wxS(
"KICAD7_SCRIPTING_DIR" )] =
92 _(
"A directory containing system-wide scripts installed with KiCad" );
93 aMap[wxS(
"KICAD7_USER_SCRIPTING_DIR" )] =
94 _(
"A directory containing user-specific scripts installed with KiCad" );
97 aMap[wxS(
"KICAD_PTEMPLATES" )] =
98 _(
"Deprecated version of KICAD_TEMPLATE_DIR.");
99 aMap[wxS(
"KISYS3DMOD" )] =
100 _(
"Deprecated version of KICAD7_3DMODEL_DIR." );
101 aMap[wxS(
"KISYSMOD" )] =
102 _(
"Deprecated version of KICAD7_FOOTPRINT_DIR." );
103 aMap[wxS(
"KICAD_SYMBOL_DIR" )] =
104 _(
"Deprecated version of KICAD_SYMBOL_DIR.");
112 if( envVarHelpText.size() == 0 )
115 return envVarHelpText[ aEnvVar ];
124 if( wxGetEnv( aEnvVarName, &env ) )
128 if( env.ToDouble( &value ) )
139 std::optional<wxString> optValue;
143 if( wxGetEnv( aEnvVarName, &env ) )
static const ENV_VAR::ENV_VAR_LIST predefinedEnvVars
static void initialiseEnvVarHelp(STRING_MAP &aMap)
std::map< wxString, wxString > STRING_MAP
Functions related to environment variables, including help functions.
std::optional< VAL_TYPE > GetEnvVar(const wxString &aEnvVarName)
Get an environment variable as a specific type, if set correctly.
wxString LookUpEnvVarHelp(const wxString &aEnvVar)
Look up long-form help text for a given environment variable.
const ENV_VAR_LIST & GetPredefinedEnvVars()
Get the list of pre-defined environment variables.
bool IsEnvVarImmutable(const wxString &aEnvVar)
Determine if an environment variable is "predefined", i.e.
std::vector< wxString > ENV_VAR_LIST