forked from namecoin-qt/namecoin-qt
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commiting my updates that turn namecoind into namecoin-qt.
I compiled it in MinGW, Linux may require minor changes in qmake project. Note: wallet encryption will make the wallet inaccessible for the daemon. Soon I'll update the daemon with 'walletpassphrase' etc.
- Loading branch information
1 parent
30dbdf7
commit 8ac1ca4
Showing
158 changed files
with
24,265 additions
and
32,758 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!.gitignore | ||
!readme.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Put libraries here, namely: | ||
|
||
boost | ||
OpenSSL | ||
Berkeley DB | ||
MiniUPnPc | ||
|
||
|
||
Alternatively, provide paths to these libraries when running qmake. An example for Windows is shown in project\run_qmake.bat, which uses the following directories: | ||
|
||
boost_1_50_0 | ||
openssl-1.0.1e | ||
db-4.7.25.NC | ||
miniupnpc-1.8.20130211 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,368 @@ | ||
TEMPLATE = app | ||
TARGET = namecoin-qt | ||
macx:TARGET = "Namecoin-Qt" | ||
VERSION = 0.3.50 | ||
QT += network | ||
DEFINES += GUI QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE | ||
CONFIG += no_include_pwd | ||
CONFIG += thread | ||
|
||
DEFINES += NOPCH FOURWAYSSE2 USE_SSL | ||
|
||
# for boost 1.37, add -mt to the boost libraries | ||
# use: qmake BOOST_LIB_SUFFIX=-mt | ||
# for boost thread win32 with _win32 sufix | ||
# use: BOOST_THREAD_LIB_SUFFIX=_win32-... | ||
# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8 | ||
|
||
# Dependency library locations can be customized with: | ||
# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH, | ||
# BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively | ||
|
||
OBJECTS_DIR = build | ||
MOC_DIR = build | ||
UI_DIR = build | ||
|
||
# use: qmake "RELEASE=1" | ||
contains(RELEASE, 1) { | ||
# Mac: compile for maximum compatibility (10.5, 32-bit) | ||
macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk | ||
macx:QMAKE_CFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk | ||
macx:QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk | ||
|
||
!win32:!macx { | ||
# Linux: static link and extra security (see: https://wiki.debian.org/Hardening) | ||
LIBS += -Wl,-Bstatic -Wl,-z,relro -Wl,-z,now | ||
} | ||
} | ||
|
||
!win32 { | ||
# 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 | ||
win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat | ||
# on Windows: enable GCC large address aware linker flag | ||
win32:QMAKE_LFLAGS *= -Wl,--large-address-aware | ||
|
||
# use: qmake "USE_QRCODE=1" | ||
# libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support | ||
contains(USE_QRCODE, 1) { | ||
message(Building with QRCode support) | ||
DEFINES += USE_QRCODE | ||
LIBS += -lqrencode | ||
} | ||
|
||
# use: qmake "USE_UPNP=1" ( enabled by default; default) | ||
# or: qmake "USE_UPNP=0" (disabled by default) | ||
# or: qmake "USE_UPNP=-" (not supported) | ||
# miniupnpc (http://miniupnp.free.fr/files/) must be installed for support | ||
contains(USE_UPNP, -) { | ||
message(Building without UPNP support) | ||
} else { | ||
message(Building with UPNP support) | ||
count(USE_UPNP, 0) { | ||
USE_UPNP=1 | ||
} | ||
DEFINES += USE_UPNP=$$USE_UPNP STATICLIB | ||
INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH | ||
LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc | ||
win32:LIBS += -liphlpapi | ||
} | ||
|
||
# use: qmake "USE_DBUS=1" | ||
contains(USE_DBUS, 1) { | ||
message(Building with DBUS (Freedesktop notifications) support) | ||
DEFINES += USE_DBUS | ||
QT += dbus | ||
} | ||
|
||
# Namecoind does not support IPv6 | ||
isEmpty(USE_IPV6) { | ||
USE_IPV6=- | ||
} | ||
|
||
# use: qmake "USE_IPV6=1" ( enabled by default; default) | ||
# or: qmake "USE_IPV6=0" (disabled by default) | ||
# or: qmake "USE_IPV6=-" (not supported) | ||
contains(USE_IPV6, -) { | ||
message(Building without IPv6 support) | ||
} else { | ||
count(USE_IPV6, 0) { | ||
USE_IPV6=1 | ||
} | ||
DEFINES += USE_IPV6=$$USE_IPV6 | ||
} | ||
|
||
contains(BITCOIN_NEED_QT_PLUGINS, 1) { | ||
DEFINES += BITCOIN_NEED_QT_PLUGINS | ||
QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets | ||
} | ||
|
||
!win32 { | ||
} else { | ||
# make an educated guess about what the ranlib command is called | ||
isEmpty(QMAKE_RANLIB) { | ||
QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib) | ||
} | ||
} | ||
|
||
# Regenerate src/build.h | ||
!win32|contains(USE_BUILD_INFO, 1) { | ||
genbuild.depends = FORCE | ||
genbuild.commands = cd $$PWD; /bin/sh share/genbuild.sh $$OUT_PWD/build/build.h | ||
genbuild.target = $$OUT_PWD/build/build.h | ||
PRE_TARGETDEPS += $$OUT_PWD/build/build.h | ||
QMAKE_EXTRA_TARGETS += genbuild | ||
DEFINES += HAVE_BUILD_INFO | ||
} | ||
|
||
QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector | ||
|
||
# Input | ||
DEPENDPATH += ../src ../src/json ../src/cryptopp ../src/qt | ||
|
||
NAMECOIN_HEADERS = headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \ | ||
script.h allocators.h db.h walletdb.h crypter.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h auxpow.h | ||
|
||
NAMECOIN_SOURCES = \ | ||
auxpow.cpp \ | ||
util.cpp \ | ||
key.cpp \ | ||
script.cpp \ | ||
db.cpp \ | ||
walletdb.cpp \ | ||
crypter.cpp \ | ||
net.cpp \ | ||
irc.cpp \ | ||
keystore.cpp \ | ||
main.cpp \ | ||
wallet.cpp \ | ||
rpc.cpp \ | ||
init.cpp \ | ||
cryptopp/sha.cpp \ | ||
cryptopp/cpu.cpp \ | ||
namecoin.cpp | ||
|
||
HEADERS += $$join(NAMECOIN_HEADERS," ../src/",,) | ||
SOURCES += $$join(NAMECOIN_SOURCES," ../src/",,) | ||
|
||
HEADERS += \ | ||
../src/qt/netbase.h \ | ||
../src/qt/bitcoingui.h \ | ||
../src/qt/transactiontablemodel.h \ | ||
../src/qt/addresstablemodel.h \ | ||
../src/qt/optionsdialog.h \ | ||
../src/qt/sendcoinsdialog.h \ | ||
../src/qt/addressbookpage.h \ | ||
../src/qt/signverifymessagedialog.h \ | ||
../src/qt/aboutdialog.h \ | ||
../src/qt/editaddressdialog.h \ | ||
../src/qt/bitcoinaddressvalidator.h \ | ||
../src/qt/clientmodel.h \ | ||
../src/qt/guiutil.h \ | ||
../src/qt/transactionrecord.h \ | ||
../src/qt/guiconstants.h \ | ||
../src/qt/optionsmodel.h \ | ||
../src/qt/monitoreddatamapper.h \ | ||
../src/qt/transactiondesc.h \ | ||
../src/qt/transactiondescdialog.h \ | ||
../src/qt/bitcoinamountfield.h \ | ||
../src/qt/transactionfilterproxy.h \ | ||
../src/qt/transactionview.h \ | ||
../src/qt/walletmodel.h \ | ||
../src/qt/overviewpage.h \ | ||
../src/qt/csvmodelwriter.h \ | ||
../src/qt/sendcoinsentry.h \ | ||
../src/qt/qvalidatedlineedit.h \ | ||
../src/qt/bitcoinunits.h \ | ||
../src/qt/qvaluecombobox.h \ | ||
../src/qt/askpassphrasedialog.h \ | ||
../src/qt/notificator.h \ | ||
../src/qt/paymentserver.h \ | ||
../src/qt/ui_interface.h \ | ||
../src/qt/rpcconsole.h \ | ||
../src/json/json_spirit_writer_template.h \ | ||
../src/json/json_spirit_writer.h \ | ||
../src/json/json_spirit_value.h \ | ||
../src/json/json_spirit_utils.h \ | ||
../src/json/json_spirit_stream_reader.h \ | ||
../src/json/json_spirit_reader_template.h \ | ||
../src/json/json_spirit_reader.h \ | ||
../src/json/json_spirit_error_position.h \ | ||
../src/json/json_spirit.h | ||
|
||
SOURCES += \ | ||
../src/qt/netbase.cpp \ | ||
../src/qt/bitcoin.cpp \ | ||
../src/qt/bitcoingui.cpp \ | ||
../src/qt/transactiontablemodel.cpp \ | ||
../src/qt/addresstablemodel.cpp \ | ||
../src/qt/optionsdialog.cpp \ | ||
../src/qt/sendcoinsdialog.cpp \ | ||
../src/qt/addressbookpage.cpp \ | ||
../src/qt/signverifymessagedialog.cpp \ | ||
../src/qt/aboutdialog.cpp \ | ||
../src/qt/editaddressdialog.cpp \ | ||
../src/qt/bitcoinaddressvalidator.cpp \ | ||
../src/qt/clientmodel.cpp \ | ||
../src/qt/guiutil.cpp \ | ||
../src/qt/transactionrecord.cpp \ | ||
../src/qt/optionsmodel.cpp \ | ||
../src/qt/monitoreddatamapper.cpp \ | ||
../src/qt/transactiondesc.cpp \ | ||
../src/qt/transactiondescdialog.cpp \ | ||
../src/qt/bitcoinstrings.cpp \ | ||
../src/qt/bitcoinamountfield.cpp \ | ||
../src/qt/transactionfilterproxy.cpp \ | ||
../src/qt/transactionview.cpp \ | ||
../src/qt/walletmodel.cpp \ | ||
../src/qt/overviewpage.cpp \ | ||
../src/qt/csvmodelwriter.cpp \ | ||
../src/qt/sendcoinsentry.cpp \ | ||
../src/qt/qvalidatedlineedit.cpp \ | ||
../src/qt/bitcoinunits.cpp \ | ||
../src/qt/qvaluecombobox.cpp \ | ||
../src/qt/askpassphrasedialog.cpp \ | ||
../src/qt/notificator.cpp \ | ||
../src/qt/paymentserver.cpp \ | ||
../src/qt/rpcconsole.cpp | ||
|
||
RESOURCES += ../src/qt/bitcoin.qrc | ||
|
||
FORMS += \ | ||
../src/qt/forms/sendcoinsdialog.ui \ | ||
../src/qt/forms/addressbookpage.ui \ | ||
../src/qt/forms/signverifymessagedialog.ui \ | ||
../src/qt/forms/aboutdialog.ui \ | ||
../src/qt/forms/editaddressdialog.ui \ | ||
../src/qt/forms/transactiondescdialog.ui \ | ||
../src/qt/forms/overviewpage.ui \ | ||
../src/qt/forms/sendcoinsentry.ui \ | ||
../src/qt/forms/askpassphrasedialog.ui \ | ||
../src/qt/forms/rpcconsole.ui \ | ||
../src/qt/forms/optionsdialog.ui | ||
|
||
contains(USE_QRCODE, 1) { | ||
HEADERS += ../src/qt/qrcodedialog.h | ||
SOURCES += ../src/qt/qrcodedialog.cpp | ||
FORMS += ../src/qt/forms/qrcodedialog.ui | ||
} | ||
|
||
contains(BITCOIN_QT_TEST, 1) { | ||
SOURCES += ../src/qt/test/test_main.cpp \ | ||
../src/qt/test/uritests.cpp | ||
HEADERS += ../src/qt/test/uritests.h | ||
DEPENDPATH += ../src/qt/test | ||
QT += testlib | ||
TARGET = bitcoin-qt_test | ||
DEFINES += BITCOIN_QT_TEST | ||
macx: CONFIG -= app_bundle | ||
} | ||
|
||
CODECFORTR = UTF-8 | ||
|
||
# for lrelease/lupdate | ||
# also add new translations to src/qt/bitcoin.qrc under translations/ | ||
TRANSLATIONS = $$files(../src/qt/locale/bitcoin_*.ts) | ||
|
||
isEmpty(QMAKE_LRELEASE) { | ||
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe | ||
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease | ||
} | ||
isEmpty(QM_DIR):QM_DIR = $$PWD/../src/qt/locale | ||
# automatically build translations, so they can be included in resource file | ||
TSQM.name = lrelease ${QMAKE_FILE_IN} | ||
TSQM.input = TRANSLATIONS | ||
TSQM.output = $$QM_DIR/${QMAKE_FILE_BASE}.qm | ||
TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} | ||
TSQM.CONFIG = no_link | ||
QMAKE_EXTRA_COMPILERS += TSQM | ||
|
||
# "Other files" to show in Qt Creator | ||
# OTHER_FILES += \ | ||
# doc/*.rst doc/*.txt doc/README README.md res/bitcoin-qt.rc src/test/*.cpp src/test/*.h src/qt/test/*.cpp src/qt/test/*.h | ||
|
||
# platform specific defaults, if not overridden on command line | ||
isEmpty(BOOST_LIB_SUFFIX) { | ||
macx:BOOST_LIB_SUFFIX = -mt | ||
win32:BOOST_LIB_SUFFIX = -mgw46-mt-1_50 | ||
} | ||
|
||
isEmpty(BOOST_THREAD_LIB_SUFFIX) { | ||
BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX | ||
} | ||
|
||
isEmpty(BDB_LIB_PATH) { | ||
macx:BDB_LIB_PATH = /opt/local/lib/db48 | ||
} | ||
|
||
isEmpty(BDB_LIB_SUFFIX) { | ||
macx:BDB_LIB_SUFFIX = -4.8 | ||
} | ||
|
||
isEmpty(BDB_INCLUDE_PATH) { | ||
macx:BDB_INCLUDE_PATH = /opt/local/include/db48 | ||
} | ||
|
||
isEmpty(BOOST_LIB_PATH) { | ||
macx:BOOST_LIB_PATH = /opt/local/lib | ||
} | ||
|
||
isEmpty(BOOST_INCLUDE_PATH) { | ||
macx:BOOST_INCLUDE_PATH = /opt/local/include | ||
} | ||
|
||
win32:DEFINES += WIN32 __WXMSW__ __NO_SYSTEM_INCLUDES | ||
win32:RC_FILE = ../src/qt/res/bitcoin-qt.rc | ||
|
||
win32:!contains(MINGW_THREAD_BUGFIX, 0) { | ||
# At least qmake's win32-g++-cross profile is missing the -lmingwthrd | ||
# thread-safety flag. GCC has -mthreads to enable this, but it doesn't | ||
# work with static linking. -lmingwthrd must come BEFORE -lmingw, so | ||
# it is prepended to QMAKE_LIBS_QT_ENTRY. | ||
# It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes | ||
# any problems on some untested qmake profile now or in the future. | ||
DEFINES += _MT | ||
QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY | ||
} | ||
|
||
!win32:!macx { | ||
DEFINES += LINUX | ||
LIBS += -lrt | ||
# _FILE_OFFSET_BITS=64 lets 32-bit fopen transparently support large files. | ||
DEFINES += _FILE_OFFSET_BITS=64 | ||
} | ||
|
||
macx:HEADERS += ../src/qt/macdockiconhandler.h | ||
macx:OBJECTIVE_SOURCES += ../src/qt/macdockiconhandler.mm | ||
macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit | ||
macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 | ||
macx:ICON = src/qt/res/icons/bitcoin.icns | ||
macx:QMAKE_CFLAGS_THREAD += -pthread | ||
macx:QMAKE_LFLAGS_THREAD += -pthread | ||
macx:QMAKE_CXXFLAGS_THREAD += -pthread | ||
macx:QMAKE_INFO_PLIST = share/qt/Info.plist | ||
|
||
# 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,) | ||
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX | ||
# -lgdi32 has to happen after -lcrypto (see #681) | ||
win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 | ||
LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX | ||
win32:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX | ||
|
||
contains(RELEASE, 1) { | ||
!win32:!macx { | ||
# Linux: turn dynamic linking back on for c/c++ runtime libraries | ||
LIBS += -Wl,-Bdynamic | ||
} | ||
} | ||
|
||
system($$QMAKE_LRELEASE $$_PRO_FILE_) |
Oops, something went wrong.