mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Move compile-time testing of crash report support out of Experimental.h
This commit is contained in:
parent
83efa5a0df
commit
c781a108e3
@ -29,6 +29,7 @@ It handles initialization and termination by subclassing wxApp.
|
|||||||
#include <wx/setup.h> // for wxUSE_* macros
|
#include <wx/setup.h> // for wxUSE_* macros
|
||||||
#include <wx/wxcrtvararg.h>
|
#include <wx/wxcrtvararg.h>
|
||||||
#include <wx/defs.h>
|
#include <wx/defs.h>
|
||||||
|
#include <wx/evtloop.h>
|
||||||
#include <wx/app.h>
|
#include <wx/app.h>
|
||||||
#include <wx/bitmap.h>
|
#include <wx/bitmap.h>
|
||||||
#include <wx/docview.h>
|
#include <wx/docview.h>
|
||||||
@ -76,7 +77,7 @@ It handles initialization and termination by subclassing wxApp.
|
|||||||
#include "AudioIO.h"
|
#include "AudioIO.h"
|
||||||
#include "Benchmark.h"
|
#include "Benchmark.h"
|
||||||
#include "Clipboard.h"
|
#include "Clipboard.h"
|
||||||
#include "CrashReport.h"
|
#include "CrashReport.h" // for HAS_CRASH_REPORT
|
||||||
#include "commands/CommandHandler.h"
|
#include "commands/CommandHandler.h"
|
||||||
#include "commands/AppCommandEvent.h"
|
#include "commands/AppCommandEvent.h"
|
||||||
#include "widgets/ASlider.h"
|
#include "widgets/ASlider.h"
|
||||||
@ -122,12 +123,6 @@ It handles initialization and termination by subclassing wxApp.
|
|||||||
|
|
||||||
#include "import/Import.h"
|
#include "import/Import.h"
|
||||||
|
|
||||||
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
|
||||||
#include <wx/debugrpt.h>
|
|
||||||
#include <wx/evtloop.h>
|
|
||||||
#include <wx/textdlg.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_SCOREALIGN
|
#ifdef EXPERIMENTAL_SCOREALIGN
|
||||||
#include "effects/ScoreAlignDialog.h"
|
#include "effects/ScoreAlignDialog.h"
|
||||||
#endif
|
#endif
|
||||||
@ -940,7 +935,7 @@ wxLanguageInfo userLangs[] =
|
|||||||
|
|
||||||
void AudacityApp::OnFatalException()
|
void AudacityApp::OnFatalException()
|
||||||
{
|
{
|
||||||
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
#if defined(HAS_CRASH_REPORT)
|
||||||
CrashReport::Generate(wxDebugReport::Context_Exception);
|
CrashReport::Generate(wxDebugReport::Context_Exception);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1009,7 +1004,7 @@ AudacityApp::AudacityApp()
|
|||||||
{
|
{
|
||||||
// Do not capture crashes in debug builds
|
// Do not capture crashes in debug builds
|
||||||
#if !defined(_DEBUG)
|
#if !defined(_DEBUG)
|
||||||
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
#if defined(HAS_CRASH_REPORT)
|
||||||
#if defined(wxUSE_ON_FATAL_EXCEPTION) && wxUSE_ON_FATAL_EXCEPTION
|
#if defined(wxUSE_ON_FATAL_EXCEPTION) && wxUSE_ON_FATAL_EXCEPTION
|
||||||
wxHandleFatalExceptions();
|
wxHandleFatalExceptions();
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,10 +22,6 @@
|
|||||||
#include <wx/app.h> // to inherit
|
#include <wx/app.h> // to inherit
|
||||||
#include <wx/timer.h> // member variable
|
#include <wx/timer.h> // member variable
|
||||||
|
|
||||||
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
|
||||||
#include <wx/debugrpt.h> // for wxDebugReport::Context
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "MemoryX.h"
|
#include "MemoryX.h"
|
||||||
|
|
||||||
class wxSingleInstanceChecker;
|
class wxSingleInstanceChecker;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "CrashReport.h"
|
#include "CrashReport.h"
|
||||||
#include "Experimental.h"
|
#include "Experimental.h"
|
||||||
|
|
||||||
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
#if defined(HAS_CRASH_REPORT)
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
@ -12,17 +12,23 @@
|
|||||||
#ifndef __AUDACITY_CRASH_REPORT__
|
#ifndef __AUDACITY_CRASH_REPORT__
|
||||||
#define __AUDACITY_CRASH_REPORT__
|
#define __AUDACITY_CRASH_REPORT__
|
||||||
|
|
||||||
|
#undef HAS_CRASH_REPORT
|
||||||
|
|
||||||
#include "Audacity.h"
|
#include "Audacity.h"
|
||||||
#include "Experimental.h"
|
#include "Experimental.h"
|
||||||
|
|
||||||
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
||||||
|
|
||||||
#include <wx/debugrpt.h>
|
#include <wx/setup.h> // for wxUSE* macros
|
||||||
|
#if defined(wxUSE_DEBUGREPORT) && wxUSE_DEBUGREPORT
|
||||||
|
#define HAS_CRASH_REPORT
|
||||||
|
#include <wx/debugrpt.h>
|
||||||
|
|
||||||
namespace CrashReport
|
namespace CrashReport
|
||||||
{
|
{
|
||||||
void Generate(wxDebugReport::Context ctx);
|
void Generate(wxDebugReport::Context ctx);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -189,16 +189,9 @@
|
|||||||
// scrolling past zero is enabled. Perhaps that lessens confusion.
|
// scrolling past zero is enabled. Perhaps that lessens confusion.
|
||||||
#define EXPERIMENTAL_TWO_TONE_TIME_RULER
|
#define EXPERIMENTAL_TWO_TONE_TIME_RULER
|
||||||
|
|
||||||
#ifndef IN_RC
|
// Define to include crash reporting, if available in wxWidgets build
|
||||||
// Define to include crash reporting
|
// This flag is used only in CrashReport.h; elsewhere use HAS_CRASH_REPORT
|
||||||
#define EXPERIMENTAL_CRASH_REPORT
|
#define EXPERIMENTAL_CRASH_REPORT
|
||||||
#ifdef EXPERIMENTAL_CRASH_REPORT
|
|
||||||
#include <wx/setup.h> // for wxUSE* macros
|
|
||||||
#if !defined(wxUSE_DEBUGREPORT) || !wxUSE_DEBUGREPORT
|
|
||||||
#undef EXPERIMENTAL_CRASH_REPORT
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Paul Licameli (PRL) 31 May 2015
|
// Paul Licameli (PRL) 31 May 2015
|
||||||
// Zero-padding factor for spectrograms can smooth the display of spectrograms by
|
// Zero-padding factor for spectrograms can smooth the display of spectrograms by
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "../AudacityLogger.h"
|
#include "../AudacityLogger.h"
|
||||||
#include "../AudioIOBase.h"
|
#include "../AudioIOBase.h"
|
||||||
#include "../CommonCommandFlags.h"
|
#include "../CommonCommandFlags.h"
|
||||||
#include "../CrashReport.h"
|
#include "../CrashReport.h" // for HAS_CRASH_REPORT
|
||||||
#include "../FileNames.h"
|
#include "../FileNames.h"
|
||||||
#include "../HelpText.h"
|
#include "../HelpText.h"
|
||||||
#include "../Menus.h"
|
#include "../Menus.h"
|
||||||
@ -26,10 +26,6 @@
|
|||||||
#include "../widgets/AudacityMessageBox.h"
|
#include "../widgets/AudacityMessageBox.h"
|
||||||
#include "../widgets/HelpSystem.h"
|
#include "../widgets/HelpSystem.h"
|
||||||
|
|
||||||
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
|
||||||
#include <wx/debugrpt.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// private helper classes and functions
|
// private helper classes and functions
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@ -353,7 +349,7 @@ void OnShowLog( const CommandContext &context )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
#if defined(HAS_CRASH_REPORT)
|
||||||
void OnCrashReport(const CommandContext &WXUNUSED(context) )
|
void OnCrashReport(const CommandContext &WXUNUSED(context) )
|
||||||
{
|
{
|
||||||
// Change to "1" to test a real crash
|
// Change to "1" to test a real crash
|
||||||
@ -523,7 +519,7 @@ BaseItemSharedPtr HelpMenu()
|
|||||||
#endif
|
#endif
|
||||||
Command( wxT("Log"), XXO("Show &Log..."), FN(OnShowLog),
|
Command( wxT("Log"), XXO("Show &Log..."), FN(OnShowLog),
|
||||||
AlwaysEnabledFlag ),
|
AlwaysEnabledFlag ),
|
||||||
#if defined(EXPERIMENTAL_CRASH_REPORT)
|
#if defined(HAS_CRASH_REPORT)
|
||||||
Command( wxT("CrashReport"), XXO("&Generate Support Data..."),
|
Command( wxT("CrashReport"), XXO("&Generate Support Data..."),
|
||||||
FN(OnCrashReport), AlwaysEnabledFlag )
|
FN(OnCrashReport), AlwaysEnabledFlag )
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user