Windows10下使用VS2019编译Electron--亲自验证
配置环境
Windows 10
Visual Studio 2019 or higher
Python 3.8.0 or higher
pip install pywin32 // 安装python插件
Node.js v18.15.0
git
在vs安装时选择安装Windows SDK v10.0.20384.0
系统卸载列表中选择
windows standard development kit 更改, 添加
Debugging Tools for Windows SDK
建议使用 cmd 管理员模式执行各种命令
配置depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
将该路径添加到path环境变量最前面
执行gclient // 第一次运行会按照很多依赖, 包括msysgit, python
安装 nodejs
在 electron 项目的初始化流程中需要用到 nodejs、yarn 等工具命令,所以 nodejs 是必须的。
当前版本我们使用18.15.0。
安装 nodejs 完成后,全局安装 yarn,执行命令:npm i -g yarn
当然你也可以自己想办法安装