Add support for Dr.Mingw

This commit is contained in:
Robin Gareus 2020-09-29 05:48:25 +02:00
parent d4d3d84d8c
commit 5ebb016544
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
4 changed files with 32 additions and 2 deletions

View file

@ -74,6 +74,10 @@
#include <shellapi.h> // console
#endif
#ifdef HAVE_DRMINGW
#include <exchndl.h>
#endif
#ifdef WAF_BUILD
#include "gtk2ardour-version.h"
#endif
@ -336,6 +340,23 @@ int main (int argc, char *argv[])
<< endl;
}
#ifdef HAVE_DRMINGW
if (true) {
Glib::DateTime tm (g_date_time_new_now_local ());
string crash_dir = Glib::get_home_dir();
if (crash_dir.empty ()) {
crash_dir = Glib::get_user_data_dir ();
}
string crash_file = string_compose ("%1-crash-%2.txt", PROGRAM_NAME, tm.format ("%s"));
string crash_path = Glib::build_filename (crash_dir, crash_file);
ExcHndlInit ();
ExcHndlSetLogFileNameA (crash_path.c_str());
cout << "Crash Log: " << crash_path << endl;
}
#endif
if (!ARDOUR::init (ARDOUR_COMMAND_LINE::use_vst, ARDOUR_COMMAND_LINE::try_hw_optimization, localedir.c_str(), true)) {
error << string_compose (_("could not initialize %1."), PROGRAM_NAME) << endmsg;
Gtk::Main main (argc, argv);