wangyu5 / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

MSVC Express Auto Detection on Winx64 #186

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Install Visual C++ 2008 or 2005 express, preferably on a x64 machine.

What is the expected output? What do you see instead?

MSVS_VERSION set to the proper value and appropriate projects generated. 
Instead, it falls back to detecting nothing and the default project (2008 
normal?).

What version of the product are you using? On what operating system?

2005 express, 2008 express, and 2010 express on Windows 7 x64.

Please provide any additional information below.

As mentioned on Chromium IRC:
I think the problem is that there's no installdir key in 
HKLM\Software\Microsoft\VisualStudio\ with express; at least in my x64 machine 
it's in Wow6432Node (since all express versions are 32-bit, in GUI anyway) and 
in the VCExpress key; i.e. 
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VCExpress\9.0 for the default 
case

The VisualStudio key exists, but there's basically left over data from SDK 
installations there with only express editions installed.

The same applies for 2005, 2008 and 2010 (I have all 3 express versions 
installed off and on).

So, the obvious fix seems to be to check the visualstudio key first as it's 
doing now for each version, but instead of immediately going to the next one in 
the loop check the vcexpress key/value in addition in the auto detection.

Original issue reported on code.google.com by rnorto...@gmail.com on 22 Mar 2011 at 2:17

GoogleCodeExporter commented 9 years ago
A bit more detail: In all cases there's only vcexpress.exe, not devenv.exe, in 
the express versions as expected. So, perhaps it can be simplified to check the 
32-bit and 64-bit locations of HKLM\Software\Microsoft\VisualStudio\%version% 
(64-bit with the WoW6432Node) for devenv.exe and then 
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VCExpress\%version% for 
vcexpress.exe for each in-order version.

Original comment by rnorto...@gmail.com on 22 Mar 2011 at 11:13

GoogleCodeExporter commented 9 years ago
Just in case anyone missed it, I made a code review for this - 
http://codereview.chromium.org/6729005/

Original comment by rnorto...@gmail.com on 24 Mar 2011 at 5:42