gyp

参考:

http://erikge.com/articles/HelloGyp/

https://gyp.gsrc.io/

http://lianliuwei.github.io/tools/2012/09/10/gyp-misc/

https://chromium.googlesource.com/external/gyp



GYP (Generate Your Projects)下载:

git clone https://chromium.googlesource.com/external/gyp


GYP 依赖于 Python,在 Windows 上使用 GYP 之前,请确保安装了 Python

注意:Python msi 安装文件执行完毕后,在命令行中未必能直接使用,请确保环境变量中配置了 Python 的目录


GYP 安装:


cd 
python setup.py install



确保 npm 已经安装。如果没有安装,则从 https://nodejs.org/en/ 下载安装。否则,可能会在执行类似下面命令时

/c/x-work/webrtc/gyp/gyp --depth=. --generator-output=build -f msvs binding.gyp

遇到类似下面的错误

module.js:341
    throw err;
    ^

Error: Cannot find module 'nan'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at [eval]:1:1
    at Object.exports.runInThisContext (vm.js:54:17)
    at Object. ([eval]-wrapper:6:22)
    at Module._compile (module.js:413:34)
    at node.js:544:27
    at _combinedTickCallback (node.js:370:9)
gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp.




...





你可能感兴趣的:(gyp)