|
|
@ -59,11 +59,13 @@ Instead, it's enough to make sure the right openssl binary is on your $PATH: |
|
|
|
|
|
|
|
|
|
|
|
1. Clone the github tree to get the source code and go into the directory. |
|
|
|
1. Clone the github tree to get the source code and go into the directory. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
git clone git@github.com:miguelfreitas/twister-core.git |
|
|
|
git clone git@github.com:miguelfreitas/twister-core.git |
|
|
|
cd twister-core |
|
|
|
cd twister-core |
|
|
|
|
|
|
|
|
|
|
|
2. Set system variables to match your environment. THIS IS IMPORTANT! |
|
|
|
2. Set system variables to match your environment. THIS IS IMPORTANT! |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export OPENSSL_INCLUDE_PATH=/usr/local/opt/openssl/include |
|
|
|
export OPENSSL_INCLUDE_PATH=/usr/local/opt/openssl/include |
|
|
|
export OPENSSL_LIB_PATH=/usr/local/opt/openssl/lib |
|
|
|
export OPENSSL_LIB_PATH=/usr/local/opt/openssl/lib |
|
|
|
export BDB_INCLUDE_PATH=/usr/local/opt/berkeley-db4/include |
|
|
|
export BDB_INCLUDE_PATH=/usr/local/opt/berkeley-db4/include |
|
|
@ -75,30 +77,18 @@ Instead, it's enough to make sure the right openssl binary is on your $PATH: |
|
|
|
export CPPFLAGS="-I$OPENSSL_INCLUDE_PATH -I$BDB_INCLUDE_PATH -I$BOOST_INCLUDE_PATH" |
|
|
|
export CPPFLAGS="-I$OPENSSL_INCLUDE_PATH -I$BDB_INCLUDE_PATH -I$BOOST_INCLUDE_PATH" |
|
|
|
export PATH=${BDB_INCLUDE_PATH}:${PATH} |
|
|
|
export PATH=${BDB_INCLUDE_PATH}:${PATH} |
|
|
|
|
|
|
|
|
|
|
|
3. Build libtorrent |
|
|
|
3. Build twister using autotools |
|
|
|
|
|
|
|
|
|
|
|
cd libtorrent |
|
|
|
|
|
|
|
./bootstrap.sh |
|
|
|
|
|
|
|
./configure --enable-logging --enable-debug --enable-dht |
|
|
|
|
|
|
|
make |
|
|
|
|
|
|
|
# note: install is optional, might conflict with existing libtorrent install |
|
|
|
|
|
|
|
make install |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4. Build twisterd. Note: it *will* emit a lot of warnings, but as long as you don't get |
|
|
|
|
|
|
|
actual `error` messages, it should be fine: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd ../ |
|
|
|
|
|
|
|
cd src |
|
|
|
|
|
|
|
make -f makefile.osx |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5. It is a good idea to build and run the unit tests, too: |
|
|
|
./autotools.sh |
|
|
|
|
|
|
|
./configure --enable-logging |
|
|
|
|
|
|
|
make |
|
|
|
|
|
|
|
|
|
|
|
make -f makefile.osx test |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If things go south, before trying again, make sure you clean it up: |
|
|
|
4. If things go south, before trying again, make sure you clean it up: |
|
|
|
|
|
|
|
|
|
|
|
make -f makefile.osx clean |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
make clean |
|
|
|
|
|
|
|
|
|
|
|
If all went well, you should now have a twisterd executable in the src directory. |
|
|
|
If all went well, you should now have a twisterd executable in the src directory. |
|
|
|
See the Running instructions below. |
|
|
|
See the Running instructions below. |
|
|
@ -112,21 +102,15 @@ Installing the dependencies using MacPorts is very straightforward. |
|
|
|
|
|
|
|
|
|
|
|
sudo port install boost db48@+no_java openssl miniupnpc |
|
|
|
sudo port install boost db48@+no_java openssl miniupnpc |
|
|
|
|
|
|
|
|
|
|
|
### Building `twisterd` |
|
|
|
Once installed dependencies, do: |
|
|
|
|
|
|
|
|
|
|
|
1. Clone the github tree to get the source code and go into the directory. |
|
|
|
./autotools.sh |
|
|
|
|
|
|
|
./configure --enable-logging |
|
|
|
git clone git@github.com:miguelfreitas/twister-core.git |
|
|
|
make |
|
|
|
cd twister-core |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2. Build twisterd: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd src |
|
|
|
|
|
|
|
make -f makefile.osx |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3. It is a good idea to build and run the unit tests, too: |
|
|
|
If things go south, before trying again, make sure you clean it up: |
|
|
|
|
|
|
|
|
|
|
|
make -f makefile.osx test |
|
|
|
make clean |
|
|
|
|
|
|
|
|
|
|
|
Running |
|
|
|
Running |
|
|
|
------- |
|
|
|
------- |
|
|
@ -137,7 +121,7 @@ directory. We have to first create the RPC configuration file, though. |
|
|
|
Run `./twisterd` to get the filename where it should be put, or just try these |
|
|
|
Run `./twisterd` to get the filename where it should be put, or just try these |
|
|
|
commands: |
|
|
|
commands: |
|
|
|
|
|
|
|
|
|
|
|
echo -e "rpcuser=user\nrpcpassword=pwd" > "/Users/${USER}/.twister/twister.conf" |
|
|
|
echo -e "rpcuser=user\nrpcpassword=pwd\nrpcallowip=127.0.0.1" > "/Users/${USER}/.twister/twister.conf" |
|
|
|
chmod 600 "/Users/${USER}/.twister/twister.conf" |
|
|
|
chmod 600 "/Users/${USER}/.twister/twister.conf" |
|
|
|
|
|
|
|
|
|
|
|
When next you run it, it will start downloading the blockchain, but it won't |
|
|
|
When next you run it, it will start downloading the blockchain, but it won't |
|
|
@ -155,3 +139,5 @@ In order to get the HTML interface, you'll have to download it and link it in .t |
|
|
|
|
|
|
|
|
|
|
|
git clone git@github.com:miguelfreitas/twister-html.git |
|
|
|
git clone git@github.com:miguelfreitas/twister-html.git |
|
|
|
ln -s twister-html /Users/${USER}/.twister/html |
|
|
|
ln -s twister-html /Users/${USER}/.twister/html |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Once you do that, it will be available at http://localhost:28332/home.html |
|
|
|