您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. Mac OS X Build Instructions and Notes
  2. ====================================
  3. The commands in this guide should be executed in a Terminal application.
  4. The built-in one is located in `/Applications/Utilities/Terminal.app`.
  5. Preparation
  6. -----------
  7. Install the OS X command line tools:
  8. `xcode-select --install`
  9. When the popup appears, click `Install`.
  10. Then install [Homebrew](https://brew.sh).
  11. Dependencies
  12. ----------------------
  13. brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config protobuf qt libevent
  14. If you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG
  15. brew install librsvg
  16. NOTE: Building with Qt4 is still supported, however, could result in a broken UI. Building with Qt5 is recommended.
  17. Build Bitcoin Core
  18. ------------------------
  19. 1. Clone the bitcoin source code and cd into `bitcoin`
  20. git clone https://github.com/bitcoin/bitcoin
  21. cd bitcoin
  22. 2. Build bitcoin-core:
  23. Configure and build the headless bitcoin binaries as well as the GUI (if Qt is found).
  24. You can disable the GUI build by passing `--without-gui` to configure.
  25. ./autogen.sh
  26. ./configure
  27. make
  28. 3. It is recommended to build and run the unit tests:
  29. make check
  30. 4. You can also create a .dmg that contains the .app bundle (optional):
  31. make deploy
  32. Running
  33. -------
  34. Bitcoin Core is now available at `./src/bitcoind`
  35. Before running, it's recommended you create an RPC configuration file.
  36. echo -e "rpcuser=bitcoinrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
  37. chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
  38. The first time you run bitcoind, it will start downloading the blockchain. This process could take several hours.
  39. You can monitor the download process by looking at the debug.log file:
  40. tail -f $HOME/Library/Application\ Support/Bitcoin/debug.log
  41. Other commands:
  42. -------
  43. ./src/bitcoind -daemon # Starts the bitcoin daemon.
  44. ./src/bitcoin-cli --help # Outputs a list of command-line options.
  45. ./src/bitcoin-cli help # Outputs a list of RPC commands when the daemon is running.
  46. Using Qt Creator as IDE
  47. ------------------------
  48. You can use Qt Creator as an IDE, for bitcoin development.
  49. Download and install the community edition of [Qt Creator](https://www.qt.io/download/).
  50. Uncheck everything except Qt Creator during the installation process.
  51. 1. Make sure you installed everything through Homebrew mentioned above
  52. 2. Do a proper ./configure --enable-debug
  53. 3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project
  54. 4. Enter "bitcoin-qt" as project name, enter src/qt as location
  55. 5. Leave the file selection as it is
  56. 6. Confirm the "summary page"
  57. 7. In the "Projects" tab select "Manage Kits..."
  58. 8. Select the default "Desktop" kit and select "Clang (x86 64bit in /usr/bin)" as compiler
  59. 9. Select LLDB as debugger (you might need to set the path to your installation)
  60. 10. Start debugging with Qt Creator
  61. Notes
  62. -----
  63. * Tested on OS X 10.8 through 10.12 on 64-bit Intel processors only.
  64. * Building with downloaded Qt binaries is not officially supported. See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714)