1.如果Mac上安装了多个Xcode,则需要使用xcode-select命令指定一个XCode,即Theos默认使用的Xcode。建设安装了3个Xcode,并将它们分别命名为Xcode1.app,Xcode2.app,Xocde3.app,如果要指定Xcode3.app为默认Xcode,则需要运行如下命令
sudo xcode-select - s /Applications/Xcode3.app/Contents/Developer
如果只安装了一个Xcode则直接跳到第二步
2.安装dpkg和ldid(使用brew安装)如果电脑没有安装brew,请自行百度brew安装,执行以下命令安装dpkg和ldid
brew install dpkg ldid

3.安装Theos,使用git命令
sudo Git clone --recursivehttps://github.com/theos/theos.git/opt/theos

4.把/opt/theos的权限改成自己的 执行以下命令
sudo chown $(id -u):$(id -g) /opt/theos

5.把Theos的执行路径加入到环境变量中,执行如下命令
open~/.bash_profile
把export THEOS="/opt/theos” 添加到.bash_profile文件中

6.测试Theos是否安装成功,在任意路径下执行以下命令(/opt/theos路径除外)
/opt/theos/bin/nic.pl

7.出现如下图情况 则证明 tweak工程创建成功

8.到此Theos已安装完成。
网友评论