|
KiCad PCB EDA Suite
|
#include <jobs/job_special_execute.h>#include <jobs/job_registry.h>#include <common.h>#include <i18n_utility.h>#include <paths.h>#include <project.h>#include <project/project_file.h>#include <wildcards_and_files_ext.h>#include <wx/dir.h>#include <wx/filename.h>#include <wx/utils.h>Go to the source code of this file.
Functions | |
| wxString | FindBundledPython (const std::vector< wxString > &aToolDirs) |
| Find the interpreter shipped with KiCad in the given tool directories. | |
| static wxString | onlyFileWithExt (const wxString &aDir, const wxString &aExt) |
| static wxString | projectBoard (const PROJECT &aProject) |
| static wxString | projectSchematic (const PROJECT &aProject) |
| std::map< wxString, wxString > | GetExecuteBuiltinVariables (const PROJECT *aProject) |
| Return the variables an Execute Command job can use beyond the environment and project variables. | |
| std::map< wxString, wxString > | GetExecuteBuiltinVariableHelp () |
| Describe each variable returned by GetExecuteBuiltinVariables() for the user. | |
| wxString | ExpandExecuteCommand (const wxString &aCommand, const PROJECT *aProject) |
| Expand an Execute Command string, including the built-in variables. | |
| REGISTER_JOB (special_execute, _HKI("Special: Execute Command"), KIWAY::KIWAY_FACE_COUNT, JOB_SPECIAL_EXECUTE) | |
| wxString ExpandExecuteCommand | ( | const wxString & | aCommand, |
| const PROJECT * | aProject ) |
Expand an Execute Command string, including the built-in variables.
A variable the user already defined, as an environment variable or a project text variable, wins over the built-in of the same name so a portable jobset can still be overridden on one machine.
Definition at line 168 of file job_special_execute.cpp.
References ExpandEnvVarSubstitutions(), GetExecuteBuiltinVariables(), name, and PROJECT::TextVarResolver().
Referenced by BOOST_AUTO_TEST_CASE(), DIALOG_EXECUTECOMMAND_JOB_SETTINGS::populateEnvironReadOnlyTable(), JOBS_RUNNER::runSpecialExecute(), and DIALOG_EXECUTECOMMAND_JOB_SETTINGS::updateExpandedPreview().
| wxString FindBundledPython | ( | const std::vector< wxString > & | aToolDirs | ) |
Find the interpreter shipped with KiCad in the given tool directories.
Definition at line 51 of file job_special_execute.cpp.
References name.
Referenced by BOOST_AUTO_TEST_CASE(), and GetExecuteBuiltinVariables().
| std::map< wxString, wxString > GetExecuteBuiltinVariableHelp | ( | ) |
Describe each variable returned by GetExecuteBuiltinVariables() for the user.
Definition at line 158 of file job_special_execute.cpp.
References _, EXEC_PROJECT_PCB_VAR_NAME, EXEC_PROJECT_SCH_VAR_NAME, and EXEC_PYTHON_VAR_NAME.
Referenced by DIALOG_EXECUTECOMMAND_JOB_SETTINGS::DIALOG_EXECUTECOMMAND_JOB_SETTINGS(), and DIALOG_EXECUTECOMMAND_JOB_SETTINGS::populateEnvironReadOnlyTable().
| std::map< wxString, wxString > GetExecuteBuiltinVariables | ( | const PROJECT * | aProject | ) |
Return the variables an Execute Command job can use beyond the environment and project variables.
KICAD_PYTHON is the bundled interpreter, or the bare interpreter name when KiCad ships none. KICAD_PROJECT_PCB and KICAD_PROJECT_SCH are the project's board and top-level schematic. The schematic comes from the project file. The board is named after the project, or is the only board in the project folder.
Definition at line 131 of file job_special_execute.cpp.
References EXEC_PROJECT_PCB_VAR_NAME, EXEC_PROJECT_SCH_VAR_NAME, EXEC_PYTHON_VAR_NAME, FindBundledPython(), PATHS::GetExecutableDir(), PROJECT::GetProjectFullName(), PATHS::GetToolDirectories(), projectBoard(), and projectSchematic().
Referenced by ExpandExecuteCommand().
|
static |
Definition at line 76 of file job_special_execute.cpp.
Referenced by projectBoard(), and projectSchematic().
|
static |
Definition at line 85 of file job_special_execute.cpp.
References PROJECT::GetProjectName(), PROJECT::GetProjectPath(), FILEEXT::KiCadPcbFileExtension, and onlyFileWithExt().
Referenced by GetExecuteBuiltinVariables().
|
static |
Definition at line 103 of file job_special_execute.cpp.
References PROJECT::GetProjectFile(), PROJECT::GetProjectName(), PROJECT::GetProjectPath(), PROJECT_FILE::GetTopLevelSheets(), FILEEXT::KiCadSchematicFileExtension, onlyFileWithExt(), and top().
Referenced by GetExecuteBuiltinVariables().
| REGISTER_JOB | ( | special_execute | , |
| _HKI("Special: Execute Command") | , | ||
| KIWAY::KIWAY_FACE_COUNT | , | ||
| JOB_SPECIAL_EXECUTE | ) |
References KIWAY::KIWAY_FACE_COUNT.