这里会显示出您选择的修订版和当前版本之间的差别。
— |
zh:使用:如何:在mac_os_x下编译twister [2014/09/28 03:18] (当前版本) xiaolan 创建 |
||
---|---|---|---|
行 1: | 行 1: | ||
+ | ====== 在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 ====== | ||
+ | |||
+ | 在您希望安装的目录中执行: | ||
+ | |||
+ | <code>git clone https://github.com/miguelfreitas/twister-core.git | ||
+ | git clone https://github.com/miguelfreitas/twister-html.git</code> | ||
+ | |||
+ | 在您的用户和链接ui目录创建Twister的工作目录 | ||
+ | |||
+ | <code>mkdir ~/.twister | ||
+ | cd ~/.twister | ||
+ | ln -s /your-dev-directory/twister-html html</code> | ||
+ | |||
+ | ====== 介绍 : Macports ====== | ||
+ | |||
+ | 安装所需的依赖包以编译 Twister: | ||
+ | |||
+ | <code>sudo port install boost db48@+no_java openssl miniupnpc libtool</code> | ||
+ | |||
+ | 设置需要的变量环境 | ||
+ | |||
+ | <code> | ||
+ | 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" | ||
+ | </code> | ||
+ | |||
+ | 输入您克隆twister-core的目录 | ||
+ | |||
+ | <code>cd /your-dev-directory/twister-core</code> | ||
+ | |||
+ | 运行twister配置工具并制作twister主程序: | ||
+ | |||
+ | <code>./autotool.sh | ||
+ | ./configure --enable-logging | ||
+ | make</code> | ||
+ | |||
+ | 现在您可以通过以下命令启动twister了 | ||
+ | |||
+ | <code>./twisterd -daemon -rpcuser=user -rpcpassword=pwd -rpcallowip=127.0.0.1</code> | ||
+ | |||
+ | 访问 [[http://127.0.0.1:28332/index.html]] 来看到 Twister UI. | ||