Skip to content

Commit

Permalink
Merge branch 'bug986'
Browse files Browse the repository at this point in the history
* bug986:
  insalldir ends in '9.0', not '9'
  give VC9 its own default installdir

Fixes #986
  • Loading branch information
Dustin J. Mitchell committed Oct 4, 2010
2 parents ee5322e + 4b5523e commit 4172492
Showing 1 changed file with 20 additions and 25 deletions.
45 changes: 20 additions & 25 deletions master/buildbot/steps/vstudio.py
Expand Up @@ -68,6 +68,7 @@ class VisualStudio(ShellCommand):
logobserver = None

installdir = None
default_installdir = None

# One of build, or rebuild
mode = "rebuild"
Expand Down Expand Up @@ -127,6 +128,10 @@ def setupLogfiles(self, cmd, logfiles):
ShellCommand.setupLogfiles(self, cmd, logfiles)


def setupInstalldir(self):
if not self.installdir:
self.installdir = self.default_installdir

def setupEnvironment(self, cmd):
ShellCommand.setupEnvironment(self, cmd)
if cmd.args['env'] is None:
Expand All @@ -140,6 +145,7 @@ def setupEnvironment(self, cmd):
for path in self.LIB:
addEnvPath(cmd.args['env'], "LIB", path)

self.setupInstalldir()

def describe(self, done=False):
description = ShellCommand.describe(self, done)
Expand Down Expand Up @@ -175,6 +181,8 @@ def finished(self, result):

class VC6(VisualStudio):

default_installdir = 'C:\\Program Files\\Microsoft Visual Studio'

def __init__(self, **kwargs):

# always upcall !
Expand All @@ -183,17 +191,11 @@ def __init__(self, **kwargs):
def setupEnvironment(self, cmd):
VisualStudio.setupEnvironment(self, cmd)

if self.installdir:
installdir = self.installdir
else:
installdir = 'C:\\Program Files\\Microsoft Visual Studio'

# Root of Visual Developer Studio Common files.
VSCommonDir = installdir + '\\Common'
MSVCDir = installdir + '\\VC98'
VSCommonDir = seif.installdir + '\\Common'
MSVCDir = seif.installdir + '\\VC98'
MSDevDir = VSCommonDir + '\\msdev98'


addEnvPath(cmd.args['env'], "PATH", MSDevDir + '\\BIN')
addEnvPath(cmd.args['env'], "PATH", MSVCDir + '\\BIN')
addEnvPath(cmd.args['env'], "PATH", VSCommonDir + '\\TOOLS\\WINNT')
Expand Down Expand Up @@ -230,14 +232,9 @@ def __init__(self, **kwargs):
def setupEnvironment(self, cmd):
VisualStudio.setupEnvironment(self, cmd)

if self.installdir:
installdir = self.installdir
else:
installdir = 'C:\\Program Files\\Microsoft Visual Studio .NET 2003'

VSInstallDir = installdir + '\\Common7\\IDE'
VCInstallDir = installdir
MSVCDir = installdir + '\\VC7'
VSInstallDir = self.installdir + '\\Common7\\IDE'
VCInstallDir = self.installdir
MSVCDir = self.installdir + '\\VC7'

addEnvPath(cmd.args['env'], "PATH", VSInstallDir)
addEnvPath(cmd.args['env'], "PATH", MSVCDir + '\\BIN')
Expand Down Expand Up @@ -274,6 +271,7 @@ class VC8(VisualStudio):

# Our ones
arch = "x86"
default_installdir = 'C:\\Program Files\\Microsoft Visual Studio 8'

def __init__(self, arch = "x86", **kwargs):
self.arch = arch
Expand All @@ -285,13 +283,8 @@ def __init__(self, arch = "x86", **kwargs):
def setupEnvironment(self, cmd):
VisualStudio.setupEnvironment(self, cmd)

if self.installdir:
installdir = self.installdir
else:
installdir = 'C:\\Program Files\\Microsoft Visual Studio 8'

VSInstallDir = installdir
VCInstallDir = installdir + '\\VC'
VSInstallDir = self.installdir
VCInstallDir = self.installdir + '\\VC'

addEnvPath(cmd.args['env'], "PATH", VSInstallDir + '\\Common7\\IDE')
if self.arch == "x64":
Expand Down Expand Up @@ -347,6 +340,8 @@ def start(self):
self.setCommand(command)
return VisualStudio.start(self)

# Add first support for VC9 (Same as VC8)
VC9 = VC8
# Add first support for VC9 (Same as VC8, with a different installdir)
class VC9(VC8):
default_installdir = 'C:\\Program Files\\Microsoft Visual Studio 9.0'

VS2008 = VC9

0 comments on commit 4172492

Please sign in to comment.