[Buildbot-commits] [Buildbot] #2108: BuildBot uses incorrect method for default location of Visual Studios
Buildbot
nobody at buildbot.net
Tue Sep 20 16:13:04 UTC 2011
#2108: BuildBot uses incorrect method for default location of Visual Studios
--------------------------+-----------------------
Reporter: TemporalBeing | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone: undecided
Version: 0.8.5 | Keywords:
--------------------------+-----------------------
Buildbot presently uses a hard coded value for the default location of
Visual Studios. This means that the user would need to use the
'installdir' parameter to the VS builders whenever they (i) install to a
different drive, (ii) install to a different directory. This could be very
common, especially on computers that have multiple OSes installed.
Fortunately, Microsoft did provide a nice way around this issue - look to
the Windows Registry. Personally I have done this for scripting for VS6,
VS2003, and VS2008 in which I can report the following registry keys work
very well:
Visual Studios 6
HKLM\Software\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual
C++\ProductDir
Visual Studios 7.1 (aka VS2003)
HKLM\Software\Microsoft\VisualStudio\7.1\Setup\VS\VS7CommonBinDir
Visual Studios 9 (aka VS2008)
HKLM\Software\Microsoft\VisualStudio\9.0\Setup\VS\VS7CommonBinDir
We should be able to use the pattern above (for VS7/9) for a starting
point for later versions at the very least, using the following pattern:
HKLM\Software\Microsoft\VisualStudios\<Version>\Setup\VS\VS7CommonBinDir
Doing this provides two major benefits:
1) Default is now the default of the installed version of Visual Studios.
So 'installdir' is only useful in very weird installations (such as having
custom built installations or multiple installations of the same version
on the same system, etc.)
2) Buildbot can now provide a check to see if the requested version of VS
is installed prior to attempting the build, and provide a good error
message if it is not (something like VS2008 is not installed on the
buildSlave) as opposed to simply reporting that the build program (e.g.
devenv.com or msbuild) was not found in the path.
The only potential problem is the client-server approach of Buildbot since
the registry would need to be read on the build slave instead of the build
master. This could provide some challenges to implementation.
PyWin32 provides support for accessing the registry via the the win32api
module, which seems to use the same interfaces as VC++ code so it should
be pretty straight forward. Python also natively supports the Windows
Registry via the _winreg (2.x) and winreg (3.x) modules.
http://docs.python.org/library/_winreg.html
http://docs.activestate.com/activepython/2.7/pywin32/win32api.html
--
Ticket URL: <http://trac.buildbot.net/ticket/2108>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the Commits
mailing list