Tyrant

我是个废人,贪婪、奢侈、懒惰、厌恶水果和运动,我应该被扔进小黑屋,关个3、5、7年,每天吃残羹剩饭,与蛇虫鼠蚁为伴,出来后百毒不侵,顿悟世间之大智慧,在临死前的最后几年,为自己画上辉煌的句号,然后孤独终老,了此残生。

在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!

 

 

posted on 2010-06-21 19:31  Tyrant  阅读(522)  评论(0编辑  收藏  举报

导航