Browse Source

Rename .bitcoin (DataDir), bitcoind, and bitcoin-cli.

pull/145/head
Taylor Hornby 9 years ago
parent
commit
8a18333567
  1. 6
      .gitignore
  2. 4
      Makefile.am
  3. 4
      qa/pull-tester/run-bitcoind-for-test.sh.in
  4. 4
      qa/pull-tester/tests-config.sh.in
  5. 30
      src/Makefile.am
  6. 14
      src/util.cpp

6
.gitignore

@ -2,8 +2,8 @@
*.exe *.exe
src/bitcoin src/bitcoin
src/bitcoind src/zcashd
src/bitcoin-cli src/zcash-cli
src/bitcoin-tx src/bitcoin-tx
src/test/test_bitcoin src/test/test_bitcoin
src/qt/test/test_bitcoin-qt src/qt/test/test_bitcoin-qt
@ -55,7 +55,7 @@ src/qt/test/moc*.cpp
*.o *.o
*.o-* *.o-*
*.patch *.patch
.bitcoin .zcash
*.a *.a
*.pb.cc *.pb.cc
*.pb.h *.pb.h

4
Makefile.am

@ -9,9 +9,9 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libbitcoinconsensus.pc pkgconfig_DATA = libbitcoinconsensus.pc
endif endif
BITCOIND_BIN=$(top_builddir)/src/bitcoind$(EXEEXT) BITCOIND_BIN=$(top_builddir)/src/zcashd$(EXEEXT)
BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT) BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT)
BITCOIN_CLI_BIN=$(top_builddir)/src/bitcoin-cli$(EXEEXT) BITCOIN_CLI_BIN=$(top_builddir)/src/zcash-cli$(EXEEXT)
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT) BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
OSX_APP=Bitcoin-Qt.app OSX_APP=Bitcoin-Qt.app

4
qa/pull-tester/run-bitcoind-for-test.sh.in

@ -3,14 +3,14 @@
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
# #
DATADIR="@abs_top_builddir@/.bitcoin" DATADIR="@abs_top_builddir@/.zcash"
rm -rf "$DATADIR" rm -rf "$DATADIR"
mkdir -p "$DATADIR"/regtest mkdir -p "$DATADIR"/regtest
touch "$DATADIR/regtest/debug.log" touch "$DATADIR/regtest/debug.log"
tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" & tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
WAITER=$! WAITER=$!
PORT=`expr 10000 + $$ % 55536` PORT=`expr 10000 + $$ % 55536`
"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -checkmempool=0 -relaypriority=0 -port=$PORT -whitelist=127.0.0.1 -regtest -rpcport=`expr $PORT + 1` & "@abs_top_builddir@/src/zcashd@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -checkmempool=0 -relaypriority=0 -port=$PORT -whitelist=127.0.0.1 -regtest -rpcport=`expr $PORT + 1` &
BITCOIND=$! BITCOIND=$!
#Install a watchdog. #Install a watchdog.

4
qa/pull-tester/tests-config.sh.in

@ -11,6 +11,6 @@ EXEEXT="@EXEEXT@"
@BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=1 @BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=1
@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=1 @BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=1
REAL_BITCOIND="$BUILDDIR/src/bitcoind${EXEEXT}" REAL_BITCOIND="$BUILDDIR/src/zcashd${EXEEXT}"
REAL_BITCOINCLI="$BUILDDIR/src/bitcoin-cli${EXEEXT}" REAL_BITCOINCLI="$BUILDDIR/src/zcash-cli${EXEEXT}"

30
src/Makefile.am

