Allow customizing wxDebugReportCompress output file.

It may be useful to change the directory where it is generated to allow the
users to find it more quickly. Also allow changing the crash report base name
for completeness.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-08-14 00:06:03 +00:00
parent 94aff795d4
commit fdf20a26db
3 changed files with 69 additions and 0 deletions

View File

@@ -598,6 +598,20 @@ bool wxDebugReport::DoProcess()
// wxDebugReportCompress
// ----------------------------------------------------------------------------
void wxDebugReportCompress::SetCompressedFileDirectory(const wxString& dir)
{
wxASSERT_MSG( m_zipfile.empty(), "Too late: call this before Process()" );
m_zipDir = dir;
}
void wxDebugReportCompress::SetCompressedFileBaseName(const wxString& name)
{
wxASSERT_MSG( m_zipfile.empty(), "Too late: call this before Process()" );
m_zipName = name;
}
bool wxDebugReportCompress::DoProcess()
{
const size_t count = GetFilesCount();
@@ -609,6 +623,10 @@ bool wxDebugReportCompress::DoProcess()
// keep this one: for this we simply treat the directory name as the name
// of the file so that its last component becomes our base name
wxFileName fn(GetDirectory());
if ( !m_zipDir.empty() )
fn.SetPath(m_zipDir);
if ( !m_zipName.empty() )
fn.SetName(m_zipName);
fn.SetExt("zip");
// create the streams