[Buildbot-devel] vstudio step: patch 1
Oleg Smolsky
oleg at smolsky.net
Tue Sep 25 15:24:01 UTC 2012
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20120925/e5b2a190/attachment.html>
-------------- next part --------------
--- vstudio.py.orig 2012-09-19 11:10:00.000000000 -0700
+++ vstudio.py 2012-09-25 08:15:17.000000000 -0700
@@ -92,19 +96,21 @@
projectfile = None
config = None
+ platform = None
useenv = False
project = None
PATH = []
INCLUDE = []
LIB = []
- renderables = [ 'projectfile', 'config', 'project' ]
+ renderables = [ 'projectfile', 'config', 'platform', 'project' ]
def __init__(self,
installdir = None,
mode = "rebuild",
projectfile = None,
config = None,
+ platform = None,
useenv = False,
project = None,
INCLUDE = [],
@@ -115,6 +121,7 @@
self.mode = mode
self.projectfile = projectfile
self.config = config
+ self.platform = platform
self.useenv = useenv
self.project = project
if len(INCLUDE) > 0:
@@ -132,6 +139,7 @@
mode = mode,
projectfile = projectfile,
config = config,
+ platform = platform,
useenv = useenv,
project = project,
INCLUDE = INCLUDE,
@@ -270,7 +278,7 @@
addEnvPath(cmd.args['env'], "LIB", VCInstallDir + '\\SDK\\v1.1\\lib')
def start(self):
- command = ["devenv.com"]
+ command = ["devenv"]
command.append(self.projectfile)
if self.mode == "rebuild":
command.append("/Rebuild")
@@ -363,3 +371,33 @@
default_installdir = 'C:\\Program Files\\Microsoft Visual Studio 10.0'
VS2010 = VC10
+
+class MsBuild(VC10):
+ def setupEnvironment(self, cmd):
+ VisualStudio.setupEnvironment(self, cmd)
+ cmd.args['env']['VCENV_BAT'] = "\"${VS110COMNTOOLS}..\\..\\VC\\vcvarsall.bat\""
+
+ def describe(self, done=False):
+ s = "building "
+ if done:
+ s = "built "
+ if self.project is not None:
+ s += "%s for %s|%s" % (self.project, self.config, self.platform)
+ else:
+ s += "solution for %s|%s" % (self.config, self.platform)
+ return s.split()
+
+ def start(self):
+ command = ["%VCENV_BAT%"]
+ command.append("x86")
+ command.append("&&")
+ command.append("msbuild")
+ command.append(self.projectfile)
+ command.append("/p:Configuration=%s" % (self.config))
+ command.append("/p:Platform=%s" % (self.platform))
+ if self.project is not None:
+ command.append("/t:%s" % (self.project))
+
+ self.setCommand(command)
+
+ return VisualStudio.start(self)
More information about the devel
mailing list