@ -60,11 +60,11 @@ bin_PROGRAMS =
TESTS = TESTS =
if BUILD_BITCOIND if BUILD_BITCOIND
bin_PROGRAMS += bitcoind bin_PROGRAMS += zcashd
endif endif
if BUILD_BITCOIN_UTILS if BUILD_BITCOIN_UTILS
bin_PROGRAMS += bitcoin-cli bitcoin-tx bin_PROGRAMS += zcash-cli bitcoin-tx
endif endif
.PHONY: FORCE .PHONY: FORCE
@ -307,15 +307,15 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
# #
# bitcoind binary # # bitcoind binary #
bitcoind_SOURCES = bitcoind.cpp zcashd_SOURCES = bitcoind.cpp
bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES) zcashd_CPPFLAGS = $(BITCOIN_INCLUDES)
bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) zcashd_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
if TARGET_WINDOWS if TARGET_WINDOWS
bitcoind_SOURCES += bitcoind-res.rc zcashd_SOURCES += bitcoind-res.rc
endif endif
bitcoind_LDADD = \ zcashd_LDADD = \
$(LIBBITCOIN_SERVER) \ $(LIBBITCOIN_SERVER) \
$(LIBBITCOIN_COMMON) \ $(LIBBITCOIN_COMMON) \
$(LIBBITCOIN_UNIVALUE) \ $(LIBBITCOIN_UNIVALUE) \
@ -326,26 +326,26 @@ bitcoind_LDADD = \
$(LIBSECP256K1) $(LIBSECP256K1)
if ENABLE_WALLET if ENABLE_WALLET
bitcoind_LDADD += libbitcoin_wallet.a zcashd_LDADD += libbitcoin_wallet.a
endif endif
bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) zcashd_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
# #
# bitcoin-cli binary # # bitcoin-cli binary #
bitcoin_cli_SOURCES = bitcoin-cli.cpp zcash_cli_SOURCES = bitcoin-cli.cpp
bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES) zcash_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) zcash_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
if TARGET_WINDOWS if TARGET_WINDOWS
bitcoin_cli_SOURCES += bitcoin-cli-res.rc zcash_cli_SOURCES += bitcoin-cli-res.rc
endif endif
bitcoin_cli_LDADD = \ zcash_cli_LDADD = \
$(LIBBITCOIN_CLI) \ $(LIBBITCOIN_CLI) \
$(LIBBITCOIN_UTIL) $(LIBBITCOIN_UTIL)
bitcoin_cli_LDADD += $(BOOST_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) zcash_cli_LDADD += $(BOOST_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
# #
# bitcoin-tx binary # # bitcoin-tx binary #

14
src/util.cpp

@ -402,13 +402,13 @@ void PrintExceptionContinue(const std::exception* pex, const char* pszThread)
boost::filesystem::path GetDefaultDataDir() boost::filesystem::path GetDefaultDataDir()
{ {
namespace fs = boost::filesystem; namespace fs = boost::filesystem;
// Windows < Vista: C:\Documents and Settings\Username\Application Data\Bitcoin // Windows < Vista: C:\Documents and Settings\Username\Application Data\Zcash
// Windows >= Vista: C:\Users\Username\AppData\Roaming\Bitcoin // Windows >= Vista: C:\Users\Username\AppData\Roaming\Zcash
// Mac: ~/Library/Application Support/Bitcoin // Mac: ~/Library/Application Support/Zcash
// Unix: ~/.bitcoin // Unix: ~/.zcash
#ifdef WIN32 #ifdef WIN32
// Windows // Windows
return GetSpecialFolderPath(CSIDL_APPDATA) / "Bitcoin"; return GetSpecialFolderPath(CSIDL_APPDATA) / "Zcash";
#else #else
fs::path pathRet; fs::path pathRet;
char* pszHome = getenv("HOME"); char* pszHome = getenv("HOME");
@ -420,10 +420,10 @@ boost::filesystem::path GetDefaultDataDir()
// Mac // Mac
pathRet /= "Library/Application Support"; pathRet /= "Library/Application Support";
TryCreateDirectory(pathRet); TryCreateDirectory(pathRet);
return pathRet / "Bitcoin"; return pathRet / "Zcash";
#else #else
// Unix // Unix
return pathRet / ".bitcoin"; return pathRet / ".zcash";
#endif #endif
#endif #endif
} }

Loading…
Cancel
Save