12#if defined(HAS_CRASH_REPORT)
17#include <wx/evtloop.h>
34namespace CrashReport {
36void Generate(wxDebugReport::Context ctx)
38 wxDebugReportCompress rpt;
50 XO(
"Audacity Support Data"),
XO(
"This may take several seconds"));
53 std::atomic_bool done = {
false};
54 auto thread = std::thread([&]
57 rpt.AddFile(
fn.GetFullPath(),
_TS(
"Audacity Configuration"));
61 if (ctx == wxDebugReport::Context_Current)
68 for (
const auto &diagnostics : gAudioIO->GetAllDeviceInfo())
70 diagnostics.filename, diagnostics.text, diagnostics.description);
74 rpt.AddText(
wxT(
"project.txt"), projectFileIO.GenerateDoc(),
wxT(
"Active project doc"));
81 rpt.AddText(
wxT(
"log.txt"), logger->GetLog(),
_TS(
"Audacity Log"));
90 using namespace std::chrono;
91 std::this_thread::sleep_for(50ms);
97 bool ok = wxDebugReportPreviewStd().Show(rpt);
100 wxEventLoop::SetCriticalWindow(NULL);
103 if (ok && rpt.Process())
106 XO(
"Report generated to:"),
107 XO(
"Audacity Support Data"),
108 rpt.GetCompressedFileName(),
110 dlg.SetName(dlg.GetTitle());
113 wxLogMessage(
wxT(
"Report generated to: %s"),
114 rpt.GetCompressedFileName());
AUDACITY_DLL_API std::weak_ptr< AudacityProject > GetActiveProject()
Handle changing of active project and keep global project pointer.
Abstract base class for hooks into audio playback procedures.
Toolkit-neutral facade for basic user interface services.
static AudacityLogger * Get()
Wrap wxTextEntryDialog so that caption IS translatable.
static AudioIOBase * Get()
static ProjectFileIO & Get(AudacityProject &project)
std::unique_ptr< GenericProgressDialog > MakeGenericProgress(const WindowPlacement &placement, const TranslatableString &title, const TranslatableString &message, int style=(ProgressAppModal|ProgressShowElapsedTime|ProgressSmooth))
Create and display a progress dialog (return nullptr if Services not installed)
FILES_API FilePath Configuration()
FILES_API FilePath PluginRegistry()
FILES_API FilePath PluginSettings()
AUDACITY_DLL_API wxString SetLang(const wxString &lang)