@@ -1,7 +1,46 @@ | |||
*.tar.gz | |||
*.exe | |||
src/*.exe | |||
src/*/*.exe | |||
src/bitcoin | |||
src/bitcoind | |||
src/test_bitcoin | |||
src/test/test_bitcoin | |||
src/qt/test/test_bitcoin-qt | |||
Makefile.in | |||
aclocal.m4 | |||
autom4te.cache/ | |||
config.log | |||
config.status | |||
configure | |||
src/.deps/ | |||
src/Makefile.in | |||
src/bitcoin-config.h | |||
src/bitcoin-config.h.in | |||
src/build-aux/ | |||
src/qt/Makefile.in | |||
src/stamp-h1 | |||
share/setup.nsi | |||
share/qt/Info.plist | |||
src/leveldb/.deps/ | |||
src/test/.deps | |||
src/test/.dirstamp | |||
src/qt/.deps/ | |||
src/qt/.dirstamp | |||
src/qt/*.moc | |||
src/qt/moc_*.cpp | |||
src/qt/forms/ui_*.h | |||
src/qt/test/.deps/ | |||
src/qt/test/.dirstamp | |||
src/qt/test/moc*.cpp | |||
src/qt/res/.deps/ | |||
src/qt/res/.dirstamp | |||
.*.swp | |||
*.*~* | |||
*.bak | |||
@@ -10,6 +49,13 @@ src/test_bitcoin | |||
*.o | |||
*.patch | |||
.bitcoin | |||
*.a | |||
*.pb.cc | |||
*.pb.h | |||
*.log | |||
*.trs | |||
*.dmg | |||
# Compilation and Qt preprocessor part | |||
*.qm | |||
@@ -31,4 +77,18 @@ qrc_*.cpp | |||
.DS_Store | |||
build | |||
#lcov | |||
*.gcno | |||
/*.info | |||
test_bitcoin.coverage/ | |||
total.coverage/ | |||
coverage_percent.txt | |||
#build tests | |||
linux-coverage-build | |||
linux-build | |||
win32-build | |||
qa/pull-tester/run-bitcoind-for-test.sh | |||
qa/pull-tester/build-tests.sh | |||
!src/leveldb-*/Makefile |
@@ -0,0 +1,159 @@ | |||
ACLOCAL_AMFLAGS = -I src/m4 | |||
SUBDIRS = src | |||
.PHONY: deploy | |||
GZIP_ENV="-9n" | |||
BITCOIND_BIN=$(top_builddir)/src/bitcoind$(EXEEXT) | |||
BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT) | |||
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win32-setup$(EXEEXT) | |||
OSX_APP=Bitcoin-Qt.app | |||
OSX_DMG=Bitcoin-Qt.dmg | |||
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus | |||
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist | |||
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns | |||
OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed | |||
WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \ | |||
$(top_srcdir)/share/pixmaps/nsis-header.bmp \ | |||
$(top_srcdir)/share/pixmaps/nsis-wizard.bmp \ | |||
$(top_srcdir)/doc/README_windows.txt | |||
OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \ | |||
$(top_srcdir)/contrib/macdeploy/background.png | |||
COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \ | |||
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \ | |||
baseline_filtered.info block_test_filtered.info \ | |||
leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info | |||
dist-hook: | |||
-$(MAKE) -C $(top_distdir)/src/leveldb clean | |||
-$(GIT) archive --format=tar HEAD -- src/version.cpp | $(AMTAR) -C $(top_distdir) -xf - | |||
distcheck-hook: | |||
$(MKDIR_P) $(top_distdir)/_build/src/leveldb | |||
cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/ | |||
-$(MAKE) -C $(top_distdir)/_build/src/leveldb clean | |||
distcleancheck: | |||
@: | |||
$(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) | |||
$(MAKE) distdir | |||
$(MKDIR_P) $(top_builddir)/release | |||
$(INSTALL_STRIP_PROGRAM) $(top_builddir)/src/bitcoind$(EXEEXT) $(top_builddir)/release | |||
$(INSTALL_STRIP_PROGRAM) $(top_builddir)/src/qt/bitcoin-qt$(EXEEXT) $(top_builddir)/release | |||
@test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \ | |||
echo error: could not build $@ | |||
$(BITCOIND_BIN): | |||
make -C $(top_srcdir)/src bitcoind$(EXEEXT) | |||
$(BITCOIN_QT_BIN): | |||
make -C $(top_srcdir)/src/qt bitcoin-qt$(EXEEXT) | |||
$(OSX_APP)/Contents/PkgInfo: | |||
$(MKDIR_P) $(@D) | |||
@echo "APPL????" > $@ | |||
$(OSX_APP)/Contents/Resources/empty.lproj: | |||
$(MKDIR_P) $(@D) | |||
@touch $@ | |||
$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST) | |||
$(MKDIR_P) $(@D) | |||
$(INSTALL) $< $@ | |||
$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS) | |||
$(MKDIR_P) $(@D) | |||
$(INSTALL) $< $@ | |||
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN) | |||
$(MKDIR_P) $(@D) | |||
$(INSTALL_STRIP_PROGRAM) $< $@ | |||
OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \ | |||
$(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \ | |||
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt | |||
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) | |||
$(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 | |||
rm -rf $(OSX_APP) | |||
if TARGET_DARWIN | |||
deploy: $(OSX_DMG) | |||
endif | |||
if TARGET_WINDOWS | |||
deploy: $(BITCOIN_WIN_INSTALLER) | |||
endif | |||
if USE_LCOV | |||
baseline.info: | |||
$(LCOV) -c -i -d $(abs_builddir)/src -o $@ | |||
baseline_filtered.info: baseline.info | |||
$(LCOV) -r $< "/usr/include/*" -o $@ | |||
leveldb_baseline.info: baseline_filtered.info | |||
$(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@ | |||
leveldb_baseline_filtered.info: leveldb_baseline.info | |||
$(LCOV) -r $< "/usr/include/*" -o $@ | |||
baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info | |||
$(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@ | |||
test_bitcoin.info: baseline_filtered_combined.info | |||
$(MAKE) -C src/ check | |||
$(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@ | |||
$(LCOV) -z -d $(abs_builddir)/src | |||
$(LCOV) -z -d $(abs_builddir)/src/leveldb | |||
test_bitcoin_filtered.info: test_bitcoin.info | |||
$(LCOV) -r $< "/usr/include/*" -o $@ | |||
block_test.info: test_bitcoin_filtered.info | |||
-@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -Xmx2G -jar $(JAVA_COMPARISON_TOOL) 1 18444 | |||
$(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@ | |||
$(LCOV) -z -d $(abs_builddir)/src | |||
$(LCOV) -z -d $(abs_builddir)/src/leveldb | |||
block_test_filtered.info: block_test.info | |||
$(LCOV) -r $< "/usr/include/*" -o $@ | |||
test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info | |||
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@ | |||
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info | |||
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt | |||
test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info | |||
$(GENHTML) -s $< -o $(@D) | |||
@touch $@ | |||
total.coverage/.dirstamp: total_coverage.info | |||
$(GENHTML) -s $< -o $(@D) | |||
@touch $@ | |||
cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp | |||
endif | |||
if USE_COMPARISON_TOOL | |||
check-local: | |||
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -Xmx2G -jar $(JAVA_COMPARISON_TOOL) 1 18444 | |||
endif | |||
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh $(WINDOWS_PACKAGING) $(OSX_PACKAGING) | |||
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER) | |||
.INTERMEDIATE: $(OSX_APP_BUILT) $(COVERAGE_INFO) | |||
clean-local: | |||
rm -rf test_bitcoin.coverage/ total.coverage/ |
@@ -58,15 +58,8 @@ lots of money. | |||
Developers are strongly encouraged to write unit tests for new code, and to | |||
submit new unit tests for old code. | |||
Unit tests for the core code are in `src/test/`. To compile and run them: | |||
cd src; make -f makefile.unix test | |||
Unit tests for the GUI code are in `src/qt/test/`. To compile and run them: | |||
qmake BITCOIN_QT_TEST=1 -o Makefile.test bitcoin-qt.pro | |||
make -f Makefile.test | |||
./bitcoin-qt_test | |||
Unit tests can be compiled and run (assuming they weren't disabled in configure) with: | |||
make check | |||
Every pull request is built for both Windows and Linux on a dedicated server, | |||
and unit and sanity tests are automatically run. The binaries produced may be |
@@ -0,0 +1 @@ | |||
autoreconf -vif |
@@ -1,453 +0,0 @@ | |||
TEMPLATE = app | |||
TARGET = bitcoin-qt | |||
macx:TARGET = "Bitcoin-Qt" | |||
VERSION = 0.8.2 | |||
INCLUDEPATH += src src/json src/qt | |||
QT += core gui network | |||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | |||
DEFINES += BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE | |||
CONFIG += no_include_pwd | |||
CONFIG += thread | |||
# 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 OPENSSL_LIB_PATH | |||
# PROTOBUF_INCLUDE_PATH PROTOBUF_LIB_PATH | |||
# PROTOC : protocol buffer compiler tool | |||
OBJECTS_DIR = build | |||
MOC_DIR = build | |||
UI_DIR = build | |||
PROTO_DIR = build | |||
PROTO_PATH = src/qt | |||
contains(BITCOIN_QT_TEST, 1) { | |||
OBJECTS_DIR = build_test | |||
MOC_DIR = build_test | |||
UI_DIR = build_test | |||
PROTO_DIR = build_test | |||
SOURCES += src/qt/test/test_main.cpp \ | |||
src/qt/test/uritests.cpp \ | |||
src/qt/test/paymentservertests.cpp | |||
HEADERS += src/qt/test/uritests.h \ | |||
src/qt/test/paymentservertests.h | |||
DEPENDPATH += src/qt/test | |||
QT += testlib | |||
TARGET = bitcoin-qt_test | |||
DEFINES += BITCOIN_QT_TEST | |||
macx: CONFIG -= app_bundle | |||
} | |||
# 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 | |||
} | |||
# 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 | |||
} | |||
INCLUDEPATH += src/leveldb/include src/leveldb/helpers | |||
LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a | |||
!win32 { | |||
# we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences | |||
genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a | |||
} else { | |||
# make an educated guess about what the ranlib command is called | |||
isEmpty(QMAKE_RANLIB) { | |||
QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib) | |||
} | |||
LIBS += -lshlwapi | |||
genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a | |||
} | |||
genleveldb.target = $$PWD/src/leveldb/libleveldb.a | |||
genleveldb.depends = FORCE | |||
PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a | |||
QMAKE_EXTRA_TARGETS += genleveldb | |||
# Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it. | |||
QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean | |||
# regenerate build.h | |||
!win32|contains(USE_BUILD_INFO, 1) { | |||
genbuild.depends = FORCE | |||
genbuild.commands = cd $$PWD; /bin/sh share/genbuild.sh $$OBJECTS_DIR/build.h | |||
genbuild.target = $$OBJECTS_DIR/build.h | |||
PRE_TARGETDEPS += $$OBJECTS_DIR/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/qt | |||
HEADERS += 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/alert.h \ | |||
src/addrman.h \ | |||
src/base58.h \ | |||
src/bignum.h \ | |||
src/chainparams.h \ | |||
src/checkpoints.h \ | |||
src/compat.h \ | |||
src/sync.h \ | |||
src/util.h \ | |||
src/hash.h \ | |||
src/uint256.h \ | |||
src/serialize.h \ | |||
src/core.h \ | |||
src/main.h \ | |||
src/miner.h \ | |||
src/net.h \ | |||
src/key.h \ | |||
src/db.h \ | |||
src/walletdb.h \ | |||
src/script.h \ | |||
src/init.h \ | |||
src/bloom.h \ | |||
src/mruset.h \ | |||
src/checkqueue.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 \ | |||
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/wallet.h \ | |||
src/keystore.h \ | |||
src/qt/transactionfilterproxy.h \ | |||
src/qt/transactionview.h \ | |||
src/qt/walletmodel.h \ | |||
src/qt/walletview.h \ | |||
src/qt/walletstack.h \ | |||
src/qt/walletframe.h \ | |||
src/bitcoinrpc.h \ | |||
src/qt/overviewpage.h \ | |||
src/qt/csvmodelwriter.h \ | |||
src/crypter.h \ | |||
src/qt/sendcoinsentry.h \ | |||
src/qt/qvalidatedlineedit.h \ | |||
src/qt/bitcoinunits.h \ | |||
src/qt/qvaluecombobox.h \ | |||
src/qt/askpassphrasedialog.h \ | |||
src/protocol.h \ | |||
src/qt/notificator.h \ | |||
src/qt/paymentrequestplus.h \ | |||
src/qt/paymentserver.h \ | |||
src/allocators.h \ | |||
src/ui_interface.h \ | |||
src/qt/rpcconsole.h \ | |||
src/version.h \ | |||
src/netbase.h \ | |||
src/clientversion.h \ | |||
src/txdb.h \ | |||
src/leveldb.h \ | |||
src/threadsafety.h \ | |||
src/limitedmap.h \ | |||
src/qt/splashscreen.h \ | |||
src/qt/intro.h \ | |||
src/qt/walletmodeltransaction.h | |||
SOURCES += 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/alert.cpp \ | |||
src/chainparams.cpp \ | |||
src/version.cpp \ | |||
src/sync.cpp \ | |||
src/util.cpp \ | |||
src/hash.cpp \ | |||
src/netbase.cpp \ | |||
src/key.cpp \ | |||
src/script.cpp \ | |||
src/core.cpp \ | |||
src/main.cpp \ | |||
src/init.cpp \ | |||
src/miner.cpp \ | |||
src/net.cpp \ | |||
src/bloom.cpp \ | |||
src/checkpoints.cpp \ | |||
src/addrman.cpp \ | |||
src/db.cpp \ | |||
src/walletdb.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/wallet.cpp \ | |||
src/keystore.cpp \ | |||
src/qt/transactionfilterproxy.cpp \ | |||
src/qt/transactionview.cpp \ | |||
src/qt/walletmodel.cpp \ | |||
src/qt/walletview.cpp \ | |||
src/qt/walletstack.cpp \ | |||
src/qt/walletframe.cpp \ | |||
src/bitcoinrpc.cpp \ | |||
src/rpcdump.cpp \ | |||
src/rpcnet.cpp \ | |||
src/rpcmining.cpp \ | |||
src/rpcwallet.cpp \ | |||
src/rpcblockchain.cpp \ | |||
src/rpcrawtransaction.cpp \ | |||
src/qt/overviewpage.cpp \ | |||
src/qt/csvmodelwriter.cpp \ | |||
src/crypter.cpp \ | |||
src/qt/sendcoinsentry.cpp \ | |||
src/qt/qvalidatedlineedit.cpp \ | |||
src/qt/bitcoinunits.cpp \ | |||
src/qt/qvaluecombobox.cpp \ | |||
src/qt/askpassphrasedialog.cpp \ | |||
src/protocol.cpp \ | |||
src/qt/notificator.cpp \ | |||
src/qt/paymentrequestplus.cpp \ | |||
src/qt/paymentserver.cpp \ | |||
src/qt/rpcconsole.cpp \ | |||
src/noui.cpp \ | |||
src/leveldb.cpp \ | |||
src/txdb.cpp \ | |||
src/qt/splashscreen.cpp \ | |||
src/qt/intro.cpp \ | |||
src/qt/walletmodeltransaction.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 \ | |||
src/qt/forms/intro.ui | |||
PROTOS = src/qt/paymentrequest.proto | |||
include(share/qt/protobuf.pri) | |||
contains(USE_QRCODE, 1) { | |||
HEADERS += src/qt/qrcodedialog.h | |||
SOURCES += src/qt/qrcodedialog.cpp | |||
FORMS += src/qt/forms/qrcodedialog.ui | |||
} | |||
# Todo: Remove this line when switching to Qt5, as that option was removed | |||
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 += README.md \ | |||
doc/*.txt \ | |||
doc/*.md \ | |||
src/bitcoind.cpp \ | |||
src/qt/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 = -mgw44-mt-s-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 | |||
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 src/qt/macnotificationhandler.h | |||
macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm src/qt/macnotificationhandler.mm | |||
macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit -framework CoreServices | |||
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 $$PROTOBUF_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH | |||
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(PROTOBUF_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,) | |||
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX -lprotobuf | |||
# -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 | |||
macx: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 -silent $$TRANSLATIONS) |
@@ -0,0 +1,714 @@ | |||
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) | |||
AC_PREREQ([2.60]) | |||
define(_CLIENT_VERSION_MAJOR, 0) | |||
define(_CLIENT_VERSION_MINOR, 8) | |||
define(_CLIENT_VERSION_REVISION, 99) | |||
define(_CLIENT_VERSION_BUILD, 0) | |||
define(_CLIENT_VERSION_IS_RELEASE, false) | |||
define(_COPYRIGHT_YEAR, 2013) | |||
AC_INIT([Bitcoin],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin]) | |||
AC_CONFIG_AUX_DIR([src/build-aux]) | |||
AC_CONFIG_MACRO_DIR([src/m4]) | |||
AC_CANONICAL_HOST | |||
AH_TOP([#ifndef BITCOIN_CONFIG_H]) | |||
AH_TOP([#define BITCOIN_CONFIG_H]) | |||
AH_BOTTOM([#endif //BITCOIN_CONFIG_H]) | |||
# This m4 will only be used if a system copy cannot be found. This is helpful | |||
# on systems where autotools are installed but the pkg-config macros are not in | |||
# a default location. It is currently used for building on OSX where autotools | |||
# are preinstalled but pkg-config comes from macports or homebrew. It should | |||
# probably be removed when building on <= 10.6 is no longer supported. | |||
m4_include([pkg.m4]) | |||
dnl reset CXXFLAGS if empty (autoconf adds its own defaults otherwise) | |||
: ${CFLAGS=""} | |||
: ${CXXFLAGS=""} | |||
dnl faketime breaks configure and is only needed for make. Disable it here. | |||
unset FAKETIME | |||
dnl ============================================================== | |||
dnl Setup for automake | |||
dnl ============================================================== | |||
AM_INIT_AUTOMAKE([no-define subdir-objects foreign]) | |||
dnl faketime messes with timestamps and causes configure to be re-run. | |||
dnl --disable-maintainer-mode can be used to bypass this. | |||
AM_MAINTAINER_MODE([enable]) | |||
dnl make the compilation flags quiet unless V=1 is used | |||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | |||
AC_ARG_WITH([miniupnpc], | |||
[AS_HELP_STRING([--with-miniupnpc], | |||
[enable UPNP (default is yes if libminiupnpc is found)])], | |||
[use_upnp=$withval], | |||
[use_upnp=auto]) | |||
AC_ARG_ENABLE([upnp-default], | |||
[AS_HELP_STRING([--enable-upnp-default], | |||
[if UPNP is enabled, turn it on at startup (default is no)])], | |||
[use_upnp_default=$enableval], | |||
[use_upnp_default=no]) | |||
dnl enable ipv6 support | |||
AC_ARG_ENABLE([ipv6], | |||
[AS_HELP_STRING([--enable-ipv6], | |||
[enable ipv6 (default is yes)])], | |||
[use_ipv6=$enableval], | |||
[use_ipv6=yes]) | |||
dnl enable qt support | |||
AC_ARG_WITH([qt], | |||
[AS_HELP_STRING([--with-qt], | |||
[enable qt (default is yes)])], | |||
[use_qt=$withval], | |||
[use_qt=yes]) | |||
dnl compile with full warnings and debugging symbols | |||
AC_ARG_ENABLE(debug, | |||
AS_HELP_STRING([--enable-debug],[compile with debug symbols (default is yes)]), | |||
[use_debug=$enableval], | |||
[use_debug=yes]) | |||
AC_MSG_CHECKING([if compiling with debugging symbols]) | |||
AC_ARG_ENABLE(tests, | |||
AS_HELP_STRING([--enable-tests],[compile tests (default is yes)]), | |||
[use_tests=$enableval], | |||
[use_tests=yes]) | |||
AC_ARG_WITH([comparison-tool], | |||
AS_HELP_STRING([with-comparison-tool],[path to java comparison tool (requires --enable-tests)]), | |||
[use_comparison_tool=$withval], | |||
[use_comparison_tool=no]) | |||
AC_ARG_WITH([qrencode], | |||
[AS_HELP_STRING([--with-qrencode], | |||
[enable QR code support (default is yes if qt is enabled and libqrencode is found)])], | |||
[use_qr=$withval], | |||
[use_qr=auto]) | |||
AC_ARG_WITH([qtdbus], | |||
[AS_HELP_STRING([--with-qtdbus], | |||
[enable DBus support (default is yes if qt is enabled and QtDBus is found)])], | |||
[use_dbus=$withval], | |||
[use_dbus=auto]) | |||
AC_ARG_ENABLE([hardening], | |||
[AS_HELP_STRING([--enable-hardening], | |||
[attempt to harden the resulting executables (default is yes)])], | |||
[use_hardening=$enableval], | |||
[use_hardening=yes]) | |||
AC_ARG_ENABLE([ccache], | |||
[AS_HELP_STRING([--enable-ccache], | |||
[enable building with ccache (default is yes if ccache is found)])], | |||
[use_ccache=$enableval], | |||
[use_ccache=auto]) | |||
AC_ARG_ENABLE([lcov], | |||
[AS_HELP_STRING([--enable-lcov], | |||
[enable lcov testing (default is no)])], | |||
[use_lcov=yes], | |||
[use_lcov=no]) | |||
AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], []) | |||
AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], []) | |||
AC_ARG_WITH([qt-bindir],[AS_HELP_STRING([--with-qt-bindir=BIN_DIR],[specify qt bin path])], [qt_bin_path=$withval], []) | |||
AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], []) | |||
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], []) | |||
AC_CONFIG_SRCDIR([src]) | |||
AC_CONFIG_HEADERS([src/bitcoin-config.h]) | |||
dnl Checks for programs. | |||
AC_PROG_CXX | |||
AC_PROG_CC | |||
AC_PROG_CPP | |||
AC_PROG_INSTALL | |||
AC_PROG_OBJC | |||
m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX]) | |||
AC_PROG_MKDIR_P | |||
AC_PROG_SED | |||
AC_PATH_TOOL(AR, ar) | |||
AC_PATH_TOOL(RANLIB, ranlib) | |||
AC_PATH_TOOL(WINDRES, windres) | |||
AC_PATH_TOOL(STRIP, strip) | |||
AC_PATH_TOOL(GCOV, gcov) | |||
AC_PATH_PROG(LCOV, lcov) | |||
AC_PATH_PROG(JAVA, java) | |||
AC_PATH_PROG(GENHTML, genhtml) | |||
AC_PATH_PROG([GIT], [git]) | |||
AC_PATH_PROGS([MOC], [moc moc-qt4],, $qt_bin_path:$PATH) | |||
AC_PATH_PROGS([UIC], [uic uic-qt4],, $qt_bin_path:$PATH) | |||
AC_PATH_PROG([RCC], [rcc],, $qt_bin_path:$PATH) | |||
AC_PATH_PROG([LRELEASE], [lrelease],, $qt_bin_path:$PATH) | |||
AC_PATH_PROG([PROTOC], [protoc],, $protoc_bin_path:$PATH) | |||
AC_PATH_PROG(CCACHE,ccache) | |||
PKG_PROG_PKG_CONFIG | |||
## TODO: Remove these hard-coded paths and flags. They are here for the sake of | |||
## compatibility with the legacy buildsystem. | |||
## | |||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter" | |||
CPPFLAGS="$CPPFLAGS -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO" | |||
DEBUG_CXXFLAGS="-g -ggdb" | |||
RELEASE_CXXFLAGS="-O2" | |||
AC_LANG_PUSH([C++]) | |||
use_pkgconfig=yes | |||
case $host in | |||
*mingw*) | |||
#pkgconfig does more harm than good with mingw | |||
use_pkgconfig=no | |||
TARGET_OS=windows | |||
AC_CHECK_LIB([mingwthrd], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([kernel32], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([user32], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([gdi32], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([comdlg32], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([winspool], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([winmm], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([shell32], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([comctl32], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([ole32], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([oleaut32], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([uuid], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([rpcrt4], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([advapi32], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([ws2_32], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([mswsock], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([shlwapi], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_CHECK_LIB([iphlpapi], [main],, AC_MSG_ERROR(lib missing)) | |||
AC_PATH_PROG([MAKENSIS], [makensis], none) | |||
if test x$MAKENSIS = xnone; then | |||
AC_MSG_WARN("makensis not found. Cannot create installer.") | |||
fi | |||
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB" | |||
LEVELDB_TARGET_FLAGS="TARGET_OS=OS_WINDOWS_CROSSCOMPILE" | |||
CXXFLAGS="$CXXFLAGS -w" | |||
;; | |||
*darwin*) | |||
TARGET_OS=darwin | |||
LEVELDB_TARGET_FLAGS="TARGET_OS=Darwin" | |||
if test x$cross_compiling != xyes; then | |||
AC_CHECK_PROG([PORT],port, port) | |||
if test x$PORT = xport; then | |||
dnl add default macports paths | |||
CPPFLAGS="$CPPFLAGS -I/opt/local/include -I/opt/local/include/db48" | |||
LIBS="$LIBS -L/opt/local/lib -L/opt/local/lib/db48" | |||
fi | |||
AC_CHECK_PROG([BREW],brew, brew) | |||
if test x$BREW = xbrew; then | |||
dnl add default homebrew paths | |||
openssl_prefix=`$BREW --prefix openssl` | |||
bdb_prefix=`$BREW --prefix berkeley-db4` | |||
export PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" | |||
CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include" | |||
LIBS="$LIBS -L/$bdb_prefix/lib" | |||
fi | |||
fi | |||
if test x$use_qt = xyes; then | |||
MOC_DEFS="-DQ_OS_MAC" | |||
base_frameworks="-framework Foundation -framework ApplicationServices -framework AppKit" | |||
AX_CHECK_LINK_FLAG([[$base_frameworks]],[LIBS="$LIBS $base_frameworks"],[AC_MSG_ERROR(could not find base frameworks)]) | |||
fi | |||
AX_CHECK_COMPILE_FLAG([-mmacosx-version-min=10.5],[RELEASE_CXXFLAGS="$RELEASE_CXXFLAGS -mmacosx-version-min=10.5"]) | |||
AX_CHECK_COMPILE_FLAG([-arch i386],[RELEASE_CXXFLAGS="$RELEASE_CXXFLAGS -arch i386"]) | |||
RELEASE_CXXFLAGS="$RELEASE_CXXFLAGS -O3" | |||
CPPFLAGS="$CPPFLAGS -DMAC_OSX" | |||
TESTDEFS="-DBOOST_TEST_DYN_LINK" | |||
;; | |||
*) | |||
TESTDEFS="-DBOOST_TEST_DYN_LINK" | |||
;; | |||
esac | |||
if test x$use_debug == xyes; then | |||
CXXFLAGS="$DEBUG_CXXFLAGS $CXXFLAGS" | |||
else | |||
CXXFLAGS="$RELEASE_CXXFLAGS $CXXFLAGS" | |||
fi | |||
if test x$use_comparison_tool != xno; then | |||
AC_SUBST(JAVA_COMPARISON_TOOL, $use_comparison_tool) | |||
fi | |||
if test x$use_lcov == xyes; then | |||
if test x$LCOV == x; then | |||
AC_MSG_ERROR("lcov testing requested but lcov not found") | |||
fi | |||
if test x$GCOV == x; then | |||
AC_MSG_ERROR("lcov testing requested but gcov not found") | |||
fi | |||
if test x$JAVA == x; then | |||
AC_MSG_ERROR("lcov testing requested but java not found") | |||
fi | |||
if test x$GENHTML == x; then | |||
AC_MSG_ERROR("lcov testing requested but genhtml not found") | |||
fi | |||
if test x$use_comparison_tool == x; then | |||
AC_MSG_ERROR("lcov testing requested but comparison tool was not specified") | |||
fi | |||
LCOV="$LCOV --gcov-tool=$GCOV" | |||
AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"], | |||
[AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")]) | |||
fi | |||
dnl Require little endian | |||
AC_C_BIGENDIAN([AC_MSG_ERROR("Big Endian not supported")]) | |||
dnl Check for pthread compile/link requirements | |||
AX_PTHREAD | |||
INCLUDES="$INCLUDES $PTHREAD_CFLAGS" | |||
# The following macro will add the necessary defines to bitcoin-config.h, but | |||
# they also need to be passed down to any subprojects. Pull the results out of | |||
# the cache and add them to CPPFLAGS. | |||
AC_SYS_LARGEFILE | |||
if test x$ac_cv_sys_file_offset_bits != x && | |||
test x$ac_cv_sys_file_offset_bits != xno && | |||
test x$ac_cv_sys_file_offset_bits != xunknown; then | |||
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" | |||
fi | |||
if test x$ac_cv_sys_large_files != x && | |||
test x$ac_cv_sys_large_files != xno && | |||
test x$ac_cv_sys_large_files != xunknown; then | |||
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files" | |||
fi | |||
AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"]) | |||
if test x$use_hardening != xno; then | |||
AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"]) | |||
AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"]) | |||
AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=2"]) | |||
AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"]) | |||
AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"]) | |||
AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [LDFLAGS="-Wl,-z,relro"]) | |||
AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [LDFLAGS="-Wl,-z,now"]) | |||
if test x$TARGET_OS != xwindows; then | |||
# -fstack-protector-all can produce broken binaries with mingw | |||
AX_CHECK_COMPILE_FLAG([-fno-stack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fno-stack-protector"]) | |||
AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"]) | |||
# -pie will link successfully with mingw, but it's unsupported and leads to undeterministic binaries | |||
AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"]) | |||
fi | |||
CXXFLAGS="$CXXFLAGS $HARDENED_CXXFLAGS" | |||
CPPFLAGS="$CPPFLAGS $HARDENED_CPPFLAGS" | |||
LDFLAGS="$LDFLAGS $HARDENED_LDFLAGS" | |||
OBJCXXFLAGS="$CXXFLAGS" | |||
fi | |||
dnl this flag screws up non-darwin gcc even when the check fails. special-case it. | |||
if test x$TARGET_OS = xdarwin; then | |||
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"]) | |||
fi | |||
AC_CHECK_HEADERS([stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h]) | |||
dnl Check for MSG_NOSIGNAL | |||
AC_MSG_CHECKING(for MSG_NOSIGNAL) | |||
AC_TRY_COMPILE([#include <sys/socket.h>], | |||
[ int f = MSG_NOSIGNAL; ], | |||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,[Define this symbol if you have MSG_NOSIGNAL]) ], | |||
[ AC_MSG_RESULT(no)] | |||
) | |||
dnl Check for libdb_cxx | |||
AC_CHECK_HEADER([db_cxx.h],,AC_MSG_ERROR(libdb_cxx headers missing)) | |||
AC_CHECK_LIB([db_cxx], [main],, AC_MSG_ERROR(libdb_cxx missing)) | |||
dnl Check for libminiupnpc (optional) | |||
if test x$use_upnp != xno; then | |||
AC_CHECK_LIB([miniupnpc], [main],, [have_miniupnpc=no]) | |||
fi | |||
dnl Check for boost libs | |||
AX_BOOST_BASE | |||
AX_BOOST_SYSTEM | |||
AX_BOOST_FILESYSTEM | |||
AX_BOOST_PROGRAM_OPTIONS | |||
AX_BOOST_THREAD | |||
AX_BOOST_CHRONO | |||
if test x$use_tests = xyes; then | |||
AX_BOOST_UNIT_TEST_FRAMEWORK | |||
fi | |||
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB" | |||
BOOST_INCLUDES="$BOOST_CPPFLAGS" | |||
dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however | |||
dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if | |||
dnl a working version is available, else fall back to sleep. sleep was removed | |||
dnl after 1.56. | |||
dnl If neither is available, abort. | |||
dnl If sleep_for is used, boost_chrono becomes a requirement. | |||
if test x$ax_cv_boost_chrono = xyes; then | |||
TEMP_LIBS="$LIBS" | |||
LIBS="$LIBS $BOOST_LIBS $BOOST_CHRONO_LIB" | |||
AC_TRY_LINK([ | |||
#include <boost/thread/thread.hpp> | |||
#include <boost/version.hpp> | |||
],[ | |||
#if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200) | |||
boost::this_thread::sleep_for(boost::chrono::milliseconds(0)); | |||
#else | |||
choke me | |||
#endif | |||
], | |||
[boost_sleep=yes; BOOST_LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB"; | |||
AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])], | |||
[boost_sleep=no]) | |||
LIBS="$TEMP_LIBS" | |||
fi | |||
if test x$boost_sleep != xyes; then | |||
TEMP_LIBS="$LIBS" | |||
LIBS="$LIBS $BOOST_LIBS" | |||
AC_TRY_LINK([ | |||
#include <boost/version.hpp> | |||
#include <boost/thread.hpp> | |||
#include <boost/date_time/posix_time/posix_time_types.hpp> | |||
],[ | |||
#if BOOST_VERSION <= 105600 | |||
boost::this_thread::sleep(boost::posix_time::milliseconds(0)); | |||
#else | |||
choke me | |||
#endif | |||
], | |||
[boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])], | |||
[boost_sleep=no]) | |||
LIBS="$TEMP_LIBS" | |||
fi | |||
if test x$boost_sleep != xyes; then | |||
AC_MSG_ERROR(No working boost sleep implementation found) | |||
fi | |||
if test x$use_pkgconfig = xyes; then | |||
if test x$PKG_CONFIG == x; then | |||
AC_MSG_ERROR(pkg-config not found.)] | |||
fi | |||
: #NOP | |||
m4_ifdef( | |||
[PKG_CHECK_MODULES], | |||
[ | |||
PKG_CHECK_MODULES([SSL], [libssl], [INCLUDES="$INCLUDES $SSL_CFLAGS"; LIBS="$LIBS $SSL_LIBS"], [AC_MSG_ERROR(openssl not found.)]) | |||
PKG_CHECK_MODULES([CRYPTO], [libcrypto], [INCLUDES="$INCLUDES $CRYPTO_CFLAGS"; LIBS="$LIBS $CRYPTO_LIBS"], [AC_MSG_ERROR(libcrypto not found.)]) | |||
if test x$use_qt = xyes; then | |||
PKG_CHECK_MODULES([QT], [QtCore QtGui QtNetwork], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes], [have_qt=no]) | |||
if test x$use_tests = xyes; then | |||
PKG_CHECK_MODULES([QT_TEST], [QtTest], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no]) | |||
fi | |||
if test x$use_dbus != xno; then | |||
PKG_CHECK_MODULES([QT_DBUS], [QtDBus], [QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes], [have_qt_dbus=no]) | |||
fi | |||
if test x$use_qr != xno; then | |||
PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no]) | |||
fi | |||
PKG_CHECK_MODULES([PROTOBUF], [protobuf], [have_protobuf=yes], [AC_MSG_ERROR(libprotobuf not found.)]) | |||
fi | |||
] | |||
) | |||
else | |||
AC_CHECK_HEADER([openssl/crypto.h],,AC_MSG_ERROR(libcrypto headers missing)) | |||
AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR(libcrypto missing)) | |||
AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),) | |||
AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR(libssl missing)) | |||
if test x$use_qt = xyes; then | |||
TEMP_LIBS="$LIBS" | |||
LIBS= | |||
if test x$qt_lib_path != x; then | |||
QT_LIBS="$QT_LIBS -L$qt_lib_path" | |||
LIBS="$QT_LIBS" | |||
fi | |||
if test x$qt_plugin_path != x; then | |||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/codecs" | |||
LIBS="$QT_LIBS" | |||
fi | |||
if test x$TARGET_OS == xwindows; then | |||
AC_CHECK_LIB([imm32], [main],, AC_MSG_ERROR(libimm32 not found. Install it or use --without-qt.)) | |||
fi | |||
#TODO: These are only needed when they're linked directly to parent libs. It really has nothing to do with windows. | |||
#Instead, check for missing functions in parent libs and assume static if they're absent. | |||
if test x$TARGET_OS == xwindows; then | |||
AC_CHECK_LIB([qcncodecs], [main],, AC_MSG_ERROR(libqcncodecs not found. Install it or use --without-qt.)) | |||
AC_CHECK_LIB([qjpcodecs], [main],, AC_MSG_ERROR(libqjpcodecs not found. Install it or use --without-qt.)) | |||
AC_CHECK_LIB([qkrcodecs], [main],, AC_MSG_ERROR(libqkrcodecs not found. Install it or use --without-qt.)) | |||
AC_CHECK_LIB([qtwcodecs], [main],, AC_MSG_ERROR(libqtwcodecs not found. Install it or use --without-qt.)) | |||
fi | |||
AC_CHECK_LIB([QtCore], [main],, AC_MSG_ERROR(libQtCore not found. Install it or use --without-qt.)) | |||
AC_CHECK_LIB([QtGui], [main],, AC_MSG_ERROR(libQtGui not found. Install it or use --without-qt.)) | |||
AC_CHECK_LIB([QtNetwork], [main],, AC_MSG_ERROR(libQtNetwork not found. Install it or use --without-qt.)) | |||
AC_CHECK_LIB([protobuf], [main],, AC_MSG_ERROR(libprotobuf not found. Install it or use --without-qt.)) | |||
QT_LIBS="$LIBS" | |||
LIBS="$TEMP_LIBS" | |||
TEMP_CPPFLAGS="$CPPFLAGS" | |||
if test x$qt_include_path != x; then | |||
QT_INCLUDES="-I$qt_include_path -I$qt_include_path/QtCore -I$qt_include_path/QtGui -I$qt_include_path/QtNetwork -I$qt_include_path/QtTest -I$qt_include_path/QtDBus" | |||
CPPFLAGS="$CPPFLAGS $QT_INCLUDES" | |||
fi | |||
AC_CHECK_HEADER([QtPlugin],, AC_MSG_ERROR(QtCore headers missing. Install them or use --without-qt.),) | |||
AC_CHECK_HEADER([QApplication],, AC_MSG_ERROR(QtGUI headers missing. Install them or use --without-qt.),) | |||
AC_CHECK_HEADER([QLocalSocket],, AC_MSG_ERROR(QtNetwork headers missing. Install them or use --without-qt.),) | |||
if test x$use_tests = xyes; then | |||
TEMP_LIBS="$LIBS" | |||
LIBS= | |||
if test x$qt_lib_path != x; then | |||
LIBS="-L$qt_lib_path" | |||
fi | |||
AC_CHECK_LIB([QtTest], [main],, have_qt_test=no) | |||
AC_CHECK_HEADER([QTest],, have_qt_test=no) | |||
QT_TEST_LIBS="$LIBS" | |||
LIBS="$TEMP_LIBS" | |||
fi | |||
if test x$use_dbus != xno; then | |||
TEMP_LIBS="$LIBS" | |||
LIBS= | |||
if test x$qt_lib_path != x; then | |||
LIBS="-L$qt_lib_path" | |||
fi | |||
AC_CHECK_LIB([QtDBus], [main],, have_qt_dbus=no) | |||
AC_CHECK_HEADER([QtDBus],, have_qt_dbus=no) | |||
QT_DBUS_LIBS="$LIBS" | |||
LIBS="$TEMP_LIBS" | |||
fi | |||
CPPFLAGS="$TEMP_CPPFLAGS" | |||
if test x$use_qr != xno; then | |||
AC_CHECK_LIB([qrencode], [main],, [have_qrencode=no]) | |||
AC_CHECK_HEADER([qrencode.h],, have_qrencode=no) | |||
fi | |||
fi | |||
fi | |||
if test x$use_ipv6 = xyes; then | |||
dnl Check for ipv6 build requirements | |||
AC_MSG_CHECKING(for IPV6 build support) | |||
AC_TRY_LINK([ | |||
#if defined(_WINDOWS) | |||
#include <winsock2.h> | |||
#else | |||
#include <sys/types.h> | |||
#include <sys/socket.h> | |||
#include <netinet/in.h> | |||
#endif | |||
],[ | |||
#if !defined(_WINDOWS) | |||
struct in6_addr ipv6Addr; | |||
struct sockaddr_in6 addr; | |||
#endif | |||
int temp = socket(AF_INET6, SOCK_STREAM, 0);], | |||
[AC_MSG_RESULT(yes); have_ipv6=yes; AC_DEFINE(HAVE_IPV6, 1, [Define this symbol if you have ipv6 build support])], | |||
[AC_MSG_RESULT(no)]; have_ipv6=no) | |||
fi | |||
AC_LANG_POP | |||
if test "x$use_ccache" != "xno"; then | |||
AC_MSG_CHECKING(if ccache should be enabled) | |||
if test x$CCACHE = x; then | |||
if test "x$use_ccache" = "xyes"; then | |||
AC_MSG_ERROR([ccache not found.]); | |||
else | |||
AC_MSG_NOTICE([ccache not found. Falling back to default CC]) | |||
use_ccache=no | |||
fi | |||
else | |||
use_ccache=yes | |||
CC="$ac_cv_path_CCACHE $CC" | |||
CXX="$ac_cv_path_CCACHE $CXX" | |||
fi | |||
AC_MSG_RESULT($use_ccache) | |||
fi | |||
dnl enable ipv6 support | |||
AC_MSG_CHECKING([if ipv6 should be enabled]) | |||
if test x$have_ipv6 = xno; then | |||
if test x$use_ipv6 = xyes; then | |||
AC_MSG_ERROR("ipv6 requested but cannot be built. use --disable-ipv6") | |||
fi | |||
AC_MSG_RESULT(no) | |||
else | |||
if test x$use_ipv6 = xyes; then | |||
AC_MSG_RESULT(yes) | |||
AC_DEFINE([USE_IPV6],[1],[Define if ipv6 support should be compiled in]) | |||
else | |||
AC_MSG_RESULT(no) | |||
fi | |||
fi | |||
dnl enable upnp support | |||
AC_MSG_CHECKING([if upnp should be enabled]) | |||
if test x$have_miniupnpc = xno; then | |||
if test x$use_upnp = xyes; then | |||
AC_MSG_ERROR("upnp requested but cannot be built. use --without-miniupnpc") | |||
fi | |||
AC_MSG_RESULT(no) | |||
else | |||
if test x$use_upnp != xno; then | |||
AC_MSG_RESULT(yes) | |||
AC_MSG_CHECKING([if upnp should be on by default]) | |||
use_upnp=yes | |||
upnp_setting=0 | |||
if test x$use_upnp_default != xno; then | |||
use_upnp_default=yes | |||
upnp_setting=1 | |||
fi | |||
AC_MSG_RESULT($use_upnp_default) | |||
AC_DEFINE_UNQUOTED([USE_UPNP],[$upnp_setting],[Define to 1 for upnp runtime support]) | |||
if test x$TARGET_OS = xwindows; then | |||
CPPFLAGS="$CPPFLAGS -DSTATICLIB" | |||
fi | |||
else | |||
AC_MSG_RESULT(no) | |||
fi | |||
fi | |||
dnl enable qt support | |||
AC_MSG_CHECKING([if qt should be enabled]) | |||
if test x$use_qt = xyes; then | |||
if test x$have_qt = xno; then | |||
AC_MSG_ERROR("qt support requested but qt could not be located. use --without-qt") | |||
fi | |||
if test x$MOC = x; then | |||
AC_MSG_ERROR("qt support requested but moc was not found. use --without-qt") | |||
fi | |||
if test x$PROTOC = x; then | |||
AC_MSG_ERROR("qt support requested but protoc was not found. use --without-qt") | |||
fi | |||
if test x$UIC = x; then | |||
AC_MSG_ERROR("qt support requested but uic was not found. use --without-qt") | |||
fi | |||
if test x$RCC = x; then | |||
AC_MSG_ERROR("qt support requested but rcc was not found. use --without-qt") | |||
fi | |||
if test x$LRELEASE = x; then | |||
AC_MSG_ERROR("qt support requested but lrelease was not found. use --without-qt") | |||
fi | |||
if test x$use_tests = xyes; then | |||
if test x$have_qt_test = xno; then | |||
AC_MSG_ERROR("libQtTest not found. Use --disable-tests or --without-qt.") | |||
fi | |||
fi | |||
if test x$have_qt_dbus = xno; then | |||
use_dbus=no | |||
if test x$use_dbus = xyes; then | |||
AC_MSG_ERROR("libQtDBus not found. Use --without-qtdbus.") | |||
fi | |||
fi | |||
BUILD_QT=qt | |||
else | |||
use_qt=no | |||
fi | |||
AC_MSG_RESULT($use_qt) | |||
dnl these are only used when qt is enabled | |||
if test x$use_qt = xyes; then | |||
dnl enable dbus support | |||
AC_MSG_CHECKING([if dbus should be enabled]) | |||
if test x$use_dbus != xno; then | |||
use_dbus=yes | |||
AC_DEFINE([USE_DBUS],[1],[Define if dbus support should be compiled in]) | |||
else | |||
use_dbus=no | |||
fi | |||
AC_MSG_RESULT($use_dbus) | |||
dnl enable qr support | |||
AC_MSG_CHECKING([if qr should be enabled]) | |||
if test x$have_qrencode = xno; then | |||
if test x$use_qr == xyes; then | |||
AC_MSG_ERROR("QR support requested but cannot be built. use --without-qrencode") | |||
fi | |||
AC_MSG_RESULT(no) | |||
else | |||
if test x$use_qr != xno; then | |||
AC_MSG_RESULT(yes) | |||
AC_DEFINE([USE_QRCODE],[1],[Define if QR support should be compiled in]) | |||
use_qr=yes | |||
else | |||
AC_MSG_RESULT(no) | |||
fi | |||
fi | |||
if test x$use_tests = xyes; then | |||
BUILD_TEST_QT="test" | |||
fi | |||
fi | |||
if test x$use_tests = xyes; then | |||
BUILD_TEST="test" | |||
fi | |||
AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin]) | |||
AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows]) | |||
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes]) | |||
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes]) | |||
AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno]) | |||
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version]) | |||
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version]) | |||
AC_DEFINE(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION, [Build revision]) | |||
AC_DEFINE(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD, [Version Build]) | |||
AC_DEFINE(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE, [Version is release]) | |||
AC_DEFINE(COPYRIGHT_YEAR, _COPYRIGHT_YEAR, [Version is release]) | |||
AC_SUBST(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR) | |||
AC_SUBST(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR) | |||
AC_SUBST(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION) | |||
AC_SUBST(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD) | |||
AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE) | |||
AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR) | |||
AC_SUBST(USE_UPNP) | |||
AC_SUBST(USE_QRCODE) | |||
AC_SUBST(USE_IPV6) | |||
AC_SUBST(INCLUDES) | |||
AC_SUBST(BOOST_LIBS) | |||
AC_SUBST(MOC_DEFS) | |||
AC_SUBST(QT_INCLUDES) | |||
AC_SUBST(QT_TEST_LIBS) | |||
AC_SUBST(QT_LIBS) | |||
AC_SUBST(QT_DBUS_LIBS) | |||
AC_SUBST(QT_DBUS_INCLUDES) | |||
AC_SUBST(QT_TEST_INCLUDES) | |||
AC_SUBST(TESTDEFS) | |||
AC_SUBST(LEVELDB_TARGET_FLAGS) | |||
AC_SUBST(BUILD_QT) | |||
AC_SUBST(BUILD_TEST) | |||
AC_SUBST(BUILD_TEST_QT) | |||
AC_CONFIG_FILES([Makefile src/Makefile src/test/Makefile src/qt/Makefile src/qt/test/Makefile share/setup.nsi share/qt/Info.plist]) | |||
AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh]) | |||
AC_CONFIG_FILES([qa/pull-tester/build-tests.sh],[chmod +x qa/pull-tester/build-tests.sh]) | |||
AC_OUTPUT |
@@ -0,0 +1,17 @@ | |||
FORMS += \ | |||
../src/qt/forms/transactiondescdialog.ui \ | |||
../src/qt/forms/signverifymessagedialog.ui \ | |||
../src/qt/forms/sendcoinsentry.ui \ | |||
../src/qt/forms/sendcoinsdialog.ui \ | |||
../src/qt/forms/rpcconsole.ui \ | |||
../src/qt/forms/qrcodedialog.ui \ | |||
../src/qt/forms/overviewpage.ui \ | |||
../src/qt/forms/optionsdialog.ui \ | |||
../src/qt/forms/intro.ui \ | |||
../src/qt/forms/editaddressdialog.ui \ | |||
../src/qt/forms/askpassphrasedialog.ui \ | |||
../src/qt/forms/addressbookpage.ui \ | |||
../src/qt/forms/aboutdialog.ui | |||
RESOURCES += \ | |||
../src/qt/bitcoin.qrc |
@@ -13,8 +13,8 @@ remotes: [] | |||
files: | |||
- "boost_1_50_0.tar.bz2" | |||
script: | | |||
TMPDIR="$HOME/tmpdir" | |||
mkdir -p $TMPDIR/bin/$GBUILD_BITS $TMPDIR/include | |||
INSTALLPREFIX="$OUTDIR/staging/boost" | |||
mkdir -p "$INSTALLPREFIX" | |||
tar xjf boost_1_50_0.tar.bz2 | |||
cd boost_1_50_0 | |||
echo "using gcc : 4.4 : i586-mingw32msvc-g++ | |||
@@ -24,15 +24,10 @@ script: | | |||
<cxxflags>-frandom-seed=boost1 | |||
;" > user-config.jam | |||
./bootstrap.sh --without-icu | |||
./bjam toolset=gcc target-os=windows threadapi=win32 threading=multi variant=release link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete $MAKEOPTS stage | |||
for lib in chrono date_time exception filesystem graph iostreams math_c99f math_c99l math_c99 math_tr1f math_tr1l math_tr1 prg_exec_monitor program_options random regex serialization signals system test_exec_monitor thread_win32 unit_test_framework wave wserialization; do | |||
mkdir $lib | |||
(cd $lib ; ar xf ../stage/lib/libboost_${lib}-mt-s.a) | |||
mv $lib $TMPDIR/bin/$GBUILD_BITS | |||
done | |||
cp -a boost $TMPDIR/include | |||
cd $TMPDIR | |||
./bjam toolset=gcc target-os=windows threadapi=win32 threading=multi variant=release link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete --prefix="$INSTALLPREFIX" $MAKEOPTS install | |||
cd "$INSTALLPREFIX" | |||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 | |||
export FAKETIME=$REFERENCE_DATETIME | |||
zip -r boost-win32-1.50.0-gitian2.zip * | |||
cp boost-win32-1.50.0-gitian2.zip $OUTDIR | |||
zip -r boost-win32-1.50.0-gitian3.zip * | |||
cp boost-win32-1.50.0-gitian3.zip $OUTDIR |
@@ -25,48 +25,58 @@ script: | | |||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 | |||
export FAKETIME=$REFERENCE_DATETIME | |||
export TZ=UTC | |||
export INSTALLPREFIX=$OUTDIR/staging/deps | |||
export HOST=i586-mingw32msvc | |||
# | |||
mkdir -p $INSTALLPREFIX | |||
tar xzf openssl-1.0.1c.tar.gz | |||
cd openssl-1.0.1c | |||
./Configure --cross-compile-prefix=i586-mingw32msvc- mingw | |||
./Configure --cross-compile-prefix=$HOST- mingw --openssldir=$INSTALLPREFIX | |||
make | |||
make install_sw | |||
cd .. | |||
# | |||
tar xzf db-4.8.30.NC.tar.gz | |||
cd db-4.8.30.NC/build_unix | |||
../dist/configure --enable-mingw --enable-cxx --host=i586-mingw32msvc CFLAGS="-I/usr/i586-mingw32msvc/include" | |||
make $MAKEOPTS | |||
../dist/configure --prefix=$INSTALLPREFIX --enable-mingw --enable-cxx --host=$HOST | |||
make $MAKEOPTS library_build | |||
make install_lib install_include | |||
cd ../.. | |||
# | |||
tar xzf miniupnpc-1.6.tar.gz | |||
cd miniupnpc-1.6 | |||
sed 's/dllwrap -k --driver-name gcc/$(DLLWRAP) -k --driver-name $(CC)/' -i Makefile.mingw | |||
sed 's|wingenminiupnpcstrings $< $@|./wingenminiupnpcstrings $< $@|' -i Makefile.mingw | |||
make -f Makefile.mingw DLLWRAP=i586-mingw32msvc-dllwrap CC=i586-mingw32msvc-gcc AR=i586-mingw32msvc-ar | |||
mkdir -p dll | |||
make -f Makefile.mingw DLLWRAP=$HOST-dllwrap CC=$HOST-gcc AR=$HOST-ar libminiupnpc.a | |||
install -d $INSTALLPREFIX/include/miniupnpc | |||
install *.h $INSTALLPREFIX/include/miniupnpc | |||
install libminiupnpc.a $INSTALLPREFIX/lib | |||
cd .. | |||
mv miniupnpc-1.6 miniupnpc | |||
# | |||
tar xzf zlib-1.2.6.tar.gz | |||
cd zlib-1.2.6 | |||
make -f win32/Makefile.gcc PREFIX=i586-mingw32msvc- $MAKEOPTS | |||
CROSS_PREFIX=$HOST- ./configure --prefix=$INSTALLPREFIX --static | |||
make | |||
make install | |||
cd .. | |||
# | |||
tar xzf libpng-1.5.9.tar.gz | |||
cd libpng-1.5.9 | |||
./configure -disable-shared CC=i586-mingw32msvc-cc AR=i586-mingw32msvc-ar STRIP=i586-mingw32msvc-strip RANLIB=i586-mingw32msvc-ranlib OBJDUMP=i586-mingw32msvc-objdump LD=i586-mingw32msvc-ld LDFLAGS="-L../zlib-1.2.6/" CFLAGS="-I../zlib-1.2.6/" | |||
CFLAGS="-I$INSTALLPREFIX/include" LDFLAGS="-L$INSTALLPREFIX/lib" ./configure --disable-shared --prefix=$INSTALLPREFIX --host=$HOST | |||
make $MAKEOPTS | |||
make install | |||
cd .. | |||
# | |||
tar xjf qrencode-3.2.0.tar.bz2 | |||
cd qrencode-3.2.0 | |||
./configure CC=i586-mingw32msvc-cc AR=i586-mingw32msvc-ar STRIP=i586-mingw32msvc-strip RANLIB=i586-mingw32msvc-ranlib OBJDUMP=i586-mingw32msvc-objdump LD=i586-mingw32msvc-ld png_LIBS="../libpng-1.5.9/.libs/libpng15.a ../zlib-1.2.6/libz.a" png_CFLAGS="-I../libpng-1.5.9" | |||
make $MAKEOPTS | |||
png_CFLAGS="-I$INSTALLPREFIX/include" png_LIBS="-L$INSTALLPREFIX/lib -lpng" ./configure --prefix=$INSTALLPREFIX --host=i586-mingw32msvc | |||
make | |||
make install | |||
cd .. | |||
# | |||
zip -r $OUTDIR/bitcoin-deps-0.0.5.zip \ | |||
$(ls qrencode-*/{qrencode.h,.libs/libqrencode.{,l}a} | sort) \ | |||
$(ls db-*/build_unix/{libdb_cxx.a,db.h,db_cxx.h,libdb.a,.libs/libdb_cxx-?.?.a} | sort) \ | |||
$(find openssl-* -name '*.a' -o -name '*.h' | sort) \ | |||
$(find miniupnpc -name '*.h' -o -name 'libminiupnpc.a' | sort) | |||
cd $INSTALLPREFIX | |||
zip -r $OUTDIR/bitcoin-deps-0.0.6.zip include lib | |||
# Kill wine processes as gitian won't figure out we are done otherwise | |||
killall wineserver services.exe explorer.exe winedevice.exe |
@@ -10,69 +10,48 @@ packages: | |||
- "unzip" | |||
- "nsis" | |||
- "faketime" | |||
reference_datetime: "2011-01-30 00:00:00" | |||
- "autoconf2.13" | |||
- "libtool" | |||
- "automake" | |||
- "pkg-config" | |||
reference_datetime: "2013-06-01 00:00:00" | |||
remotes: | |||
- "url": "https://github.com/bitcoin/bitcoin.git" | |||
"dir": "bitcoin" | |||
files: | |||
- "qt-win32-4.8.3-gitian-r2.zip" | |||
- "boost-win32-1.50.0-gitian2.zip" | |||
- "bitcoin-deps-0.0.5.zip" | |||
- "protobuf-win32-2.5.0-gitian-r1.zip" | |||
- "qt-win32-4.8.3-gitian-r3.zip" | |||
- "boost-win32-1.50.0-gitian3.zip" | |||
- "bitcoin-deps-0.0.6.zip" | |||
- "protobuf-win32-2.5.0-gitian-r2.zip" | |||
script: | | |||
# | |||
export QTDIR=$HOME/qt | |||
mkdir $QTDIR | |||
cd $QTDIR | |||
unzip ../build/qt-win32-4.8.3-gitian-r2.zip | |||
STAGING=$HOME/staging | |||
mkdir -p $STAGING | |||
cd $STAGING | |||
unzip ../build/qt-win32-4.8.3-gitian-r3.zip | |||
unzip ../build/boost-win32-1.50.0-gitian3.zip | |||
unzip ../build/bitcoin-deps-0.0.6.zip | |||
unzip ../build/protobuf-win32-2.5.0-gitian-r2.zip | |||
cd $HOME/build/ | |||
export PATH=$QTDIR/bin/:$PATH | |||
# | |||
mkdir boost_1_50_0 | |||
cd boost_1_50_0 | |||
mkdir -p stage/lib | |||
unzip ../boost-win32-1.50.0-gitian2.zip | |||
cd bin/$GBUILD_BITS | |||
for lib in *; do | |||
i586-mingw32msvc-ar rc ../../stage/lib/libboost_${lib}-mt-s.a $lib/*.o | |||
i586-mingw32msvc-ranlib ../../stage/lib/libboost_${lib}-mt-s.a | |||
done | |||
cd ../.. | |||
mv include/boost . | |||
cd .. | |||
# | |||
unzip bitcoin-deps-0.0.5.zip | |||
# | |||
unzip protobuf-win32-2.5.0-gitian-r1.zip | |||
# | |||
find -type f | xargs touch --date="$REFERENCE_DATETIME" | |||
# | |||
cd bitcoin | |||
mkdir -p $OUTDIR/src | |||
git archive HEAD | tar -x -C $OUTDIR/src | |||
cp $OUTDIR/src/doc/README_windows.txt $OUTDIR/readme.txt | |||
cp $OUTDIR/src/COPYING $OUTDIR/COPYING.txt | |||
export PATH=$STAGING/host/bin:$PATH | |||
export TAR_OPTIONS=--mtime=`echo $REFERENCE_DATETIME | awk '{ print $1 }'` | |||
./autogen.sh | |||
./configure --disable-debug --bindir=$OUTDIR --prefix=$STAGING --host=i586-mingw32msvc --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include" LDFLAGS="-L$STAGING/lib" CXXFLAGS="-frandom-seed=bitcoin" | |||
make dist | |||
mkdir -p distsrc | |||
cd distsrc | |||
tar --strip-components=1 -xf ../bitcoin-*.tar.* | |||
./configure --disable-debug --bindir=$OUTDIR --prefix=$STAGING --host=i586-mingw32msvc --with-qt-plugindir=$STAGING/plugins --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include" LDFLAGS="-L$STAGING/lib" CXXFLAGS="-frandom-seed=bitcoin" | |||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 | |||
export FAKETIME=$REFERENCE_DATETIME | |||
export TZ=UTC | |||
$QTDIR/bin/qmake -spec unsupported/win32-g++-cross PROTOBUF_LIB_PATH=$HOME/build/protobuf-win32 PROTOBUF_INCLUDE_PATH=$HOME/build/protobuf-win32 PROTOC=$HOME/build/protobuf-win32/protoc MINIUPNPC_LIB_PATH=$HOME/build/miniupnpc MINIUPNPC_INCLUDE_PATH=$HOME/build/ BDB_LIB_PATH=$HOME/build/db-4.8.30.NC/build_unix BDB_INCLUDE_PATH=$HOME/build/db-4.8.30.NC/build_unix BOOST_LIB_PATH=$HOME/build/boost_1_50_0/stage/lib BOOST_INCLUDE_PATH=$HOME/build/boost_1_50_0 BOOST_LIB_SUFFIX=-mt-s BOOST_THREAD_LIB_SUFFIX=_win32-mt-s OPENSSL_LIB_PATH=$HOME/build/openssl-1.0.1c OPENSSL_INCLUDE_PATH=$HOME/build/openssl-1.0.1c/include QRENCODE_LIB_PATH=$HOME/build/qrencode-3.2.0/.libs QRENCODE_INCLUDE_PATH=$HOME/build/qrencode-3.2.0 USE_QRCODE=1 INCLUDEPATH=$HOME/build DEFINES=BOOST_THREAD_USE_LIB BITCOIN_NEED_QT_PLUGINS=1 QMAKE_LRELEASE=lrelease QMAKE_CXXFLAGS=-frandom-seed=bitcoin USE_BUILD_INFO=1 | |||
make $MAKEOPTS | |||
cp release/bitcoin-qt.exe $OUTDIR/ | |||
# | |||
cd src | |||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 | |||
export FAKETIME=$REFERENCE_DATETIME | |||
export TZ=UTC | |||
make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoind.exe USE_UPNP=0 DEBUGFLAGS="-frandom-seed=bitcoin" | |||
i586-mingw32msvc-strip bitcoind.exe | |||
mkdir $OUTDIR/daemon | |||
cp bitcoind.exe $OUTDIR/daemon | |||
cd .. | |||
mkdir nsis | |||
git archive HEAD | tar -x -C nsis | |||
cd nsis/src | |||
mkdir ../release | |||
cp ../../release/* ../release/ | |||
cp ../../src/*.exe . | |||
makensis ../share/setup.nsi | |||
cp ../share/bitcoin-*-win32-setup.exe $OUTDIR/ | |||
make deploy | |||
make install-strip | |||
cp -f bitcoin-*setup*.exe $OUTDIR/ | |||
mkdir -p $OUTDIR/src | |||
cp -f ../bitcoin-*.tar.* $OUTDIR/src |
@@ -13,11 +13,16 @@ packages: | |||
- "libboost-filesystem-dev" | |||
- "libboost-program-options-dev" | |||
- "libboost-thread-dev" | |||
- "libboost-test-dev" | |||
- "libssl-dev" | |||
- "git-core" | |||
- "unzip" | |||
- "pkg-config" | |||
- "libpng12-dev" | |||
- "autoconf2.13" | |||
- "libtool" | |||
- "automake" | |||
- "faketime" | |||
reference_datetime: "2013-06-01 00:00:00" | |||
remotes: | |||
- "url": "https://github.com/bitcoin/bitcoin.git" | |||
@@ -27,35 +32,38 @@ files: | |||
- "qrencode-3.2.0.tar.bz2" | |||
- "protobuf-2.5.0.tar.bz2" | |||
script: | | |||
INSTDIR="$HOME/install" | |||
export LIBRARY_PATH="$INSTDIR/lib" | |||
STAGING="$HOME/install" | |||
export LIBRARY_PATH="$STAGING/lib" | |||
# | |||
tar xzfm miniupnpc-1.6.tar.gz | |||
cd miniupnpc-1.6 | |||
INSTALLPREFIX=$INSTDIR make $MAKEOPTS install | |||
INSTALLPREFIX=$STAGING make $MAKEOPTS install | |||
cd .. | |||
# | |||
tar xjfm qrencode-3.2.0.tar.bz2 | |||
cd qrencode-3.2.0 | |||
./configure --prefix=$INSTDIR --enable-static --disable-shared | |||
sed -i 's/@LIBPTHREAD@//' libqrencode.pc.in | |||
./configure --prefix=$STAGING --enable-static --disable-shared | |||
make $MAKEOPTS install | |||
cd .. | |||
# | |||
tar xjfm protobuf-2.5.0.tar.bz2 | |||
cd protobuf-2.5.0 | |||
./configure --prefix=$INSTDIR --enable-static --disable-shared | |||
mkdir -p $STAGING/host/bin | |||
./configure --prefix=$STAGING --bindir=$STAGING/host/bin --enable-static --disable-shared | |||
make $MAKEOPTS install | |||
cd .. | |||
# | |||
cd bitcoin | |||
mkdir -p $OUTDIR/src | |||
git archive HEAD | tar -x -C $OUTDIR/src | |||
cp $OUTDIR/src/doc/README.md $OUTDIR | |||
cp $OUTDIR/src/COPYING $OUTDIR | |||
mkdir -p $OUTDIR/bin/$GBUILD_BITS | |||
qmake INCLUDEPATH="$INSTDIR/include" LIBS="-L$INSTDIR/lib" PROTOC="$INSTDIR/bin/protoc" PROTOBUF_LIB_PATH="$INSTDIR/lib" PROTOBUF_INCLUDE_PATH="$INSTDIR/include" RELEASE=1 USE_QRCODE=1 | |||
export TAR_OPTIONS=--mtime=`echo $REFERENCE_DATETIME | awk '{ print $1 }'` | |||
./autogen.sh | |||
./configure --disable-debug --prefix=$STAGING --bindir=$OUTDIR --with-protoc-bindir=$STAGING/host/bin --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include" LDFLAGS="-L$STAGING/lib" CXXFLAGS="-frandom-seed=bitcoin" | |||
make dist | |||
mkdir -p distsrc | |||
cd distsrc | |||
tar --strip-components=1 -xf ../bitcoin-*.tar.* | |||
./configure --disable-debug --prefix=$STAGING --bindir=$OUTDIR --with-protoc-bindir=$STAGING/host/bin --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include" LDFLAGS="-L$STAGING/lib" CXXFLAGS="-frandom-seed=bitcoin" | |||
make $MAKEOPTS | |||
install bitcoin-qt $OUTDIR/bin/$GBUILD_BITS | |||
cd src | |||
make -f makefile.unix STATIC=1 OPENSSL_INCLUDE_PATH="$INSTDIR/include" OPENSSL_LIB_PATH="$INSTDIR/lib" $MAKEOPTS bitcoind USE_UPNP=0 DEBUGFLAGS= | |||
install -s bitcoind $OUTDIR/bin/$GBUILD_BITS | |||
make $MAKEOPTS install-strip | |||
mkdir -p $OUTDIR/src | |||
cp ../bitcoin-*.tar.* $OUTDIR/src |
@@ -17,21 +17,23 @@ script: | | |||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 | |||
export FAKETIME=$REFERENCE_DATETIME | |||
export TZ=UTC | |||
export INSTALLPREFIX=$OUTDIR/staging/deps | |||
export HOST=i586-mingw32msvc | |||
# | |||
# | |||
mkdir -p $INSTALLPREFIX | |||
tar xjf protobuf-2.5.0.tar.bz2 | |||
cd protobuf-2.5.0 | |||
# First: build a native (linux) protoc | |||
./configure --enable-shared=no --disable-dependency-tracking | |||
make | |||
mkdir -p host | |||
cp src/protoc host | |||
mkdir -p $INSTALLPREFIX/host/bin | |||
cp src/protoc $INSTALLPREFIX/host/bin | |||
# Now recompile with the mingw cross-compiler: | |||
make distclean | |||
./configure --enable-shared=no --disable-dependency-tracking --with-protoc=$(pwd)/host/protoc --host=i586-mingw32msvc CXXFLAGS=-frandom-seed=11 | |||
./configure --prefix=$INSTALLPREFIX --enable-shared=no --disable-dependency-tracking --with-protoc=$INSTALLPREFIX/host/bin/protoc --host=$HOST CXXFLAGS=-frandom-seed=11 | |||
make | |||
cd .. | |||
mkdir -p protobuf-win32 | |||
cp protobuf-2.5.0/host/protoc protobuf-win32/protoc | |||
cp protobuf-2.5.0/src/.libs/libprotobuf.a protobuf-win32/libprotobuf.a | |||
cp -r protobuf-2.5.0/src/google protobuf-win32/ | |||
zip -r $OUTDIR/protobuf-win32-2.5.0-gitian-r1.zip protobuf-win32 | |||
make install | |||
cd $INSTALLPREFIX | |||
zip -r $OUTDIR/protobuf-win32-2.5.0-gitian-r2.zip include lib host |
@@ -8,17 +8,19 @@ packages: | |||
- "mingw32" | |||
- "zip" | |||
- "faketime" | |||
- "unzip" | |||
reference_datetime: "2011-01-30 00:00:00" | |||
remotes: [] | |||
files: | |||
- "qt-everywhere-opensource-src-4.8.3.tar.gz" | |||
- "bitcoin-deps-0.0.5.zip" | |||
- "bitcoin-deps-0.0.6.zip" | |||
script: | | |||
INSTDIR="$HOME/qt/" | |||
mkdir $INSTDIR | |||
mkdir -p $INSTDIR/host/bin | |||
# | |||
# Need mingw-compiled openssl from bitcoin-deps: | |||
unzip bitcoin-deps-0.0.5.zip | |||
unzip bitcoin-deps-0.0.6.zip | |||
DEPSDIR=`pwd` | |||
# | |||
tar xzf qt-everywhere-opensource-src-4.8.3.tar.gz | |||
@@ -44,7 +46,7 @@ script: | | |||
export FAKETIME=$REFERENCE_DATETIME | |||
export TZ=UTC | |||
# Compile static libraries, and use statically linked openssl (-openssl-linked): | |||
OPENSSL_LIBS="-L$DEPSDIR/openssl-1.0.1c -lssl -lcrypto -lgdi32" ./configure -prefix $INSTDIR -I $DEPSDIR/openssl-1.0.1c/include -confirm-license -release -opensource -static -no-qt3support -xplatform unsupported/win32-g++-cross -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -no-opengl -nomake examples -nomake demos -nomake docs -no-feature-style-plastique -no-feature-style-cleanlooks -no-feature-style-motif -no-feature-style-cde -no-feature-style-windowsce -no-feature-style-windowsmobile -no-feature-style-s60 -openssl-linked | |||
OPENSSL_LIBS="-L$DEPSDIR/lib -lssl -lcrypto -lgdi32" ./configure -prefix $INSTDIR -bindir $INSTDIR/host/bin -I $DEPSDIR/include -confirm-license -release -opensource -static -no-qt3support -xplatform unsupported/win32-g++-cross -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -no-opengl -nomake examples -nomake demos -nomake docs -no-feature-style-plastique -no-feature-style-cleanlooks -no-feature-style-motif -no-feature-style-cde -no-feature-style-windowsce -no-feature-style-windowsmobile -no-feature-style-s60 -openssl-linked | |||
find . -name *.prl | xargs -l sed 's|/\.||' -i | |||
find . -name *.prl | xargs -l sed 's|/$||' -i | |||
make $MAKEOPTS install | |||
@@ -53,4 +55,4 @@ script: | | |||
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date | |||
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 | |||
zip -r $OUTDIR/qt-win32-4.8.3-gitian-r2.zip * | |||
zip -r $OUTDIR/qt-win32-4.8.3-gitian-r3.zip * |
@@ -651,6 +651,23 @@ elif config.sign: | |||
# ------------------------------------------------ | |||
if config.dmg is not None: | |||
#Patch in check_output for Python 2.6 | |||
if "check_output" not in dir( subprocess ): | |||
def f(*popenargs, **kwargs): | |||
if 'stdout' in kwargs: | |||
raise ValueError('stdout argument not allowed, it will be overridden.') | |||
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs) | |||
output, unused_err = process.communicate() | |||
retcode = process.poll() | |||
if retcode: | |||
cmd = kwargs.get("args") | |||
if cmd is None: | |||
cmd = popenargs[0] | |||
raise CalledProcessError(retcode, cmd) | |||
return output | |||
subprocess.check_output = f | |||
def runHDIUtil(verb, image_basename, **kwargs): | |||
hdiutil_args = ["hdiutil", verb, image_basename + ".dmg"] | |||
if kwargs.has_key("capture_stdout"): |
@@ -1,26 +1,14 @@ | |||
macdeployqtplus works best on OS X Lion, for Snow Leopard you'd need to install | |||
Python 2.7 and make it your default Python installation. | |||
You will need the appscript package for the fancy disk image creation to work. | |||
Install it by invoking "sudo easy_install appscript". | |||
This script should be invoked in the target directory like this: | |||
$source_dir/contrib/macdeploy/macdeployqtplus Bitcoin-Qt.app -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy $source_dir/contrib/macdeploy/fancy.plist -verbose 2 | |||
For Snow Leopard (which uses Python 2.6), you will need the param_parser package. | |||
Install it by invoking "sudo easy_install argparse" | |||
This script should not be run manually, instead, after building as usual: | |||
"make deploy" | |||
During the process, the disk image window will pop up briefly where the fancy | |||
settings are applied. This is normal, please do not interfere. | |||
You can also set up Qt Creator for invoking the script. For this, go to the | |||
"Projects" tab on the left side, switch to "Run Settings" above and add a | |||
deploy configuration. Next add a deploy step choosing "Custom Process Step". | |||
Fill in the following. | |||
Enable custom process step: [x] | |||
Command: %{sourceDir}/contrib/macdeploy/macdeployqtplus | |||
Working directory: %{buildDir} | |||
Command arguments: Bitcoin-Qt.app -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy %{sourceDir}/contrib/macdeploy/fancy.plist -verbose 2 | |||
After that you can start the deployment process through the menu with | |||
Build -> Deploy Project "bitcoin-qt" | |||
When finished, it will produce Bitcoin-Qt.dmg. | |||
@@ -5,10 +5,12 @@ Some notes on how to build Bitcoin in Unix. | |||
To Build | |||
--------------------- | |||
cd src/ | |||
make -f makefile.unix # Headless bitcoin | |||
./autogen.sh | |||
./configure | |||
make | |||
See [readme-qt.md](readme-qt.md) for instructions on building Bitcoin-Qt, the graphical user interface. | |||
This will build bitcoin-qt as well if the dependencies are met. | |||
See [readme-qt.md](readme-qt.md) for more information. | |||
Dependencies | |||
--------------------- | |||
@@ -22,15 +24,15 @@ Dependencies | |||
[miniupnpc](http://miniupnp.free.fr/) may be used for UPnP port mapping. It can be downloaded from [here]( | |||
http://miniupnp.tuxfamily.org/files/). UPnP support is compiled in and | |||
turned off by default. Set USE_UPNP to a different value to control this: | |||
turned off by default. See the configure options for upnp behavior desired: | |||
USE_UPNP= No UPnP support miniupnp not required | |||
USE_UPNP=0 (the default) UPnP support turned off by default at runtime | |||
USE_UPNP=1 UPnP support turned on by default at runtime | |||
--with-miniupnpc No UPnP support miniupnp not required | |||
--disable-upnp-default (the default) UPnP support turned off by default at runtime | |||
--enable-upnp-default UPnP support turned on by default at runtime | |||
IPv6 support may be disabled by setting: | |||
USE_IPV6=0 Disable IPv6 support | |||
--disable-ipv6 Disable IPv6 support | |||
Licenses of statically linked libraries: | |||
Berkeley DB New BSD license with additional requirement that linked | |||
@@ -70,7 +72,7 @@ for other Ubuntu & Debian: | |||
Optional: | |||
sudo apt-get install libminiupnpc-dev (see USE_UPNP compile flag) | |||
sudo apt-get install libminiupnpc-dev (see --with-miniupnpc and --enable-upnp-default) | |||
Dependency Build Instructions: Gentoo | |||
@@ -83,8 +85,9 @@ Note: If you just want to install bitcoind on Gentoo, you can add the Bitcoin ov | |||
Take the following steps to build (no UPnP support): | |||
cd ${BITCOIN_DIR}/src | |||
make -f makefile.unix USE_UPNP= USE_IPV6=1 BDB_INCLUDE_PATH='/usr/include/db4.8' | |||
cd ${BITCOIN_DIR} | |||
./autogen.sh | |||
./configure --without-miniupnpc CXXFLAGS="-i/usr/include/db4.8" | |||
strip bitcoind | |||
@@ -123,7 +126,13 @@ If you need to build Boost yourself: | |||
Security | |||
-------- | |||
To help make your bitcoin installation more secure by making certain attacks impossible to | |||
exploit even if a vulnerability is found, you can take the following measures: | |||
exploit even if a vulnerability is found, binaries are hardened by default. | |||
This can be disabled with: | |||
./configure --enable-hardening | |||
Hardening enables the following features: | |||
* Position Independent Executable | |||
Build position independent code to take advantage of Address Space Layout Randomization | |||
@@ -135,10 +144,6 @@ exploit even if a vulnerability is found, you can take the following measures: | |||
On an Amd64 processor where a library was not compiled with -fPIC, this will cause an error | |||
such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;" | |||
To build with PIE, use: | |||
make -f makefile.unix ... -e PIE=1 | |||
To test that you have built PIE executable, install scanelf, part of paxutils, and use: | |||
scanelf -e ./bitcoin |
@@ -31,14 +31,8 @@ For Qt 5 you need the following, otherwise you get an error with lrelease when r | |||
apt-get install qt5-qmake libqt5gui5 libqt5core5 libqt5dbus5 qttools5-dev-tools | |||
then execute the following: | |||
qmake | |||
make | |||
Alternatively, install [Qt Creator](http://qt-project.org/downloads/) and open the `bitcoin-qt.pro` file. | |||
An executable named `bitcoin-qt` will be built. | |||
Once these are installed, they will be found by configure and bitcoin-qt will be | |||
built by default. | |||
### Mac OS X | |||
@@ -55,52 +49,31 @@ An executable named `bitcoin-qt` will be built. | |||
brew update | |||
brew install boost miniupnpc openssl berkeley-db4 protobuf | |||
- If using HomeBrew, edit `bitcoin-qt.pro` to account for library location differences. There's a diff in `contrib/homebrew/bitcoin-qt-pro.patch` that shows what you need to change, or you can just patch by doing | |||
patch -p1 < contrib/homebrew/bitcoin.qt.pro.patch | |||
- Open the bitcoin-qt.pro file in Qt Creator and build as normal (cmd+B) | |||
Build Configuration Options | |||
--------------------- | |||
### UPnP port forwarding | |||
To use UPnP for port forwarding behind a NAT router (recommended, as more connections overall allow for a faster and more stable bitcoin experience), pass the following argument to qmake: | |||
UPnP support is compiled in when possible and turned off by default. See the | |||
configure options for upnp behavior desired: | |||
qmake "USE_UPNP=1" | |||
(in **Qt Creator**, you can find the setting for additional qmake arguments under "Projects" -> "Build Settings" -> "Build Steps", then click "Details" next to **qmake**) | |||
This requires miniupnpc for UPnP port mapping. It can be downloaded from [here]( | |||
http://miniupnp.tuxfamily.org/files/). UPnP support is not compiled in by default. | |||
Set USE_UPNP to a different value to control this: | |||
USE_UPNP=- no UPnP support, miniupnpc not required; | |||
USE_UPNP=0 (the default) built with UPnP, support turned off by default at runtime; | |||
USE_UPNP=1 build with UPnP support turned on by default at runtime. | |||
--with-miniupnpc No UPnP support miniupnp not required | |||
--disable-upnp-default (the default) UPnP support turned off by default at runtime | |||
--enable-upnp-default UPnP support turned on by default at runtime | |||
### Notification support for recent (k)ubuntu versions | |||
To see desktop notifications on (k)ubuntu versions starting from 10.04, enable usage of the | |||
FreeDesktop notification interface through DBUS using the following qmake option: | |||
DBUS support is enabled by default if dependencies are met. | |||
qmake "USE_DBUS=1" | |||
See the --with-qtdbus configure option. | |||
### Generation of QR codes | |||
[libqrencode](http://fukuchi.org/works/qrencode/) may be used to generate QRCode images for payment requests. Pass the USE_QRCODE flag to qmake to control this: | |||
[libqrencode](http://fukuchi.org/works/qrencode/) may be used to generate QRCode images for payment requests. | |||
QR code support is enabled by default if dependencies are met. | |||
USE_QRCODE=0 (the default) No QRCode support - libarcode not required | |||
USE_QRCODE=1 QRCode support enabled | |||
See the --with-qrencode configure option. | |||
Warnings | |||
--------------------- |
@@ -1,35 +1,18 @@ | |||
Compiling/running bitcoind unit tests | |||
Compiling/running unit tests | |||
------------------------------------ | |||
bitcoind unit tests are in the `src/test/` directory; they | |||
use the Boost::Test unit-testing framework. | |||
Unit tests will be automatically compiled if dependencies were met in configure | |||
and tests weren't explicitly disabled. | |||
To compile and run the tests: | |||
After configuring, they can be run with 'make check'. | |||
cd src | |||
make -f makefile.unix test_bitcoin # Replace makefile.unix if you're not on unix | |||
./test_bitcoin # Runs the unit tests | |||
To run the bitcoind tests manually, launch src/test/test_bitcoin . | |||
If all tests succeed the last line of output will be: | |||
`*** No errors detected` | |||
To add more tests, add `BOOST_AUTO_TEST_CASE` functions to the existing | |||
To add more bitcoind tests, add `BOOST_AUTO_TEST_CASE` functions to the existing | |||
.cpp files in the test/ directory or add new .cpp files that | |||
implement new BOOST_AUTO_TEST_SUITE sections (the makefiles are | |||
set up to add test/*.cpp to test_bitcoin automatically). | |||
Compiling/running Bitcoin-Qt unit tests | |||
--------------------------------------- | |||
Bitcoin-Qt unit tests are in the src/qt/test/ directory; they | |||
use the Qt unit-testing framework. | |||