#include "headers.h"
#include "init.h"
+#include "qtipcserver.h"
+ #include "util.h"
#include <QApplication>
#include <QMessageBox>
return QCoreApplication::translate("bitcoin-core", psz).toStdString();
}
+ /* Handle runaway exceptions. Shows a message box with the problem and quits the program.
+ */
+ static void handleRunawayException(std::exception *e)
+ {
+ PrintExceptionContinue(e, "Runaway exception");
+ QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occured. Bitcoin can no longer continue safely and will quit.") + QString("\n\n") + QString::fromStdString(strMiscWarning));
+ exit(1);
+ }
+
+#ifndef BITCOIN_QT_TEST
int main(int argc, char *argv[])
{
+#if !defined(MAC_OSX) && !defined(WIN32)
+// TODO: implement qtipcserver.cpp for Mac and Windows
+
+ // Do this early as we don't want to bother initializing if we are just calling IPC
+ for (int i = 1; i < argc; i++)
+ {
+ if (strlen(argv[i]) > 7 && strncasecmp(argv[i], "bitcoin:", 8) == 0)
+ {
+ const char *strURI = argv[i];
+ try {
+ boost::interprocess::message_queue mq(boost::interprocess::open_only, BITCOINURI_QUEUE_NAME);
+ if(mq.try_send(strURI, strlen(strURI), 0))
+ exit(0);
+ else
+ break;
+ }
+ catch (boost::interprocess::interprocess_exception &ex) {
+ break;
+ }
+ }
+ }
+#endif
+
+ // Internal string conversion is all UTF-8
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForCStrings(QTextCodec::codecForTr());
/*
* Qt4 bitcoin GUI.
*
- * W.J. van der Laan 2011
- * The Bitcoin Developers 2011
+ * W.J. van der Laan 20011-2012
+ * The Bitcoin Developers 20011-2012
*/
+
+ #include "checkpoints.h"
+
#include "bitcoingui.h"
#include "transactiontablemodel.h"
#include "addressbookpage.h"
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#include "headers.h"
#include "strlcpy.h"
+#include <boost/algorithm/string/join.hpp>
+
+ // Work around clang compilation problem in Boost 1.46:
+ // /usr/include/boost/program_options/detail/config_file.hpp:163:17: error: call to function 'to_internal' that is neither visible in the template definition nor found by argument-dependent lookup
+ // See also: http://stackoverflow.com/questions/10020179/compilation-fail-in-boost-librairies-program-options
+ // http://clang.debian.net/status.php?version=3.0&key=CANNOT_FIND_FUNCTION
+ namespace boost {
+ namespace program_options {
+ std::string to_internal(const std::string&);
+ }
+ }
+
#include <boost/program_options/detail/config_file.hpp>
#include <boost/program_options/parsers.hpp>
#include <boost/filesystem.hpp>