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
src/bitcoin
src/bitcoind
src/bitcoin-cli
src/zcashd
src/zcash-cli
src/bitcoin-tx
src/test/test_bitcoin
src/qt/test/test_bitcoin-qt
@ -55,7 +55,7 @@ src/qt/test/moc*.cpp
*.o
*.o-*
*.patch
.bitcoin
.zcash
*.a
*.pb.cc
*.pb.h

4
Makefile.am

@ -9,9 +9,9 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libbitcoinconsensus.pc
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_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)
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
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
DATADIR="@abs_top_builddir@/.bitcoin"
DATADIR="@abs_top_builddir@/.zcash"
rm -rf "$DATADIR"
mkdir -p "$DATADIR"/regtest
touch "$DATADIR/regtest/debug.log"
tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
WAITER=$!
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=$!
#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_BITCOIND_TRUE@ENABLE_BITCOIND=1
REAL_BITCOIND="$BUILDDIR/src/bitcoind${EXEEXT}"
REAL_BITCOINCLI="$BUILDDIR/src/bitcoin-cli${EXEEXT}"
REAL_BITCOIND="$BUILDDIR/src/zcashd${EXEEXT}"
REAL_BITCOINCLI="$BUILDDIR/src/zcash-cli${EXEEXT}"

30
src/Makefile.am

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

14
src/util.cpp

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

Loading…
Cancel
Save