From 2b7804271beaf72391d6a792778ac22bd85409d2 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Mon, 3 Aug 2015 14:11:20 -0400 Subject: [PATCH] Added build instructions for OSX --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee4c8acc..c6551d25 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ git clone https://github.com/bitpay/bitcore-node.git cd bitcore-node ``` -And finally run the build which will take several minutes. A script in the "bin" directory will download Bitcoin Core v0.11, apply a shared library patch (see more info below), and compile the shared library and Node.js bindings, and then copy built artifacts and header files into the relevant path in the `platform` directory. Unix/Linux uses the file extension "so" whereas Mac OSX uses "dylib". You can start this by running: +And finally run the build which will take several minutes. A script in the "bin" directory will download Bitcoin Core v0.11, apply a shared library patch (see more info below), and compile the shared library and Node.js bindings, and then copy built artifacts and header files into `platform/ubuntu`. You can start this by running: ```bash npm install @@ -56,7 +56,48 @@ Once everything is built, you can run bitcore-node via: npm start ``` -This will then start the syncing process for Bitcoin Core and the extended capabilities as provided by the built-in Address Module. +This will then start the syncing process for Bitcoin Core and the extended capabilities as provided by the built-in Address Module (details below). + + +### Mac OS X Yosemite + +If Xcode is not already installed, it can be installed via the Mac App Store (will take several minutes). XCode includes "Clang", "git" and other build tools. Once Xcode is installed, you'll then need to install "xcode-select" via running in a terminal and following the prompts: + +```bash +xcode-select --install +``` + +If "Homebrew" is not yet installed, it's needed to install "autoconf" and others. You can install it using the script at http://brew.sh and following the directions at https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Installation.md And then run in a terminal: + +```bash +brew install autoconf automake libtool openssl pkg-config +``` + +If Node.js v0.12 and associated commands "node", "npm" and "nvm" are not already installed, you can use "nvm" by running the script at https://github.com/creationix/nvm#install-script And then run this command to install Node.js v0.12 + +```bash +nvm install v0.12 +``` + +Clone the bitcore-node repository locally: + +```bash +git clone https://github.com/bitpay/bitcore-node.git +cd bitcore-node +``` + +And finally run the build which will take several minutes. A script in the "bin" directory will download Bitcoin Core v0.11, apply a shared library patch (see more info below), and compile the shared library and Node.js bindings, and then copy built artifacts and header files into `platform/osx`. You can start this by running: + +```bash +npm install +``` +Once everything is built, you can run bitcore-node via: + +```bash +npm start +``` + +This will then start the syncing process for Bitcoin Core and the extended capabilities as provided by the built-in Address Module (details below). ## Development & Testing