KiCad PCB EDA Suite
|
Helper class to centralize the paths used throughout kicad. More...
#include <paths.h>
Static Public Member Functions | |
static wxString | GetUserScriptingPath () |
Gets the user path for python scripts. More... | |
static wxString | GetUserTemplatesPath () |
Gets the user path for custom templates. More... | |
static wxString | GetUserPluginsPath () |
Gets the user path for plugins. More... | |
static wxString | GetUserPlugins3DPath () |
Gets the user path for 3d viewer plugin. More... | |
static wxString | GetDefaultUserProjectsPath () |
Gets the default path we point users to create projects. More... | |
static wxString | GetDefaultUserSymbolsPath () |
Gets the default path we point users to create projects. More... | |
static wxString | GetDefaultUserFootprintsPath () |
Gets the default path we point users to create projects. More... | |
static wxString | GetDefaultUser3DModelsPath () |
Gets the default path we point users to create projects. More... | |
static wxString | GetStockDataPath (bool aRespectRunFromBuildDir=true) |
Gets the stock (install) data path, which is the base path for things like scripting, etc. More... | |
static wxString | GetStockEDALibraryPath () |
Gets the stock (install) EDA library data path, which is the base path for templates, schematic symbols, footprints, and 3D models. More... | |
static wxString | GetDefault3rdPartyPath () |
Gets the default path for PCM packages. More... | |
static wxString | GetStockSymbolsPath () |
Gets the stock (install) symbols path. More... | |
static wxString | GetStockFootprintsPath () |
Gets the stock (install) footprints path. More... | |
static wxString | GetStock3dmodelsPath () |
Gets the stock (install) 3dmodels path. More... | |
static wxString | GetStockScriptingPath () |
Gets the stock (install) scripting path. More... | |
static wxString | GetStockPluginsPath () |
Gets the stock (install) plugins path. More... | |
static wxString | GetStockPlugins3DPath () |
Gets the stock (install) 3d viewer plugins path. More... | |
static wxString | GetStockDemosPath () |
Gets the stock (install) demos path. More... | |
static wxString | GetStockTemplatesPath () |
Gets the stock (install) templates path. More... | |
static wxString | GetLocaleDataPath () |
Gets the locales translation data path. More... | |
static wxString | GetUserCachePath () |
Gets the stock (install) 3d viewer plugins path. More... | |
static wxString | GetDocumentationPath () |
Gets the documentation path, which is the base path for help files. More... | |
static bool | EnsurePathExists (const wxString &aPath) |
Attempts to create a given path if it does not exist. More... | |
static void | EnsureUserPathsExist () |
Ensures/creates user default paths. More... | |
Private Member Functions | |
PATHS () | |
Static Private Member Functions | |
static void | getUserDocumentPath (wxFileName &aPath) |
Gets the user path for the current kicad version which acts as the root for other user paths. More... | |
|
static |
Attempts to create a given path if it does not exist.
Definition at line 349 of file paths.cpp.
References path.
Referenced by EnsureUserPathsExist().
|
static |
Ensures/creates user default paths.
Definition at line 369 of file paths.cpp.
References EnsurePathExists(), GetDefault3rdPartyPath(), GetDefaultUser3DModelsPath(), GetDefaultUserFootprintsPath(), GetDefaultUserProjectsPath(), GetDefaultUserSymbolsPath(), GetUserCachePath(), GetUserPlugins3DPath(), GetUserPluginsPath(), GetUserScriptingPath(), and GetUserTemplatesPath().
Referenced by PGM_BASE::InitPgm().
|
static |
Gets the default path for PCM packages.
Definition at line 129 of file paths.cpp.
References getUserDocumentPath().
Referenced by EnsureUserPathsExist(), COMMON_SETTINGS::InitializeEnvironment(), SETTINGS_MANAGER::loadAllColorSettings(), and PLUGIN_CONTENT_MANAGER::ReadEnvVar().
|
static |
Gets the default path we point users to create projects.
Definition at line 119 of file paths.cpp.
References getUserDocumentPath().
Referenced by EnsureUserPathsExist().
|
static |
Gets the default path we point users to create projects.
Definition at line 108 of file paths.cpp.
References getUserDocumentPath().
Referenced by PCB_BASE_EDIT_FRAME::AddLibrary(), PCB_BASE_EDIT_FRAME::createNewLibrary(), EnsureUserPathsExist(), and PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE().
|
static |
Gets the default path we point users to create projects.
Definition at line 139 of file paths.cpp.
References getUserDocumentPath().
Referenced by AskLoadBoardFileName(), EDA_BASE_FRAME::commonInit(), PCB_EDIT_FRAME::doAutoSave(), EnsureUserPathsExist(), PCB_EDIT_FRAME::Files_io_from_id(), DIALOG_GENDRILL::OnGenReportFile(), PROJECT_TREE_PANE::onOpenDirectory(), PROJECT_TREE_PANE::ReCreateTreePrj(), and SCH_EDIT_FRAME::SaveProject().
|
static |
Gets the default path we point users to create projects.
Definition at line 97 of file paths.cpp.
References getUserDocumentPath().
Referenced by SYMBOL_EDIT_FRAME::AddLibraryFile(), EnsureUserPathsExist(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), and PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE().
|
static |
Gets the documentation path, which is the base path for help files.
Definition at line 333 of file paths.cpp.
References path.
Referenced by SearchHelpFileFullPath().
|
static |
Gets the locales translation data path.
Definition at line 252 of file paths.cpp.
References GetStockDataPath(), and path.
Referenced by PGM_BASE::SetLanguagePath().
|
static |
Gets the stock (install) 3dmodels path.
Definition at line 222 of file paths.cpp.
References GetStockEDALibraryPath(), and path.
|
static |
Gets the stock (install) data path, which is the base path for things like scripting, etc.
Definition at line 150 of file paths.cpp.
Referenced by BITMAP_STORE::BITMAP_STORE(), GetBitmapStore(), GetLocaleDataPath(), GetStockDemosPath(), GetStockEDALibraryPath(), GetStockPluginsPath(), GetStockScriptingPath(), and PLUGIN_CONTENT_MANAGER::PLUGIN_CONTENT_MANAGER().
|
static |
Gets the stock (install) demos path.
Definition at line 310 of file paths.cpp.
References GetStockDataPath().
Referenced by KICAD_MANAGER_FRAME::doReCreateMenuBar(), and KICAD_MANAGER_CONTROL::OpenDemoProject().
|
static |
Gets the stock (install) EDA library data path, which is the base path for templates, schematic symbols, footprints, and 3D models.
Definition at line 186 of file paths.cpp.
References GetStockDataPath(), and path.
Referenced by GetStock3dmodelsPath(), GetStockFootprintsPath(), GetStockSymbolsPath(), GetStockTemplatesPath(), COMMON_SETTINGS::InitializeEnvironment(), and SystemDirsAppend().
|
static |
Gets the stock (install) footprints path.
Definition at line 212 of file paths.cpp.
References GetStockEDALibraryPath(), and path.
|
static |
Gets the stock (install) 3d viewer plugins path.
Definition at line 278 of file paths.cpp.
References Pgm().
Referenced by S3D_PLUGIN_MANAGER::loadPlugins().
|
static |
Gets the stock (install) plugins path.
Definition at line 262 of file paths.cpp.
References GetStockDataPath(), and Pgm().
Referenced by BOM_GENERATOR_HANDLER::FindFilePath(), and DIALOG_BOM::pluginInit().
|
static |
Gets the stock (install) scripting path.
Definition at line 232 of file paths.cpp.
References GetStockDataPath(), and path.
|
static |
Gets the stock (install) symbols path.
Definition at line 202 of file paths.cpp.
References GetStockEDALibraryPath(), and path.
|
static |
Gets the stock (install) templates path.
Definition at line 242 of file paths.cpp.
References GetStockEDALibraryPath(), and path.
Referenced by COMMON_SETTINGS::InitializeEnvironment().
|
static |
Gets the stock (install) 3d viewer plugins path.
Definition at line 321 of file paths.cpp.
References SETTINGS_MANAGER::GetSettingsVersion(), KIPLATFORM::ENV::GetUserCachePath(), and KICAD_PATH_STR.
Referenced by PLUGIN_CONTENT_MANAGER::CacheRepository(), PLUGIN_CONTENT_MANAGER::DiscardRepositoryCache(), PCM_TASK_MANAGER::DownloadAndInstall(), EnsureUserPathsExist(), PLUGIN_CONTENT_MANAGER::GetRepositoryPackageBitmaps(), NETLIST_EXPORTER_SPICE::readModel(), NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), and S3D_CACHE::Set3DConfigDir().
|
staticprivate |
Gets the user path for the current kicad version which acts as the root for other user paths.
aPath | Variable to receive the path |
Definition at line 39 of file paths.cpp.
References KIPLATFORM::ENV::GetDocumentsPath(), SETTINGS_MANAGER::GetSettingsVersion(), and KICAD_PATH_STR.
Referenced by GetDefault3rdPartyPath(), GetDefaultUser3DModelsPath(), GetDefaultUserFootprintsPath(), GetDefaultUserProjectsPath(), GetDefaultUserSymbolsPath(), GetUserPluginsPath(), GetUserScriptingPath(), and GetUserTemplatesPath().
|
static |
Gets the user path for 3d viewer plugin.
Definition at line 64 of file paths.cpp.
References GetUserPluginsPath().
Referenced by EnsureUserPathsExist().
|
static |
Gets the user path for plugins.
Definition at line 53 of file paths.cpp.
References getUserDocumentPath().
Referenced by DIALOG_BOM::chooseGenerator(), EnsureUserPathsExist(), BOM_GENERATOR_HANDLER::FindFilePath(), GetUserPlugins3DPath(), and DIALOG_BOM::pluginInit().
|
static |
Gets the user path for python scripts.
Definition at line 75 of file paths.cpp.
References getUserDocumentPath().
Referenced by EnsureUserPathsExist().
|
static |
Gets the user path for custom templates.
Definition at line 86 of file paths.cpp.
References getUserDocumentPath().
Referenced by EnsureUserPathsExist(), PL_EDITOR_FRAME::Files_io(), COMMON_SETTINGS::InitializeEnvironment(), and PGM_KICAD::OnPgmInit().