注意:现在homebrew仓库里有预编译的Qt了。所以现在安装TortoiseHg 比以前快多咯。
注意:已经确认这些步骤适用于TortoiseHg 2.2.2。并且这些步骤还会在妳的应用程序(Applications)文件夹里创建一个应用。
•.通过苹果软件商店(AppStore)来安装X代码(XCode),或者通过https://developer.apple.com/downloads/来安装XCode命令行工具(XCode command line tools)(Homebrew依赖它)
•.安装Homebrew
•.将Homebrew的路径添加到$PATH和$PYTHONPATH中:
# 编辑~/.bash_profile
# 加入以下几行(或者修改它们)
BREW_PREFIX=`brew --prefix`
export PATH=$BREW_PREFIX/share/python:$BREW_PREFIX/bin/:$BREW_PREFIX/sbin:$PATH
export PYTHONPATH=$BREW_PREFIX/lib/python2.7/site-packages:$PYTHONPATH
•.通过homebrew 安装PyQt(这也会自动安装qt 和sip):
$ brew install pyqt
•.通过homebrew 安装QScintilla。
$ brew install qscintilla2
•.安装必要的Python 软件包:
$ sudo easy_install pip
$ sudo pip install -U Pygments iniparse Mercurial
•.下载(Checkout)TortoiseHg(通过Mercurial 来下载):
$ hg clone http://bitbucket.org/tortoisehg/thg/ ~/Documents/TortoiseHg
$ cd ~/Documents/TortoiseHg
$ hg update stable # 或者hg update <版本号>
现在妳应该可以启动TortoiseHg 咯:
$ ./thg log
最后的步骤就是,在妳的Mac OS X 应用程序文件夹中“创建”一个“包装应用程序包”("wrapper app bundle")。只需下载这个仓库,再将其中包含的应用程序包复制到妳的应用程序(Applications)文件夹中就可以了。
注意:如果妳是将TortoiseHg 下载到了~ /Documents/TortoiseHg,那么这个应用程序应该直接就可以工作了。否则,妳就需要读一下这个仓库里所带的那个读我(readme)文件了。
•.如果妳遇到一个错误,说找不到git仓库(missing git repository),那就先试着更新Homebrew: $ brew update
•.如果妳遇到错误,说ImportError: No module named PyQt4.uic.Compiler,那就检查一下Homebrew的Python 路径是否处于$PYTHONPATH中。
徐静蕾
徐静蕾
HxLauncher: Launch Android applications by voice commands