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

Hans Wennborg hans at chromium.org
Thu Oct 10 11:56:36 PDT 2013


On Thu, Oct 10, 2013 at 1:02 AM, Yaron Keren <yaron.keren at gmail.com> wrote:
> Hi Hans,
>
> Frankly, the function is not coded well. I just modified the logic but it's
> worth a rewrite if someone has the time.
>
> I do not have commit access, please commit.

I've committed this in r192374.

Thanks,
Hans

> 2013/10/10 Hans Wennborg <hans at chromium.org>
>>
>> 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