1)下载depot_tools,zip下载不了,直接git clone下

2)depot_tools加环境变量

3)gclient sync

a)python下载安装不了,可以手动安装python2.7.6,复制python.exe到depot_tools

b)git下载安装不了,可以手动安装git,设置环境变量到bin路径

c)sync先会下载chromium.src,有1.5G,如果用gclient sync会老是出错,因为太大了,国内环境大家都懂的。所以推荐使用github客户端来clone,clone下来后重命名到node-webkit/src

d)以后会clone88个工程,这个过程很懊恼,会话很久时间,googlesource.com网络有不是很稳定,所以先自己加个域名解析,会快点,如果是github的项目,建议跟c)一样,用客户端下载后放入目录。这里clone的都是chromium.src下的DEPS.git文件里的配置项目

e)88个项目都clone完成后,gclient会安装llvm/clang,然后编译。我使用的是OS X 11,编译时候老是提示clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later) ,解决方案为修改node_webkit/src/tools/clang/scripts/update.sh MACOSX_DEPLOYMENT_TARGET=10.5 ==> MACOSX_DEPLOYMENT_TARGET=10.7

f)On OSX you’ll see error messages reporting cycle in .gyp file dependency graph detected. It can be ignored because gclient wants to run gyp_chromium without a switch we need. Please move on to the Build section
Error: Command /usr/bin/python src/build/gyp_chromium returned non-zero exit status 1 in /Users/gexin/Documents/nw_workspace/node_webkit
Hook ‘/usr/bin/python src/build/gyp_chromium’ took 42.73 secs

g)cd node-webkit/src
export GYP_GENERATORS=‘ninja’
./build/gyp_chromium content/content.gyp
ninja -C out/Release nw -j4