Add an alternative message to debug crashes in compiled versions

As .dmp files are useful only for official releases (i.e. when we have the
compiled .exe+.pdb), this is an alternative message to stop receiving
.dmp files at support@aseprite.org that cannot be used to debug a crash.
This commit is contained in:
David Capello 2016-01-31 19:49:24 -03:00
parent c8814ffb75
commit 81d39664a7
3 changed files with 36 additions and 10 deletions

View File

@ -1,14 +1,22 @@
<!-- Aseprite -->
<!-- Copyright (C) 2014 by David Capello -->
<!-- Copyright (C) 2014, 2016 by David Capello -->
<gui>
<window text="Crash Report" id="send_crash">
<vbox>
<label text="Please send the following file:" />
<link id="filename" text="" url="" />
<label text="to this email:" />
<entry readonly="true" text="support@aseprite.org" maxsize="256" />
<label text="explaining what you was doing when the program crashed." />
<vbox id="official">
<label text="Please send the following file:" />
<link id="filename" text="" url="" />
<label text="to this email:" />
<entry readonly="true" text="support@aseprite.org" maxsize="256" />
<label text="explaining what you was doing when the program crashed." />
</vbox>
<vbox id="dev">
<label text="You are using a development version." />
<label text="Open the following file to debug your compilation:" />
<link id="dev_filename" text="" url="" />
</vbox>
<separator horizontal="true" />

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2001-2015 David Capello
// Copyright (C) 2001-2016 David Capello
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@ -62,8 +62,20 @@ void SendCrash::notificationClick()
}
app::gen::SendCrash dlg;
dlg.filename()->setText(m_dumpFilename);
dlg.filename()->Click.connect(base::Bind(&SendCrash::onClickFilename, this));
// The current version is a "development" version if the VERSION
// macro contains the "dev" word.
bool isDev = (std::string(VERSION).find("dev") != std::string::npos);
if (isDev) {
dlg.official()->setVisible(false);
dlg.devFilename()->setText(m_dumpFilename);
dlg.devFilename()->Click.connect(base::Bind(&SendCrash::onClickDevFilename, this));
}
else {
dlg.dev()->setVisible(false);
dlg.filename()->setText(m_dumpFilename);
dlg.filename()->Click.connect(base::Bind(&SendCrash::onClickFilename, this));
}
dlg.openWindowInForeground();
if (dlg.closer() == dlg.deleteFile()) {
@ -82,4 +94,9 @@ void SendCrash::onClickFilename()
base::launcher::open_folder(m_dumpFilename);
}
void SendCrash::onClickDevFilename()
{
base::launcher::open_file(m_dumpFilename);
}
} // namespace app

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2001-2015 David Capello
// Copyright (C) 2001-2016 David Capello
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@ -24,6 +24,7 @@ namespace app {
private:
void onClickFilename();
void onClickDevFilename();
std::string m_dumpFilename;
};