Merge branch '0.4.x' into 0.5.x
[novacoin.git] / src / init.cpp
index 0d042f0..168ebee 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;
     }
 
@@ -365,12 +370,14 @@ bool AppInit2(int argc, char* argv[])
         else if (nLoadWalletRet == DB_NEED_REWRITE)
         {
             strErrors += _("Wallet needed to be rewritten: restart Bitcoin to complete    \n");
+            printf("%s", strErrors.c_str());
             wxMessageBox(strErrors, "Bitcoin", wxOK | wxICON_ERROR);
             return false;
         }
         else
             strErrors += _("Error loading wallet.dat      \n");
     }
+    printf("%s", strErrors.c_str());
     printf(" wallet      %15"PRI64d"ms\n", GetTimeMillis() - nStart);
 
     RegisterWallet(pwalletMain);