Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions 2GiveCoin.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ BDB_INCLUDE_PATH=/usr/local/opt/berkeley-db4/include
BDB_LIB_PATH=/usr/local/opt/berkeley-db4/lib
OPENSSL_INCLUDE_PATH=/usr/local/opt/openssl/include
OPENSSL_LIB_PATH=/usr/local/opt/openssl/lib
QRENCODE_INCLUDE_PATH=/usr/local/opt/qrencode/include
QRENCODE_LIB_PATH=/usr/local/opt/qrencode/lib

CONFIG += static

Expand All @@ -40,6 +42,8 @@ UI_DIR = build
# use: qmake "RELEASE=1"
contains(RELEASE, 1) {
# Mac: compile for maximum compatibility (10.5, 32-bit)
# This may be broken for Qt5. 10.7 is the last version with CI. For 10.6, "support is limited."
# See http://doc.qt.io/qt-5/osx.html
macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk

!windows:!macx {
Expand Down Expand Up @@ -129,6 +133,8 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
QMAKE_CXXFLAGS += -msse2
QMAKE_CFLAGS += -msse2
QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector
# This may be necessary for other platforms besides the Mac:
macx:QMAKE_CXXFLAGS_WARN_ON += -Wno-reserved-user-defined-literal

# Input
DEPENDPATH += src src/json src/qt
Expand Down Expand Up @@ -396,9 +402,25 @@ macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0
macx:ICON = src/qt/res/icons/givecoin.icns
macx:TARGET = "2GiveCoin-Qt"
macx:QMAKE_CFLAGS_THREAD += -pthread

macx:QMAKE_LFLAGS_THREAD += -pthread
macx:QMAKE_CXXFLAGS_THREAD += -pthread

# Since Mavericks, -stdlib=libc++ is the default, and bottled homebrew
# libraries will expect it. I am not clear what effect this will have
# on actual deployment.

# Working:
#
#QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9

# Works on 10.11. Not clear whether it would actually work on
# 10.7. Shouldn't work on 10.6.
#
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
macx:QMAKE_LFLAGS += -stdlib=libc++
macx:QMAKE_CXXFLAGS += -stdlib=libc++

# Set libraries and includes at end, to use platform-defined defaults if not overridden
INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
Expand Down
4 changes: 2 additions & 2 deletions src/bitcoinrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ string CRPCTable::help(string strCommand) const
Value help(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"help [command]\n"
"List commands, or get help for a command.");
Expand All @@ -210,7 +210,7 @@ Value help(const Array& params, bool fHelp)
Value stop(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"stop <detach>\n"
"<detach> is true or false to detach the database or not for this stop only\n"
Expand Down
2 changes: 1 addition & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static bool vfLimited[NET_MAX] = {};
static CNode* pnodeLocalHost = NULL;
CAddress addrSeenByPeer(CService("0.0.0.0", 0), nLocalServices);
uint64 nLocalHostNonce = 0;
array<int, THREAD_MAX> vnThreadsRunning;
boost::array<int, THREAD_MAX> vnThreadsRunning;
static std::vector<SOCKET> vhListenSocket;
CAddrMan addrman;

Expand Down
2 changes: 2 additions & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#include <QMainWindow>
#include <QSystemTrayIcon>

#ifndef Q_MOC_RUN
#include "util.h" // for uint64
//#include "banner.h"
#endif

class StyleSheetEditor;

Expand Down
8 changes: 4 additions & 4 deletions src/qt/notificator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <stdint.h>
#endif

#ifdef Q_OS_MAC
#if QT_VERSION < 0x050000 && defined(Q_OS_MAC)
#include <ApplicationServices/ApplicationServices.h>
extern bool qt_mac_execute_apple_script(const QString &script, AEDesc *ret);
#endif
Expand Down Expand Up @@ -46,7 +46,7 @@ Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon,
mode = Freedesktop;
}
#endif
#ifdef Q_OS_MAC
#if QT_VERSION < 0x050000 && defined(Q_OS_MAC)
// Check if Growl is installed (based on Qt's tray icon implementation)
CFURLRef cfurl;
OSStatus status = LSGetApplicationForInfo(kLSUnknownType, kLSUnknownCreator, CFSTR("growlTicket"), kLSRolesAll, 0, &cfurl);
Expand Down Expand Up @@ -225,7 +225,7 @@ void Notificator::notifySystray(Class cls, const QString &title, const QString &
}

// Based on Qt's tray icon implementation
#ifdef Q_OS_MAC
#if QT_VERSION < 0x050000 && defined(Q_OS_MAC)
void Notificator::notifyGrowl(Class cls, const QString &title, const QString &text, const QIcon &icon)
{
const QString script(
Expand Down Expand Up @@ -285,7 +285,7 @@ void Notificator::notify(Class cls, const QString &title, const QString &text, c
case QSystemTray:
notifySystray(cls, title, text, icon, millisTimeout);
break;
#ifdef Q_OS_MAC
#if 0 && defined(Q_OS_MAC)
case Growl12:
case Growl13:
notifyGrowl(cls, title, text, icon);
Expand Down
2 changes: 2 additions & 0 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#ifndef Q_MOC_RUN
#include "rpcconsole.h"
#include "ui_rpcconsole.h"

#include "clientmodel.h"
#include "bitcoinrpc.h"
#include "guiutil.h"
#endif

#include <QTime>
#include <QTimer>
Expand Down
20 changes: 10 additions & 10 deletions src/rpcblockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool fPri
Value getblockcount(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/* dvd throw runtime_error(
"getblockcount\n"
"Returns the number of blocks in the longest block chain.");
Expand All @@ -134,7 +134,7 @@ Value getblockcount(const Array& params, bool fHelp)
Value getdifficulty(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd
throw runtime_error(
"getdifficulty\n"
Expand All @@ -151,7 +151,7 @@ Value getdifficulty(const Array& params, bool fHelp)
Value settxfee(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 1 || AmountFromZeroValue(params[0]) < MIN_TX_FEE)
return NULL;
return Value();
/*dvd throw runtime_error(
"settxfee <amount>\n"
"<amount> is a real and is rounded to the nearest 0.01");
Expand All @@ -165,7 +165,7 @@ Value settxfee(const Array& params, bool fHelp)
Value getrawmempool(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"getrawmempool\n"
"Returns all transaction ids in memory pool.");
Expand All @@ -183,14 +183,14 @@ Value getrawmempool(const Array& params, bool fHelp)
Value getblockhash(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"getblockhash <index>\n"
"Returns hash of block in best-block-chain at <index>.");
*/
int nHeight = params[0].get_int();
if (nHeight < 0 || nHeight > nBestHeight)
return NULL;
return Value();
//dvd throw runtime_error("Block number out of range.");

CBlockIndex* pblockindex = FindBlockByHeight(nHeight);
Expand All @@ -200,7 +200,7 @@ Value getblockhash(const Array& params, bool fHelp)
Value getblock(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"getblock <hash> [txinfo]\n"
"txinfo optional to print more detailed tx info\n"
Expand All @@ -222,15 +222,15 @@ Value getblock(const Array& params, bool fHelp)
Value getblockbynumber(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"getblock <number> [txinfo]\n"
"txinfo optional to print more detailed tx info\n"
"Returns details of a block with given block-number.");
*/
int nHeight = params[0].get_int();
if (nHeight < 0 || nHeight > nBestHeight)
return NULL;
return Value();
//dvd throw runtime_error("Block number out of range.");

CBlock block;
Expand All @@ -250,7 +250,7 @@ Value getblockbynumber(const Array& params, bool fHelp)
Value getcheckpoint(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"getcheckpoint\n"
"Show info of synchronized checkpoint.\n");
Expand Down
4 changes: 2 additions & 2 deletions src/rpcdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CTxDump
Value importprivkey(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"importprivkey <2GiveCoinprivkey> [label]\n"
"Adds a private key (as returned by dumpprivkey) to your wallet.");
Expand Down Expand Up @@ -77,7 +77,7 @@ Value importprivkey(const Array& params, bool fHelp)
Value dumpprivkey(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 1)
return NULL;
return Value();
/* throw runtime_error(
"dumpprivkey <2GiveCoinaddress>\n"
"Reveals the private key corresponding to <2GiveCoinaddress>.");
Expand Down
22 changes: 11 additions & 11 deletions src/rpcmining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using namespace std;
Value getgenerate(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw std::runtime_error(
"getgenerate\n"
"Returns true or false.");
Expand All @@ -29,7 +29,7 @@ Value getgenerate(const Array& params, bool fHelp)
Value setgenerate(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"setgenerate <generate> [genproclimit]\n"
"<generate> is true or false to turn generation on or off.\n"
Expand All @@ -56,7 +56,7 @@ Value setgenerate(const Array& params, bool fHelp)
Value getmint(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw std::runtime_error(
"getmint\n"
"Returns true or false.");
Expand All @@ -67,7 +67,7 @@ Value getmint(const Array& params, bool fHelp)
Value setmint(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"setmint <stake>\n"
"<stake> is true or false to turn proof of stake minting on or off."
Expand All @@ -88,7 +88,7 @@ Value setmint(const Array& params, bool fHelp)
Value gethashespersec(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"gethashespersec\n"
"Returns a recent hashes per second performance measurement while generating.");
Expand All @@ -102,7 +102,7 @@ Value gethashespersec(const Array& params, bool fHelp)
Value getmininginfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"getmininginfo\n"
"Returns an object containing mining-related information.");
Expand Down Expand Up @@ -148,7 +148,7 @@ Value GetNetworkHashPS(int lookup) {
Value getnetworkhashps(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"getnetworkhashps [blocks]\n"
"Returns the estimated network hashes per second based on the last 120 blocks.\n"
Expand All @@ -161,7 +161,7 @@ Value getnetworkhashps(const Array& params, bool fHelp)
Value getworkex(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 2)
return NULL;
return Value();
/* throw runtime_error(
"getworkex [data, coinbase]\n"
"If [data, coinbase] is not specified, returns extended work data.\n"
Expand Down Expand Up @@ -292,7 +292,7 @@ Value getworkex(const Array& params, bool fHelp)
Value getwork(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"getwork [data]\n"
"If [data] is not specified, returns formatted hash data to work on:\n"
Expand Down Expand Up @@ -410,7 +410,7 @@ Value getwork(const Array& params, bool fHelp)
Value getblocktemplate(const Array& params, bool fHelp)
{
if (fHelp || params.size() > 1)
return NULL;
return Value();
/*dvd throw runtime_error(
"getblocktemplate [params]\n"
"Returns data needed to construct a block to work on:\n"
Expand Down Expand Up @@ -568,7 +568,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
Value submitblock(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"submitblock <hex data> [optional-params-obj]\n"
"[optional-params-obj] parameter is currently ignored.\n"
Expand Down
10 changes: 5 additions & 5 deletions src/rpcnet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ using namespace std;
Value getconnectioncount(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"getconnectioncount\n"
"Returns the number of connections to other nodes.");
Expand All @@ -42,7 +42,7 @@ static void CopyNodeStats(std::vector<CNodeStats>& vstats)
Value getpeerinfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() != 0)
return NULL;
return Value();
/*dvd throw runtime_error(
"getpeerinfo\n"
"Returns data about each connected network node.");
Expand Down Expand Up @@ -80,7 +80,7 @@ Value addnode(const Array& params, bool fHelp)
strCommand = params[1].get_str();
if (fHelp || params.size() != 2 ||
(strCommand != "onetry" && strCommand != "add" && strCommand != "remove"))
return NULL;
return Value();
/*dvd throw runtime_error(
"addnode <node> <add|remove|onetry>\n"
"Attempts add or remove <node> from the addnode list or try a connection to <node> once.");
Expand Down Expand Up @@ -119,7 +119,7 @@ Value addnode(const Array& params, bool fHelp)
Value getaddednodeinfo(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 1 || params.size() > 2)
return NULL;
return Value();
/*dvd throw runtime_error(
"getaddednodeinfo <dns> [node]\n"
"Returns information about the given added node, or all added nodes\n"
Expand Down Expand Up @@ -223,7 +223,7 @@ extern map<uint256, CAlert> mapAlerts;
Value sendalert(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 6)
return NULL;
return Value();
/*dvd throw runtime_error(
"sendalert <message> <privatekey> <minver> <maxver> <priority> <id> [cancelupto]\n"
"<message> is the alert text message\n"
Expand Down
Loading