====== 在Mac OS X下编译twister ======
====== 准备工作 ======
从您的系统安装盘或者从苹果[[https://developer.apple.com/xcode/|下载它]] 安装XCode。您应该同样安装 git, 可以通过[[https://mac.github.com/|GitHub]] (OS X 10.7+ only) 或者 [[https://code.google.com/p/git-osx-installer/|Git for OS X]]安。
====== 克隆 twister-core 和 twister-html ======
在您希望安装的目录中执行:
git clone https://github.com/miguelfreitas/twister-core.git
git clone https://github.com/miguelfreitas/twister-html.git
在您的用户和链接ui目录创建Twister的工作目录
mkdir ~/.twister
cd ~/.twister
ln -s /your-dev-directory/twister-html html
====== 介绍 : Macports ======
安装所需的依赖包以编译 Twister:
sudo port install boost db48@+no_java openssl miniupnpc libtool
设置需要的变量环境
export OPENSSL_INCLUDE_PATH=/opt/local/include
export OPENSSL_LIB_PATH=/opt/local/lib/
export BDB_INCLUDE_PATH=/opt/local/include/db48
export BDB_LIB_PATH=/opt/local/lib/db48
export BOOST_INCLUDE_PATH=/opt/local/include
export BOOST_LIB_PATH=/opt/local/lib
export BOOST_LIB_SUFFIX=-mt
export LDFLAGS="-L$OPENSSL_LIB_PATH -L$BDB_LIB_PATH -L$BOOST_LIB_PATH"
export CPPFLAGS="-I$OPENSSL_INCLUDE_PATH -I$BDB_INCLUDE_PATH -I$BOOST_INCLUDE_PATH"
输入您克隆twister-core的目录
cd /your-dev-directory/twister-core
运行twister配置工具并制作twister主程序:
./autotool.sh
./configure --enable-logging
make
现在您可以通过以下命令启动twister了
./twisterd -daemon -rpcuser=user -rpcpassword=pwd -rpcallowip=127.0.0.1
访问 [[http://127.0.0.1:28332/index.html]] 来看到 Twister UI.