2010-02-03 23:58:40 +01:00
|
|
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
2009-08-30 05:46:39 +02:00
|
|
|
// Distributed under the MIT/X11 software license, see the accompanying
|
|
|
|
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(disable:4786)
|
|
|
|
#pragma warning(disable:4804)
|
2009-10-29 03:52:48 +01:00
|
|
|
#pragma warning(disable:4805)
|
2009-08-30 05:46:39 +02:00
|
|
|
#pragma warning(disable:4717)
|
|
|
|
#endif
|
|
|
|
#ifdef _WIN32_WINNT
|
|
|
|
#undef _WIN32_WINNT
|
|
|
|
#endif
|
2009-10-21 03:08:05 +02:00
|
|
|
#define _WIN32_WINNT 0x0400
|
2009-09-24 06:09:56 +02:00
|
|
|
#ifdef _WIN32_IE
|
|
|
|
#undef _WIN32_IE
|
|
|
|
#endif
|
2009-10-21 03:08:05 +02:00
|
|
|
#define _WIN32_IE 0x0400
|
2009-08-30 05:46:39 +02:00
|
|
|
#define WIN32_LEAN_AND_MEAN 1
|
2009-11-05 05:41:36 +01:00
|
|
|
#define __STDC_LIMIT_MACROS // to enable UINT64_MAX from stdint.h
|
2009-08-30 05:46:39 +02:00
|
|
|
#include <wx/wx.h>
|
2009-10-31 10:52:24 +01:00
|
|
|
#include <wx/stdpaths.h>
|
2010-02-26 17:09:43 +01:00
|
|
|
#include <wx/snglinst.h>
|
2010-02-25 22:55:27 +01:00
|
|
|
#if wxUSE_GUI
|
2010-02-26 17:09:43 +01:00
|
|
|
#include <wx/utils.h>
|
|
|
|
#include <wx/clipbrd.h>
|
2010-02-25 22:55:27 +01:00
|
|
|
#include <wx/taskbar.h>
|
|
|
|
#endif
|
2009-08-30 05:46:39 +02:00
|
|
|
#include <openssl/ecdsa.h>
|
|
|
|
#include <openssl/evp.h>
|
|
|
|
#include <openssl/rand.h>
|
|
|
|
#include <openssl/sha.h>
|
2009-11-05 05:41:36 +01:00
|
|
|
#include <openssl/ripemd.h>
|
2010-02-12 21:38:44 +01:00
|
|
|
#include <db_cxx.h>
|
2009-08-30 05:46:39 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#include <float.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <memory>
|
2010-02-12 21:38:44 +01:00
|
|
|
#include <iostream>
|
2009-08-30 05:46:39 +02:00
|
|
|
#include <sstream>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <list>
|
|
|
|
#include <deque>
|
|
|
|
#include <map>
|
|
|
|
#include <set>
|
|
|
|
#include <algorithm>
|
|
|
|
#include <numeric>
|
|
|
|
#include <boost/foreach.hpp>
|
|
|
|
#include <boost/lexical_cast.hpp>
|
|
|
|
#include <boost/tuple/tuple.hpp>
|
|
|
|
#include <boost/tuple/tuple_comparison.hpp>
|
|
|
|
#include <boost/tuple/tuple_io.hpp>
|
2009-11-05 05:41:36 +01:00
|
|
|
#include <boost/array.hpp>
|
2009-11-06 19:53:26 +01:00
|
|
|
#include <boost/bind.hpp>
|
|
|
|
#include <boost/function.hpp>
|
2010-02-12 21:38:44 +01:00
|
|
|
#include <boost/filesystem.hpp>
|
|
|
|
#include <boost/algorithm/string.hpp>
|
2009-11-05 05:41:36 +01:00
|
|
|
|
2009-10-31 10:11:43 +01:00
|
|
|
#ifdef __WXMSW__
|
|
|
|
#include <windows.h>
|
|
|
|
#include <winsock2.h>
|
2009-11-05 05:41:36 +01:00
|
|
|
#include <mswsock.h>
|
2009-10-31 10:11:43 +01:00
|
|
|
#include <shlobj.h>
|
2009-11-05 05:41:36 +01:00
|
|
|
#include <shlwapi.h>
|
|
|
|
#include <io.h>
|
|
|
|
#include <process.h>
|
2009-12-17 19:15:50 +01:00
|
|
|
#include <malloc.h>
|
2009-11-05 05:41:36 +01:00
|
|
|
#else
|
2009-10-31 10:11:43 +01:00
|
|
|
#include <sys/time.h>
|
2009-11-05 05:41:36 +01:00
|
|
|
#include <sys/resource.h>
|
2009-10-31 10:11:43 +01:00
|
|
|
#include <sys/socket.h>
|
2009-11-05 05:41:36 +01:00
|
|
|
#include <arpa/inet.h>
|
|
|
|
#include <netdb.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <errno.h>
|
2009-11-08 05:24:52 +01:00
|
|
|
#include <net/if.h>
|
|
|
|
#include <ifaddrs.h>
|
2009-11-05 05:41:36 +01:00
|
|
|
#endif
|
2009-12-17 19:15:50 +01:00
|
|
|
#ifdef __BSD__
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif
|
|
|
|
|
2009-10-31 10:11:43 +01:00
|
|
|
|
2009-08-30 05:46:39 +02:00
|
|
|
#pragma hdrstop
|
|
|
|
using namespace std;
|
|
|
|
using namespace boost;
|
|
|
|
|
2009-10-29 03:52:48 +01:00
|
|
|
#include "strlcpy.h"
|
2009-08-30 05:46:39 +02:00
|
|
|
#include "serialize.h"
|
|
|
|
#include "uint256.h"
|
|
|
|
#include "util.h"
|
|
|
|
#include "key.h"
|
|
|
|
#include "bignum.h"
|
|
|
|
#include "base58.h"
|
|
|
|
#include "script.h"
|
|
|
|
#include "db.h"
|
|
|
|
#include "net.h"
|
|
|
|
#include "irc.h"
|
|
|
|
#include "main.h"
|
2010-02-12 21:38:44 +01:00
|
|
|
#include "rpc.h"
|
2010-02-25 22:55:27 +01:00
|
|
|
#if wxUSE_GUI
|
2009-08-30 05:46:39 +02:00
|
|
|
#include "uibase.h"
|
2010-02-25 22:55:27 +01:00
|
|
|
#endif
|
2009-08-30 05:46:39 +02:00
|
|
|
#include "ui.h"
|
2010-02-25 22:55:27 +01:00
|
|
|
#include "init.h"
|
2009-11-05 05:41:36 +01:00
|
|
|
|
|
|
|
#include "xpm/addressbook16.xpm"
|
|
|
|
#include "xpm/addressbook20.xpm"
|
2009-11-07 19:51:41 +01:00
|
|
|
#include "xpm/bitcoin16.xpm"
|
|
|
|
#include "xpm/bitcoin20.xpm"
|
|
|
|
#include "xpm/bitcoin32.xpm"
|
|
|
|
#include "xpm/bitcoin48.xpm"
|
2010-06-21 19:11:26 +02:00
|
|
|
#include "xpm/bitcoin80.xpm"
|
2009-11-05 05:41:36 +01:00
|
|
|
#include "xpm/check.xpm"
|
|
|
|
#include "xpm/send16.xpm"
|
|
|
|
#include "xpm/send16noshadow.xpm"
|
|
|
|
#include "xpm/send20.xpm"
|
2010-02-03 23:58:40 +01:00
|
|
|
#include "xpm/about.xpm"
|