Use native separators in stock paths.
This commit is contained in:
+35
-28
@@ -296,71 +296,78 @@ wxString PATHS::GetStockEDALibraryPath()
|
||||
|
||||
wxString PATHS::GetStockSymbolsPath()
|
||||
{
|
||||
wxString path;
|
||||
wxFileName fn;
|
||||
|
||||
fn.AssignDir( GetStockEDALibraryPath() );
|
||||
fn.AppendDir( "symbols" );
|
||||
|
||||
path = GetStockEDALibraryPath() + wxT( "/symbols" );
|
||||
|
||||
return path;
|
||||
return fn.GetPathWithSep();
|
||||
}
|
||||
|
||||
|
||||
wxString PATHS::GetStockFootprintsPath()
|
||||
{
|
||||
wxString path;
|
||||
wxFileName fn;
|
||||
|
||||
fn.AssignDir( GetStockEDALibraryPath() );
|
||||
fn.AppendDir( "footprints" );
|
||||
|
||||
path = GetStockEDALibraryPath() + wxT( "/footprints" );
|
||||
|
||||
return path;
|
||||
return fn.GetPathWithSep();
|
||||
}
|
||||
|
||||
|
||||
wxString PATHS::GetStockDesignBlocksPath()
|
||||
{
|
||||
wxString path;
|
||||
wxFileName fn;
|
||||
|
||||
fn.AssignDir( GetStockEDALibraryPath() );
|
||||
fn.AppendDir( "blocks" );
|
||||
|
||||
path = GetStockEDALibraryPath() + wxT( "/blocks" );
|
||||
|
||||
return path;
|
||||
return fn.GetPathWithSep();
|
||||
}
|
||||
|
||||
|
||||
wxString PATHS::GetStock3dmodelsPath()
|
||||
{
|
||||
wxString path;
|
||||
wxFileName fn;
|
||||
|
||||
fn.AssignDir( GetStockEDALibraryPath() );
|
||||
fn.AppendDir( "3dmodels" );
|
||||
|
||||
path = GetStockEDALibraryPath() + wxT( "/3dmodels" );
|
||||
|
||||
return path;
|
||||
return fn.GetPathWithSep();
|
||||
}
|
||||
|
||||
|
||||
wxString PATHS::GetStockScriptingPath()
|
||||
{
|
||||
wxString path;
|
||||
wxFileName fn;
|
||||
|
||||
fn.AssignDir( GetStockDataPath() );
|
||||
fn.AppendDir( "scripting" );
|
||||
|
||||
path = GetStockDataPath() + wxT( "/scripting" );
|
||||
|
||||
return path;
|
||||
return fn.GetPathWithSep();
|
||||
}
|
||||
|
||||
|
||||
wxString PATHS::GetStockTemplatesPath()
|
||||
{
|
||||
wxString path;
|
||||
wxFileName fn;
|
||||
|
||||
fn.AssignDir( GetStockEDALibraryPath() );
|
||||
fn.AppendDir( "template" );
|
||||
|
||||
path = GetStockEDALibraryPath() + wxT( "/template" );
|
||||
|
||||
return path;
|
||||
return fn.GetPathWithSep();
|
||||
}
|
||||
|
||||
|
||||
wxString PATHS::GetLocaleDataPath()
|
||||
{
|
||||
wxString path;
|
||||
wxFileName fn;
|
||||
|
||||
fn.AssignDir( GetStockDataPath() );
|
||||
fn.AppendDir( "internat" );
|
||||
|
||||
path = GetStockDataPath() + wxT( "/internat" );
|
||||
|
||||
return path;
|
||||
return fn.GetPathWithSep();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -810,31 +810,13 @@ void COMMON_SETTINGS::InitializeEnvironment()
|
||||
}
|
||||
};
|
||||
|
||||
wxFileName basePath( PATHS::GetStockEDALibraryPath(), wxEmptyString );
|
||||
|
||||
wxFileName path( basePath );
|
||||
path.AppendDir( wxT( "footprints" ) );
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "FOOTPRINT_DIR" ) ), path.GetFullPath() );
|
||||
|
||||
path = basePath;
|
||||
path.AppendDir( wxT( "3dmodels" ) );
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "3DMODEL_DIR" ) ), path.GetFullPath() );
|
||||
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "TEMPLATE_DIR" ) ),
|
||||
PATHS::GetStockTemplatesPath() );
|
||||
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "FOOTPRINT_DIR" ) ), PATHS::GetStockFootprintsPath() );
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "3DMODEL_DIR" ) ), PATHS::GetStock3dmodelsPath() );
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "TEMPLATE_DIR" ) ), PATHS::GetStockTemplatesPath() );
|
||||
addVar( wxT( "KICAD_USER_TEMPLATE_DIR" ), PATHS::GetUserTemplatesPath() );
|
||||
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "3RD_PARTY" ) ),
|
||||
PATHS::GetDefault3rdPartyPath() );
|
||||
|
||||
path = basePath;
|
||||
path.AppendDir( wxT( "symbols" ) );
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "SYMBOL_DIR" ) ), path.GetFullPath() );
|
||||
|
||||
path = basePath;
|
||||
path.AppendDir( wxT( "blocks" ) );
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "DESIGN_BLOCK_DIR" ) ), path.GetFullPath() );
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "3RD_PARTY" ) ), PATHS::GetDefault3rdPartyPath() );
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "SYMBOL_DIR" ) ), PATHS::GetStockSymbolsPath() );
|
||||
addVar( ENV_VAR::GetVersionedEnvVarName( wxS( "DESIGN_BLOCK_DIR" ) ), PATHS::GetStockDesignBlocksPath() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user