Skip to content

Instantly share code, notes, and snippets.

@chengmu
Created October 23, 2013 11:01
Show Gist options
  • Save chengmu/7116597 to your computer and use it in GitHub Desktop.
Save chengmu/7116597 to your computer and use it in GitHub Desktop.
chrome Xcode记录

其实首先是搞下来源码,放进XCode里。。。

光索引就索引了五遍啊简直泣血。。 ###建立xcode项目

  1. 源码拷贝到本地

  2. 安装gclient(具体参见下文)

  3. 切换目录到home/src_tarball/tarball/chromium/,运行gclient, 这个会自动更新源码生成xcode项目文件:

     $ gclient runhooks
    
  4. 等上述执行完后,找到相应的xcode项目文件(窝启动的是chrome.xcodeobj),启动; XCode会首先建立索引,由于这真的是个超大的项目,所以晚上开着电脑让他自己跑吧。而且就别开别的了。这个中途不能退出。

因为我很苦逼的失败了好多次,中途错误可能导致xcode卡在那进行不下去,办法就是找到那个xcodeproject文件, 查看包内容,把里面一个project.xcworkspace 删掉,重新启动,xcode就会将其作为新项目重新索引。

如果顺利的索引进行完毕的话,那就好啦~~

不过这东西每次打开都会索引。第一次的耗时最大。可以禁掉但是那样子自动补全和跳转就没法子了。

###安装Gclient

####Install depot_tools


Chromium and Chromium OS use a package of scripts called depot_tools to manage checkouts and code reviews. The depot_tools package includes gclient, gcl, git-cl, repo, and others.

  1. depot_tools git到本地

     git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    
  2. 加入path:打开配置文件

     $ touch ~/.bash_profile; open ~/.bash_profile
    

打开后添加export PATH="$PATH":pwd/depot_tools, 然后更新

    $ source ~/.bash_profile

###disable indexing in Xcode $ defaults write com.apple.dt.XCode IDEIndexDisable 1

@Shun87
Copy link

Shun87 commented May 25, 2014

源码再哪里下载阿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment