mirror of
https://github.com/AskDavis/Casinotest.git
synced 2025-12-31 20:55:58 -08:00
Merge pull request #17 from casinocoin/issue-16
changes to support updated boost and Qt
This commit is contained in:
@@ -1,46 +1,30 @@
|
||||
TEMPLATE = app
|
||||
TARGET = casinocoin-qt
|
||||
VERSION = 2.0.0.0
|
||||
VERSION = 2.1.0.0
|
||||
INCLUDEPATH += src src/json src/qt
|
||||
QT += core gui network widgets qml quick
|
||||
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE USE_IPV6 __NO_SYSTEM_INCLUDES
|
||||
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE USE_IPV6
|
||||
CONFIG += no_include_pwd
|
||||
CONFIG += thread
|
||||
CONFIG += static
|
||||
|
||||
BOOST_LIB_SUFFIX=-mgw49-mt-s-1_55
|
||||
BOOST_THREAD_LIB_SUFFIX=$$BOOST_LIB_SUFFIX
|
||||
BOOST_INCLUDE_PATH=C:/deps/boost_1_55_0
|
||||
BOOST_LIB_PATH=C:/deps/boost_1_55_0/stage/lib
|
||||
BDB_INCLUDE_PATH=C:/deps/db-4.8.30.NC/build_unix
|
||||
BDB_LIB_PATH=C:/deps/db-4.8.30.NC/build_unix
|
||||
# Build boost:
|
||||
# .\b2 toolset=gcc address-model=32 define=BOOST_USE_WINAPI_VERSION=0x0600 variant=release link=static threading=multi runtime-link=static --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread stage
|
||||
# define=BOOST_USE_WINAPI_VERSION=0x0600
|
||||
BOOST_LIB_SUFFIX=-mt
|
||||
BOOST_LIB_PATH=C:/msys64/usr/src/deps32/boost_1_60_0/stage/lib
|
||||
BOOST_INCLUDE_PATH=C:/msys64/usr/src/deps32/boost_1_60_0
|
||||
BDB_INCLUDE_PATH=C:/msys64/usr/src/deps32/db-4.8.30.NC/build_unix
|
||||
BDB_LIB_PATH=C:/msys64/usr/src/deps32/db-4.8.30.NC/build_unix
|
||||
BDB_LIB_SUFFIX=-4.8
|
||||
OPENSSL_INCLUDE_PATH=C:/deps/openssl-1.0.2d/include
|
||||
OPENSSL_LIB_PATH=C:/deps/openssl-1.0.2d
|
||||
MINIUPNPC_INCLUDE_PATH=C:/deps/
|
||||
MINIUPNPC_LIB_PATH=C:/deps/miniupnpc
|
||||
QRENCODE_INCLUDE_PATH=C:/deps/qrencode-3.4.3
|
||||
QRENCODE_LIB_PATH=C:/deps/qrencode-3.4.3/.libs
|
||||
MINIUPNPC_INCLUDE_PATH=C:/msys64/usr/src/deps32/miniupnpc-1.9/include
|
||||
MINIUPNPC_LIB_PATH=C:/msys64/usr/src/deps32/miniupnpc-1.9
|
||||
QRENCODE_INCLUDE_PATH=C:/msys64/usr/src/deps32/qrencode-3.4.4
|
||||
QRENCODE_LIB_PATH=C:/msys64/usr/src/deps32/qrencode-3.4.4/.libs
|
||||
|
||||
OBJECTS_DIR = build
|
||||
MOC_DIR = build
|
||||
UI_DIR = build
|
||||
|
||||
# for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection
|
||||
QMAKE_CXXFLAGS *= -fstack-protector-all
|
||||
QMAKE_LFLAGS *= -fstack-protector-all
|
||||
# Exclude on Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable!
|
||||
# This can be enabled for Windows, when we switch to MinGW >= 4.4.x.
|
||||
|
||||
# for extra security (see: https://wiki.debian.org/Hardening): this flag is GCC compiler-specific
|
||||
QMAKE_CXXFLAGS *= -D_FORTIFY_SOURCE=2
|
||||
# for extra security on Windows: enable ASLR and DEP via GCC linker flags
|
||||
QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat
|
||||
# on Windows: enable GCC large address aware linker flag
|
||||
QMAKE_LFLAGS *= -Wl,--large-address-aware
|
||||
# i686-w64-mingw32
|
||||
QMAKE_LFLAGS *= -static-libgcc -static-libstdc++
|
||||
|
||||
# use: qmake "USE_QRCODE=1"
|
||||
# libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support
|
||||
contains(USE_QRCODE, 1) {
|
||||
@@ -116,9 +100,7 @@ contains(USE_BUILD_INFO, 1) {
|
||||
DEFINES += HAVE_BUILD_INFO
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-strict-aliasing -Wstack-protector
|
||||
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedefs -Wno-maybe-uninitialized
|
||||
QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused -Wno-strict-aliasing -Wstack-protector -Wno-maybe-uninitialized
|
||||
|
||||
##### Start Project Files #####
|
||||
|
||||
@@ -424,15 +406,6 @@ TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
|
||||
TSQM.CONFIG = no_link
|
||||
QMAKE_EXTRA_COMPILERS += TSQM
|
||||
|
||||
# platform specific defaults, if not overridden on command line
|
||||
isEmpty(BOOST_LIB_SUFFIX) {
|
||||
BOOST_LIB_SUFFIX = -mgw46-mt-s-1_53
|
||||
}
|
||||
|
||||
isEmpty(BOOST_THREAD_LIB_SUFFIX) {
|
||||
BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX
|
||||
}
|
||||
|
||||
DEFINES += WIN32
|
||||
RC_FILE = src/qt/res/bitcoin-qt.rc
|
||||
|
||||
@@ -448,12 +421,12 @@ RC_FILE = src/qt/res/bitcoin-qt.rc
|
||||
}
|
||||
|
||||
# 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,)
|
||||
INCLUDEPATH += $$BDB_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH $$BOOST_INCLUDE_PATH
|
||||
LIBS += $$join(BDB_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,) $$join(BOOST_LIB_PATH,,-L,)
|
||||
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX -lpthread
|
||||
# -lgdi32 has to happen after -lcrypto (see #681)
|
||||
LIBS += -lws2_32 -lole32 -lmswsock -loleaut32 -luuid -lgdi32 -lshlwapi
|
||||
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
|
||||
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_LIB_SUFFIX
|
||||
LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
|
||||
|
||||
system($$QMAKE_LRELEASE -silent $$TRANSLATIONS)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
|
||||
@@ -355,7 +355,7 @@ static string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
|
||||
"HTTP/1.1 %d %s\r\n"
|
||||
"Date: %s\r\n"
|
||||
"Connection: %s\r\n"
|
||||
"Content-Length: %"PRIszu"\r\n"
|
||||
"Content-Length: %" PRIszu "\r\n"
|
||||
"Content-Type: application/json\r\n"
|
||||
"Server: "+ COIN_NAME + "-json-rpc/%s\r\n"
|
||||
"\r\n"
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
|
||||
#define CLIENT_VERSION_MAJOR 2
|
||||
#define CLIENT_VERSION_MINOR 0
|
||||
#define CLIENT_VERSION_REVISION 1
|
||||
#define CLIENT_VERSION_MINOR 1
|
||||
#define CLIENT_VERSION_REVISION 0
|
||||
#define CLIENT_VERSION_BUILD 0
|
||||
|
||||
// Set to true for release, false for prerelease or test build
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
#define _BITCOIN_COMPAT_H 1
|
||||
|
||||
#ifdef WIN32
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#define FD_SETSIZE 1024 // max number of fds in fd_set
|
||||
#include <windows.h>
|
||||
#include <mswsock.h>
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
@@ -26,7 +25,8 @@
|
||||
#include <ifaddrs.h>
|
||||
#endif
|
||||
|
||||
typedef u_int SOCKET;
|
||||
// SOCKET is defined by TDM-GCC
|
||||
// typedef u_int SOCKET;
|
||||
#ifdef WIN32
|
||||
#define MSG_NOSIGNAL 0
|
||||
#define MSG_DONTWAIT 0
|
||||
|
||||
@@ -139,7 +139,7 @@ case "$TARGET_OS" in
|
||||
;;
|
||||
OS_WINDOWS_CROSSCOMPILE | NATIVE_WINDOWS)
|
||||
PLATFORM=OS_WINDOWS
|
||||
COMMON_FLAGS="-fno-builtin-memcmp -D_REENTRANT -DOS_WINDOWS -DLEVELDB_PLATFORM_WINDOWS -DWINVER=0x0500 -D__USE_MINGW_ANSI_STDIO=1"
|
||||
COMMON_FLAGS="-fno-builtin-memcmp -D_REENTRANT -DOS_WINDOWS -DLEVELDB_PLATFORM_WINDOWS -DWINVER=0x0600 -D__USE_MINGW_ANSI_STDIO=1"
|
||||
PLATFORM_SOURCES="util/env_win.cc"
|
||||
PLATFORM_LIBS="-lshlwapi"
|
||||
PORT_FILE=port/port_win.cc
|
||||
|
||||
@@ -4492,7 +4492,7 @@ public:
|
||||
CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||
{
|
||||
// Create new block
|
||||
auto_ptr<CBlockTemplate> pblocktemplate(new CBlockTemplate());
|
||||
std::unique_ptr<CBlockTemplate> pblocktemplate(new CBlockTemplate());
|
||||
if(!pblocktemplate.get())
|
||||
return NULL;
|
||||
CBlock *pblock = &pblocktemplate->block; // pointer for convenience
|
||||
@@ -4860,7 +4860,7 @@ void static CasinoCoinMiner(CWallet *pwallet)
|
||||
unsigned int nTransactionsUpdatedLast = nTransactionsUpdated;
|
||||
CBlockIndex* pindexPrev = pindexBest;
|
||||
|
||||
auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
|
||||
std::unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
|
||||
if (!pblocktemplate.get())
|
||||
return;
|
||||
CBlock *pblock = &pblocktemplate->block;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#ifdef _WIN32_IE
|
||||
#undef _WIN32_IE
|
||||
#endif
|
||||
|
||||
@@ -743,7 +743,7 @@ static CScript _createmultisig(const Array& params)
|
||||
if ((int)keys.size() < nRequired)
|
||||
throw runtime_error(
|
||||
strprintf("not enough keys supplied "
|
||||
"(got %"PRIszu" keys, but need at least %d to redeem)", keys.size(), nRequired));
|
||||
"(got %" PRIszu " keys, but need at least %d to redeem)", keys.size(), nRequired));
|
||||
std::vector<CPubKey> pubkeys;
|
||||
pubkeys.resize(keys.size());
|
||||
for (unsigned int i = 0; i < keys.size(); i++)
|
||||
|
||||
10
src/util.cpp
10
src/util.cpp
@@ -51,7 +51,7 @@ namespace boost {
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#ifdef _WIN32_IE
|
||||
#undef _WIN32_IE
|
||||
#endif
|
||||
@@ -393,7 +393,7 @@ string FormatMoney(int64 n, bool fPlus)
|
||||
int64 n_abs = (n > 0 ? n : -n);
|
||||
int64 quotient = n_abs/COIN;
|
||||
int64 remainder = n_abs%COIN;
|
||||
string str = strprintf("%"PRI64d".%08"PRI64d, quotient, remainder);
|
||||
string str = strprintf("%" PRI64d ".%08" PRI64d, quotient, remainder);
|
||||
|
||||
// Right-trim excess zeros before the decimal point:
|
||||
int nTrim = 0;
|
||||
@@ -1330,7 +1330,7 @@ void AddTimeData(const CNetAddr& ip, int64 nTime)
|
||||
|
||||
// Add data
|
||||
vTimeOffsets.input(nOffsetSample);
|
||||
printf("Added time data, samples %d, offset %+"PRI64d" (%+"PRI64d" minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60);
|
||||
printf("Added time data, samples %d, offset %+" PRI64d " (%+" PRI64d " minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60);
|
||||
if (vTimeOffsets.size() >= 5 && vTimeOffsets.size() % 2 == 1)
|
||||
{
|
||||
int64 nMedian = vTimeOffsets.median();
|
||||
@@ -1365,10 +1365,10 @@ void AddTimeData(const CNetAddr& ip, int64 nTime)
|
||||
}
|
||||
if (fDebug) {
|
||||
BOOST_FOREACH(int64 n, vSorted)
|
||||
printf("%+"PRI64d" ", n);
|
||||
printf("%+" PRI64d " ", n);
|
||||
printf("| ");
|
||||
}
|
||||
printf("nTimeOffset = %+"PRI64d" (%+"PRI64d" minutes)\n", nTimeOffset, nTimeOffset/60);
|
||||
printf("nTimeOffset = %+" PRI64d " (%+" PRI64d " minutes)\n", nTimeOffset, nTimeOffset/60);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user