On windows, show message box with help, as there is no stderr (fixes #702)
authorWladimir J. van der Laan <laanwj@gmail.com>
Fri, 17 Feb 2012 16:53:41 +0000 (17:53 +0100)
committerLuke Dashjr <luke-jr+git@utopios.org>
Mon, 27 Feb 2012 17:48:28 +0000 (12:48 -0500)
(partial)

src/init.cpp

index 0d042f0..c8141f2 100644 (file)
@@ -241,7 +241,12 @@ bool AppInit2(int argc, char* argv[])
 
         // Remove tabs
         strUsage.erase(std::remove(strUsage.begin(), strUsage.end(), '\t'), strUsage.end());
+#if defined(QT_GUI) && defined(WIN32)
+        // On windows, show a message box, as there is no stderr
+        wxMessageBox(strUsage, "Usage");
+#else
         fprintf(stderr, "%s", strUsage.c_str());
+#endif
         return false;
     }