使用 NSIS 安装程序查找已安装的 MSVC?
我想知道在我的 Nsis 安装过程中是否安装了任何类型的 Microsoft Visual 软件包(我需要这些 Microsoft 软件包中的编译器(C、C++ 编译器))
一种可能是查看注册表...但它总是会是一个不同的条目。
到目前为止,我还没有好的解决方案来检测 MSVC,也许其他人也有?
I would like to find out if any kind of a Microsoft Visual package is installed during my Nsis installation (I need the Compiler from those Microsoft packages (C,C++ Compiler))
One possibility could be to have a look in the registry...but it would always be a different entry.
So far I´ve got no good solution to detect a MSVC maybe anyone else does?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您最好的选择可能是查看注册表。您可以查看一些开源构建工具并了解它们是如何做到的。 (SCons 等)
另一种选择是使用 FindFirst 和朋友在所有驱动器中搜索 cl.exe,但是可能会很慢,您可能必须检查版本信息以过滤掉误报...
Your best bet is probably to look in the registry. You could take a look at some open source build tools and see how they do it. (SCons etc.)
The other alternative would be to search all drives for cl.exe with FindFirst and friends but that could be slow and you would probably have to check the version information to filter out false positives...