23#include <wx/wfstream.h> 
   24#include <wx/zipstrm.h> 
   47                                         const std::vector<JOB_OUTPUT>& aOutputsToHandle,
 
   48                                         std::optional<wxString>&       aResolvedOutputPath )
 
   51    aResolvedOutputPath.reset();
 
   56    if( outputPath.StartsWith( 
"~" ) )
 
   57        outputPath.Replace( 
"~", wxGetHomeDir(), 
false );
 
   61    wxFFileOutputStream ostream( outputPath );
 
   67        aResolvedOutputPath.reset();
 
   71    wxZipOutputStream zipstream( ostream, -1, wxConvUTF8 );
 
   77    if( !zipstream.Close() )
 
   81        aResolvedOutputPath = outputPath;
 
   83        aResolvedOutputPath.reset();
 
 
  105    return _( 
"Archive" );
 
 
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
 
void ToJson(nlohmann::json &j) const override
 
wxString GetDefaultDescription() 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 EnsureFileExtension(const wxString &aFilename, const wxString &aExtension)
It's annoying to throw up nag dialogs when the extension isn't right.
 
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, int aFlags)
 
bool AddDirectoryToZip(wxZipOutputStream &aZip, const wxString &aSourceDir, wxString &aErrors, const wxString &aParentDir)
Add a directory and its contents to a zip file.
 
static const std::string ArchiveFileExtension
 
Definition of file extensions used in Kicad.