diff -uNr a/bitcoin/src/bitcoinrpc.cpp b/bitcoin/src/bitcoinrpc.cpp --- a/bitcoin/src/bitcoinrpc.cpp a1812ac4e4425986e8574ebf837c6b1a84e4772e01b46e4e1caef098496226f7321a3fabc5249b55ce6365863f2c25fef0005f4bcde7188603b0805c77256bc0 +++ b/bitcoin/src/bitcoinrpc.cpp 654419ecfd3edd29c679d32b361468af54d64af0afecd287eeff7fdff775ed6d69aa06cadddf9c2d0abff4e90947630617284eca374ac5a4ad9b0b807afd050b @@ -163,13 +163,9 @@ throw runtime_error( "stop\n" "Stop bitcoin server."); -#ifndef QT_GUI // Shutdown will take long enough that the response should get back CreateThread(Shutdown, NULL); return "bitcoin server stopping"; -#else - throw runtime_error("NYI: cannot shut down GUI with RPC command"); -#endif } @@ -1552,11 +1548,6 @@ if (pwalletMain->IsCrypted()) throw JSONRPCError(-15, "Error: running with an encrypted wallet, but encryptwallet was called."); -#ifdef QT_GUI - // shutting down via RPC while the GUI is running does not work (yet): - throw runtime_error("Not Yet Implemented: use GUI to encrypt wallet, not RPC command"); -#endif - // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string) // Alternately, find a way to make params[0] mlock()'d to begin with. SecureString strWalletPass; @@ -2184,9 +2175,7 @@ strWhatAmI.c_str(), GetConfigFile().c_str(), EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()); -#ifndef QT_GUI CreateThread(Shutdown, NULL); -#endif return; } diff -uNr a/bitcoin/src/db.cpp b/bitcoin/src/db.cpp --- a/bitcoin/src/db.cpp 6c7b584c387898ceee4c76d4bc56d7400105807885b5b497089f99849e04f57a2e5c775b206765f5900c3c83967c6e2a0100dab71f314b1d28b01caaa67667cc +++ b/bitcoin/src/db.cpp d6b10e7037e8aefbf0cc1a8b76985401e6f4670c8d514bbfda2b7002e466df964be9f4bde71b739f31ed636369abd34816a9433338c1ef5c3bb21e801e4f83e0 @@ -919,9 +919,7 @@ ssKey >> strKey; // Options -#ifndef QT_GUI if (strKey == "fGenerateBitcoins") ssValue >> fGenerateBitcoins; -#endif if (strKey == "nTransactionFee") ssValue >> nTransactionFee; if (strKey == "fLimitProcessors") ssValue >> fLimitProcessors; if (strKey == "nLimitProcessors") ssValue >> nLimitProcessors; diff -uNr a/bitcoin/src/headers.h b/bitcoin/src/headers.h --- a/bitcoin/src/headers.h bac815c59cd69f09371cbc605c3365056b02529d4fc0cd68026b6dc0304f12dafcda86479f52191f20f14b87c56006306e362020ba7a0651cce2bda87db547ac +++ b/bitcoin/src/headers.h 5fa4d450d3f50651eeb12e3de9657c1a8a3968d37f2df15a7c1f7b0ad44fdbd427d8934f0cf81df00f6eac9a456a80adf7cbc2882678ac943c207ede1c2f637a @@ -89,8 +89,4 @@ #include "bignum.h" #include "base58.h" #include "main.h" -#ifdef QT_GUI -#include "qtui.h" -#else #include "noui.h" -#endif diff -uNr a/bitcoin/src/init.cpp b/bitcoin/src/init.cpp --- a/bitcoin/src/init.cpp 9ea336b2061c743c7f9fd590a02546616d8e3fd0dee8c9a15bb9a24e8e6138fb48f9b9be4b7452ce1e0eb4e69e8882d2b5f03ef2d6d0b50fdb9e0a869719ecfc +++ b/bitcoin/src/init.cpp 0a8227f07119a5ac88e550780a2c74482859d71119f19ce45096044703826751850f64ee5f06b57e4a0641f61d9d1a9f4c55946ee2eba25aa192f9a334a7ae8a @@ -12,16 +12,6 @@ #include #include -#if defined(BITCOIN_NEED_QT_PLUGINS) && !defined(_BITCOIN_QT_PLUGINS_INCLUDED) -#define _BITCOIN_QT_PLUGINS_INCLUDED -#define __INSURE__ -#include -Q_IMPORT_PLUGIN(qcncodecs) -Q_IMPORT_PLUGIN(qjpcodecs) -Q_IMPORT_PLUGIN(qtwcodecs) -Q_IMPORT_PLUGIN(qkrcodecs) -Q_IMPORT_PLUGIN(qtaccessiblewidgets) -#endif using namespace std; using namespace boost; @@ -91,7 +81,7 @@ // // Start // -#if !defined(QT_GUI) + int main(int argc, char* argv[]) { bool fRet = false; @@ -102,7 +92,7 @@ return 1; } -#endif + bool AppInit(int argc, char* argv[]) { @@ -206,10 +196,7 @@ #endif #endif " -paytxfee= \t " + _("Fee per kB to add to transactions you send\n") + -#ifdef QT_GUI - " -server \t\t " + _("Accept command line and JSON-RPC commands\n") + -#endif -#if !defined(WIN32) && !defined(QT_GUI) +#if !defined(WIN32) " -daemon \t\t " + _("Run in the background as a daemon and accept commands\n") + #endif " -testnet \t\t " + _("Use the test network\n") + @@ -241,19 +228,14 @@ // 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; } fTestNet = GetBoolArg("-testnet"); fDebug = GetBoolArg("-debug"); -#if !defined(WIN32) && !defined(QT_GUI) +#if !defined(WIN32) fDaemon = GetBoolArg("-daemon"); #else fDaemon = false; @@ -265,14 +247,11 @@ fServer = GetBoolArg("-server"); /* force fServer when running without GUI */ -#if !defined(QT_GUI) fServer = true; -#endif fPrintToConsole = GetBoolArg("-printtoconsole"); fPrintToDebugger = GetBoolArg("-printtodebugger"); fLogTimestamps = GetBoolArg("-logtimestamps"); -#ifndef QT_GUI for (int i = 1; i < argc; i++) if (!IsSwitchChar(argv[i][0])) fCommandLine = true; @@ -282,9 +261,8 @@ int ret = CommandLineRPC(argc, argv); exit(ret); } -#endif -#if !defined(WIN32) && !defined(QT_GUI) +#if !defined(WIN32) if (fDaemon) { // Daemonize @@ -541,10 +519,8 @@ if (fServer) CreateThread(ThreadRPCServer, NULL); -#if !defined(QT_GUI) while (1) Sleep(5000); -#endif return true; } diff -uNr a/bitcoin/src/qtui.h b/bitcoin/src/qtui.h --- a/bitcoin/src/qtui.h 2118eed5cb752a2e6556fed97925061c2b9cf87c558bd328a4aba36e51d72255d45ba461889587426db60d2f6405187f9eb387b29666435f984afd1f277dd8d9 +++ b/bitcoin/src/qtui.h false @@ -1,49 +0,0 @@ -// Copyright (c) 2010 Satoshi Nakamoto -// Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_EXTERNUI_H -#define BITCOIN_EXTERNUI_H - -#include -#include -#include "wallet.h" - -typedef void wxWindow; -#define wxYES 0x00000002 -#define wxOK 0x00000004 -#define wxNO 0x00000008 -#define wxYES_NO (wxYES|wxNO) -#define wxCANCEL 0x00000010 -#define wxAPPLY 0x00000020 -#define wxCLOSE 0x00000040 -#define wxOK_DEFAULT 0x00000000 -#define wxYES_DEFAULT 0x00000000 -#define wxNO_DEFAULT 0x00000080 -#define wxCANCEL_DEFAULT 0x80000000 -#define wxICON_EXCLAMATION 0x00000100 -#define wxICON_HAND 0x00000200 -#define wxICON_WARNING wxICON_EXCLAMATION -#define wxICON_ERROR wxICON_HAND -#define wxICON_QUESTION 0x00000400 -#define wxICON_INFORMATION 0x00000800 -#define wxICON_STOP wxICON_HAND -#define wxICON_ASTERISK wxICON_INFORMATION -#define wxICON_MASK (0x00000100|0x00000200|0x00000400|0x00000800) -#define wxFORWARD 0x00001000 -#define wxBACKWARD 0x00002000 -#define wxRESET 0x00004000 -#define wxHELP 0x00008000 -#define wxMORE 0x00010000 -#define wxSETUP 0x00020000 - -extern int MyMessageBox(const std::string& message, const std::string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1); -#define wxMessageBox MyMessageBox -extern int ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1); -extern bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption, wxWindow* parent); -extern void CalledSetStatusBar(const std::string& strText, int nField); -extern void UIThreadCall(boost::function0 fn); -extern void MainFrameRepaint(); -extern void InitMessage(const std::string &message); -extern std::string _(const char* psz); - -#endif diff -uNr a/bitcoin/src/util.h b/bitcoin/src/util.h --- a/bitcoin/src/util.h 04d09e92edd13820ea292bc0c0f66a9bc6f31c4020204817de56b7ae795c660dd47d7442d32403ba58fdc75ed1985174f6c507bcde7ee988a70185ba22fbb418 +++ b/bitcoin/src/util.h 1355ad6ce93816fffc1befd7a68a5fbdf034ae24ae99c64a60269ca9db589363d6531f441cd2393630e3128c2762ddcb8101dd6c305551b70cf24e102e59cfd0 @@ -134,12 +134,11 @@ return ret; } #define closesocket(s) myclosesocket(s) -#if !defined(QT_GUI) inline const char* _(const char* psz) { return psz; } -#endif + diff -uNr a/bitcoin/src/wallet.cpp b/bitcoin/src/wallet.cpp --- a/bitcoin/src/wallet.cpp dea54bd209fed8405bc3674fddd237414b6c49d00b81969c22fd3f38d24d8a2b95c9e20af3d9a0cfcc32b0d241f9a29b8742379c944dbd8d9c16120693aa4988 +++ b/bitcoin/src/wallet.cpp bdc4fc472be4a86fb91fa69368faace04414fdeee5b8c82795e31d37e21581b973caf7f3e9ccc27d487944a5782e3b59615180eab87c8b3e81242901f3039e4d @@ -267,7 +267,6 @@ if (fInsertedNew || fUpdated) if (!wtx.WriteToDisk()) return false; -#ifndef QT_GUI // If default receiving address gets used, replace it with a new one CScript scriptDefaultKey; scriptDefaultKey.SetBitcoinAddress(vchDefaultKey); @@ -283,7 +282,6 @@ } } } -#endif // Notify UI vWalletUpdated.push_back(hash);