mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-07 18:25:31 +00:00
Add non-title-block var resolution to jobset outputs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19357 Fixes https://gitlab.com/kicad/code/kicad/-/issues/19618
This commit is contained in:
parent
af366a78b3
commit
e7a79216ab
@ -25,7 +25,8 @@
|
||||
#include <gestfich.h>
|
||||
#include <common.h>
|
||||
|
||||
JOBS_OUTPUT_ARCHIVE::JOBS_OUTPUT_ARCHIVE() : JOBS_OUTPUT_HANDLER(),
|
||||
JOBS_OUTPUT_ARCHIVE::JOBS_OUTPUT_ARCHIVE() :
|
||||
JOBS_OUTPUT_HANDLER(),
|
||||
m_format( FORMAT::ZIP )
|
||||
{
|
||||
}
|
||||
@ -42,15 +43,16 @@ bool JOBS_OUTPUT_ARCHIVE::OutputPrecheck()
|
||||
}
|
||||
|
||||
|
||||
bool JOBS_OUTPUT_ARCHIVE::HandleOutputs( const wxString& baseTempPath,
|
||||
PROJECT* aProject,
|
||||
bool JOBS_OUTPUT_ARCHIVE::HandleOutputs( const wxString& baseTempPath, PROJECT* aProject,
|
||||
const std::vector<JOB_OUTPUT>& aOutputsToHandle )
|
||||
{
|
||||
bool success = true;
|
||||
|
||||
wxString outputPath = ExpandEnvVarSubstitutions( m_outputPath, aProject );
|
||||
wxString outputPath = ExpandTextVars( m_outputPath, aProject );
|
||||
outputPath = ExpandEnvVarSubstitutions( outputPath, aProject );
|
||||
|
||||
wxFFileOutputStream ostream( outputPath );
|
||||
|
||||
if( !ostream.IsOk() ) // issue to create the file. Perhaps not writable dir
|
||||
{
|
||||
//msg.Printf( _( "Failed to create file '%s'." ), aDestFile );
|
||||
@ -61,19 +63,16 @@ bool JOBS_OUTPUT_ARCHIVE::HandleOutputs( const wxString& baseTemp
|
||||
wxZipOutputStream zipstream( ostream, -1, wxConvUTF8 );
|
||||
wxString errors;
|
||||
|
||||
|
||||
if( !AddDirectoryToZip( zipstream, baseTempPath, errors ) )
|
||||
{
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
||||
if( !zipstream.Close() )
|
||||
{
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
@ -30,11 +30,11 @@ JOBS_OUTPUT_FOLDER::JOBS_OUTPUT_FOLDER() :
|
||||
}
|
||||
|
||||
|
||||
bool JOBS_OUTPUT_FOLDER::HandleOutputs( const wxString& baseTempPath,
|
||||
PROJECT* aProject,
|
||||
bool JOBS_OUTPUT_FOLDER::HandleOutputs( const wxString& baseTempPath, PROJECT* aProject,
|
||||
const std::vector<JOB_OUTPUT>& aOutputsToHandle )
|
||||
{
|
||||
wxString outputPath = ExpandEnvVarSubstitutions( m_outputPath, aProject );
|
||||
wxString outputPath = ExpandTextVars( m_outputPath, aProject );
|
||||
outputPath = ExpandEnvVarSubstitutions( outputPath, aProject );
|
||||
|
||||
if( !wxFileName::DirExists( outputPath ) )
|
||||
{
|
||||
@ -47,6 +47,7 @@ bool JOBS_OUTPUT_FOLDER::HandleOutputs( const wxString& baseTempP
|
||||
bool success = true;
|
||||
|
||||
wxString errors;
|
||||
|
||||
if( !CopyDirectory( baseTempPath, outputPath, errors ) )
|
||||
{
|
||||
success = false;
|
||||
|
Loading…
Reference in New Issue
Block a user