[Buildbot-commits] [Buildbot] #2108: BuildBot uses incorrect method for default location of Visual Studios
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
Visual Studios 6
Visual Studios 7.1 (aka VS2003)
Visual Studios 9 (aka VS2008)
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:
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.
Ticket URL: <http://trac.buildbot.net/ticket/2108>
Buildbot: build/test automation
More information about the Commits