在Snow leopard (Mac os x 10.6) 上开发Apache Thrift
安装非常简单,执行下面的脚本,注意把log4j jar 的位置改成自己的!
LOG4J_PATH='~/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar'
THRIFT_URL='http://gitweb.thrift-rpc.org/'
THRIFT_PARAMS='?p=thrift.git;a=snapshot;h=HEAD;sf=tgz'
sudo port install boost
sudo port install jakarta-log4j
echo "thrift.extra.cpath = ${LOG4J_PATH}" > ~/.thrift-build.properties
curl "${THRIFT_URL}${THRIFT_PARAMS}" > thrift.tgz
tar xzf thrift.tgz
cd thrift
./bootstrap.sh
./configure --prefix=/opt/local
make
sudo make install
安装Textmate thrift bundle
#!/bin/sh
LC_CTYPE=en_US.UTF-8
SVN=`which svn`
echo Changing to Bundles directory...
mkdir -p "/Library/Application Support/TextMate/Bundles"
cd "/Library/Application Support/TextMate/Bundles"
if [ -d "/Library/Application Support/TextMate/Bundles/Thrift.tmbundle" ]; then
echo Thrift bundle already exists - updating...
$SVN up "Thrift.tmbundle"
else
echo Checking out Thrift bundle...
$SVN --username anon --password anon co "http://svn.textmate.org/trunk/Bundles/Thrift.tmbundle/"
fi
执行完成后记得重启Textmate!
页:
[1]