KiCad PCB EDA Suite
Loading...
Searching...
No Matches
job_special_execute.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2024 Mark Roszko <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
23#include <map>
24#include <vector>
25
26#include <kicommon.h>
27#include <jobs/job.h>
28
29class PROJECT;
30
31#define OUTPUT_TMP_PATH_VAR_NAME wxT( "JOBSET_OUTPUT_WORK_PATH" )
32
33#define EXEC_PYTHON_VAR_NAME wxT( "KICAD_PYTHON" )
34#define EXEC_PROJECT_PCB_VAR_NAME wxT( "KICAD_PROJECT_PCB" )
35#define EXEC_PROJECT_SCH_VAR_NAME wxT( "KICAD_PROJECT_SCH" )
36
42KICOMMON_API wxString FindBundledPython( const std::vector<wxString>& aToolDirs );
43
52KICOMMON_API std::map<wxString, wxString> GetExecuteBuiltinVariables( const PROJECT* aProject );
53
57KICOMMON_API std::map<wxString, wxString> GetExecuteBuiltinVariableHelp();
58
65KICOMMON_API wxString ExpandExecuteCommand( const wxString& aCommand, const PROJECT* aProject );
66
68{
69public:
71
72 wxString GetDefaultDescription() const override;
73
74 wxString m_command;
75
78};
JOB(const std::string &aType, bool aOutputIsDirectory)
Definition job.cpp:26
virtual wxString GetDefaultDescription() const
Definition job.cpp:74
Container for project specific data.
Definition project.h:63
KICOMMON_API wxString FindBundledPython(const std::vector< wxString > &aToolDirs)
Find the interpreter shipped with KiCad in the given tool directories.
KICOMMON_API wxString ExpandExecuteCommand(const wxString &aCommand, const PROJECT *aProject)
Expand an Execute Command string, including the built-in variables.
KICOMMON_API std::map< wxString, wxString > GetExecuteBuiltinVariableHelp()
Describe each variable returned by GetExecuteBuiltinVariables() for the user.
KICOMMON_API std::map< wxString, wxString > GetExecuteBuiltinVariables(const PROJECT *aProject)
Return the variables an Execute Command job can use beyond the environment and project variables.
#define KICOMMON_API
Definition kicommon.h:27