[PATCH]Locate Visual Studio InstallDir in the presence of newer runtime

Hans Wennborg hans at chromium.org
Wed Oct 9 18:16:46 PDT 2013


On Sat, Oct 5, 2013 at 3:27 PM, Yaron Keren <yaron.keren at gmail.com> wrote:
> getSystemRegistryString is used to find the newest Visual Studio
> installation. The existing logic is:
> 1) Find newest Visual Studio
> 2) For the newest, check if there InstallDir
>
> This logic fails after installing a Visual Studio Runtime which is newer
> than the install Visual Studio IDE. In such case, 1) find the newer runtime
> which does not have InstallDir since it's not the IDE.
>
> To handle such situations, a combined logic implemented in this patch is:
> Find newest Visual Studio for which InstallDir exists.
>
> In addition, I renamed a local variable named value to dvalue since it was
> shadowing an outer local variable named value.
>
> This was tested on a machine where VS 2012 IDE + VS 2013 runtime are
> installed.

Looks OK to me. (I really do wish this function was less hairy though..)

Do you have commit access, or would you like me to commit it for you?

Thanks,
Hans



More information about the cfe-commits mailing list