lc-soft / LCUI

C library for building user interfaces
https://lcui-dev.github.io
MIT License
4.13k stars 356 forks source link

通过注册表查询VS路径并不准确 #228

Closed SW-Fantastic closed 3 years ago

SW-Fantastic commented 3 years ago

Describe the bug 实际上,Windows环境下,build需要的是VisualStudio的VC路径,这个和具体某个版本关系不大,即使不是VS2017,只要安装了相应的buildTool就可以完成构建,所以我建议msbuild中使用之前发现的VisualStudio的路径,不要在查询注册表。

我安装的是vs2019,并且追加了支持xp的相应buildtool,而msbuild无法正确构建,将查询注册表的function的返回值直接改为VS2019的vc文件夹的地址,则构建顺利成功。

To Reproduce 下面步骤可以复现:

  1. 安装VS2019
  2. 安装VS xp的buildTools
  3. 初始化一个lcui的project,然后执行npm run start

Expected behavior 查询注册表应当返回VS安装路径,但是并没有

Screenshots image

Environment (please complete the following information):

lc-soft commented 3 years ago

嗯,构建脚本中的检测 msbuild 的代码是多余的,应该用 cmake --build . 命令代替。