记录下 node 生成 sln过程

查阅资料整理个人编译过程,下面有使用其它博客内容

使用步骤 也可以参照 github:

https://github.com/nodejs/node/blob/master/BUILDING.md#windows-1

1. 从 github 同步 

https://github.com/nodejs/node

2.安装 python 2.7 或者 2.6

https://www.python.org/downloads/

当然, 如果有Python 环境, 就跳过好了

3. 修改 common.gypi

直接把下面红色部分插入common.gypi中保存即可

下面是修改的部分(红色粗体字,变量值是我自己的缺少设置,可以改), 文件在主目录下

{
  'variables': {
    'asan%': 0,
    'werror': '',                     # Turn off -Werror in V8 build.
    'visibility%': 'hidden',          # V8's visibility setting
    'target_arch%': 'ia32',           # set v8's target architecture
    'host_arch%': 'ia32',             # set v8's host architecture
    'want_separate_host_toolset%': 0, # V8 should not build target and host
    'library%': 'static_library',     # allow override to 'shared_library' for DLL/.so builds
    'component%': 'static_library',   # NB. these names match with what V8 expects
    'msvs_multi_core_compile': '0',   # we do enable multicore compiles, but not using the V8 way
    'python%': 'python',

    'node_shared': 'false',
    'node_enable_d8': 'false',
    'v8_enable_inspector': 1,
    'v8_enable_i18n_support': 'true',
    'debug_http2': 1,
    'debug_nghttp2': 1,
    'node_use_openssl': 'false',
    'node_shared_openssl': 'true',
    'openssl_fips': '',
    'node_release_urlbase': '',

    
    'node_shared%': 'false',
    'force_dynamic_crt%': 0,
    'node_use_v8_platform%': 'true',
    'node_use_bundled_v8%': 'true',
    'node_module_version%': '',
.....

4. 生成 解决方案 

一般来说,使用 gyp 生成 VS 的解决方案的, 都是 使用类似的 命令行: 

"gyp_XXXX.py  -Dtarget_arch=x64 -f msvs"    XXXX 就是工程/解决方案名,例如 V8的 就是 gyp_V8.gyp; Node的就是gyp_node.gyp
tools>gyp_node.py  -Dtarget_arch=x64 -f msvs

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值