22#include <wx/filename.h>
35 const std::vector<JOB_OUTPUT>& aOutputsToHandle,
36 std::optional<wxString>& aResolvedOutputPath )
38 aResolvedOutputPath.reset();
43 if( outputPath.StartsWith(
"~" ) )
44 outputPath.Replace(
"~", wxGetHomeDir(),
false );
46 if( !wxFileName::DirExists( outputPath ) )
48 if( !wxFileName::Mkdir( outputPath, wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL ) )
50 aResolvedOutputPath.reset();
59 aResolvedOutputPath.reset();
63 aResolvedOutputPath = outputPath;
bool OutputPrecheck() override
Checks if the output process can proceed before doing anything else This can include user prompts.
bool HandleOutputs(const wxString &aBaseTempPath, PROJECT *aProject, const std::vector< JOB_OUTPUT > &aOutputsToHandle, std::optional< wxString > &aResolvedOutputPath) override
void FromJson(const nlohmann::json &j) override
wxString GetDefaultDescription() const override
void ToJson(nlohmann::json &j) const override
Container for project specific data.
const wxString ExpandEnvVarSubstitutions(const wxString &aString, const PROJECT *aProject)
Replace any environment variable & text variable references with their values.
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, int aFlags)
bool CopyDirectory(const wxString &aSourceDir, const wxString &aDestDir, wxString &aErrors)
Copy a directory and its contents to another directory.