#include <gtkmm2ext/utils.h>
#include "version.h"
-#include "utils.h"
#include "ardour_ui.h"
#include "opts.h"
#include "enums.h"
#include "i18n.h"
+#ifdef PLATFORM_WINDOWS
+#include <fcntl.h> // Needed for '_fmode'
+#endif
+
+#ifdef WAF_BUILD
+#include "gtk2ardour-version.h"
+#endif
using namespace std;
using namespace Gtk;
return false; /* do not call again */
}
+#ifndef PLATFORM_WINDOWS
static void
sigpipe_handler (int /*signal*/)
{
done_the_backend_thing = true;
}
}
+#endif
#if (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))
/*
gtk_set_locale ();
#endif
-#ifdef WINDOWS_VST_SUPPORT
+#if (defined WINDOWS_VST_SUPPORT && !defined PLATFORM_WINDOWS)
/* this does some magic that is needed to make GTK and X11 client interact properly.
* the platform dependent code is in windows_vst_plugin_ui.cc
*/
#endif
if (parse_opts (argc, argv)) {
+#if (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))
+ // Since we don't ordinarily have access to stdout and stderr with
+ // an MSVC app, let the user know we encountered a parsing error.
+ Gtk::Main app(&argc, &argv); // Calls 'gtk_init()'
+
+ Gtk::MessageDialog dlgReportParseError (_("\n Ardour could not understand your command line "),
+ false, MESSAGE_ERROR, BUTTONS_CLOSE, true);
+ dlgReportParseError.set_title (_("An error was encountered while launching Ardour"));
+ dlgReportParseError.run ();
+#endif
exit (1);
}