[Buildbot-devel] BuildBot & Visual Studios....

Dmitry Nezhevenko dion at dion.org.ua
Fri Sep 23 13:42:27 UTC 2011


On Fri, Sep 23, 2011 at 01:33:30PM +0200, Benoît Allard wrote:
> I looked a bit at Dimitry's step, looks like they are built on top
> of the current vstudio steps. I don't think we should replace the
> one with the others though.

Yeah. They are actually "copy/paste" of code from original step with some
changes to avoid hardcoded paths.
 
> We should make the current steps more configurable. Add a parameter
> to decide on which build binary should be invoked (msdev, devenv,
> vcbuild or msbuild), and then smartly build the command line based
> on the above choice from the same set of parameters looks like the
> best approach to me.

From my point of view, it's better to have dedicated VCBuild(), DevEnv()
and MSBuild() steps. They can have common base class...

> I also agree with Ben about not relying too much on env variables,
> I'd rather pick the installdir from the registry.

Why? It's pretty standard way to retrieve install directory from scripts. 

> Same, I rather set
> the right env variables myself than relying on vcvarsall.bat, that
> way everything is kept under buildbot's control and can be exactly
> replayed again.

vcvarsall.bat is also documented way to do this:
	http://msdn.microsoft.com/en-us/library/x4d2c09s(v=vs.80).aspx

If we're talking that everything should be under buildbot's control, then
it probably should unpack VS (or even reinstall OS) for every build...

> Dimitry, can you send me the output of the "set" command once you
> ran vcvarsall.bat from VC9 (with both possible parameters) ? I
> thought I had it installed over there, and cannot find it ... VC9
> and VC10 from vstudio.py needs an update on that point.

It's actually not two possible cases... There is also ia64, x86_amd64,
x86_ia64. VS2011 preview already contains three "arm" variants.

The first issue with vstudio.py is that on 64bit versions of Windows, even
for drive "c:", VS will be installed to Program Files (x86).

Anyway I'm attaching diff between original env and after vcvarsall for
"x86" and "x64" architectures. But please, do NOT try to emulate vcvarsall
behavior (like doing same changes). vcvarsall may be changed. It's
behavior also changes if WinSDK in installed.

vcvarsall is _documented_ and _official_ way to get compiler shell on
Windows.

-- 
WBR, Dmitry
-------------- next part --------------
--- before.txt	2011-09-23 16:23:02.000000000 +0300
+++ x86.txt	2011-09-23 16:26:06.000000000 +0300
@@ -10,19 +10,24 @@
 COMPUTERNAME=KBP1-DHP-19554
 ComSpec=C:\Windows\system32\cmd.exe
 CYGWINDIR=c:\cygwin
+DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE
 FARHOME=W:\far2
 FARLANG=English
 FP_NO_HOST_CHECK=NO
+Framework35Version=v3.5
+FrameworkDir=C:\Windows\Microsoft.NET\Framework
+FrameworkVersion=v2.0.50727
 HOMEDRIVE=Z:
 HOMEPATH=\
 HOMESHARE=\\nas2.corp\homes
-INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\
-LIB=C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\
+INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\
+LIB=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib;C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\
+LIBPATH=C:\Windows\Microsoft.NET\Framework\v3.5;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB;
 LOCALAPPDATA=C:\Users\dion\AppData\Local
 LOGONSERVER=\\DC-KBP1-3
 NUMBER_OF_PROCESSORS=6
 OS=Windows_NT
-Path=C:\Program Files (x86)\PC Connectivity Solution\;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Avid;C:\Program Files\Common Files\Avid;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\ManageSoft\Common;C:\Program Files (x86)\AccuRev\bin;C:\Program Files (x86)\Mercurial\;w:\far;w:\bin;C:\Program Files (x86)\Vim\vim72;c:\python26;C:\Program Files (x86)\Mercurial
+Path=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools;C:\Windows\Microsoft.NET\Framework\v3.5;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Avid;C:\Program Files\Common Files\Avid;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\ManageSoft\Common;C:\Program Files (x86)\AccuRev\bin;C:\Program Files (x86)\Mercurial\;w:\far;w:\bin;C:\Program Files (x86)\Vim\vim72;c:\python26;C:\Program Files (x86)\Mercurial
 PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
 PERLDIR=c:\perl64
 PROCESSOR_ARCHITECTURE=AMD64
@@ -48,6 +53,9 @@
 USERNAME=dion
 USERPROFILE=C:\Users\dion
 VBOX_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
+VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
 VS71COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\Tools\
 VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\
+VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0
 windir=C:\Windows
+WindowsSdkDir=C:\Program Files\Microsoft SDKs\Windows\v6.0A\
-------------- next part --------------
--- before.txt	2011-09-23 16:23:02.000000000 +0300
+++ x64.txt	2011-09-23 16:26:52.000000000 +0300
@@ -13,16 +13,20 @@
 FARHOME=W:\far2
 FARLANG=English
 FP_NO_HOST_CHECK=NO
+Framework35Version=v3.5
+FrameworkDir=C:\Windows\Microsoft.NET\Framework64
+FrameworkVersion=v2.0.50727
 HOMEDRIVE=Z:
 HOMEPATH=\
 HOMESHARE=\\nas2.corp\homes
-INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\
-LIB=C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\
+INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\
+LIB=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\
+LIBPATH=C:\Windows\Microsoft.NET\Framework64\v3.5;C:\Windows\Microsoft.NET\Framework64\v2.0.50727;C:\Windows\Microsoft.NET\Framework64\v3.5;C:\Windows\Microsoft.NET\Framework64\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB\amd64;
 LOCALAPPDATA=C:\Users\dion\AppData\Local
 LOGONSERVER=\\DC-KBP1-3
 NUMBER_OF_PROCESSORS=6
 OS=Windows_NT
-Path=C:\Program Files (x86)\PC Connectivity Solution\;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Avid;C:\Program Files\Common Files\Avid;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\ManageSoft\Common;C:\Program Files (x86)\AccuRev\bin;C:\Program Files (x86)\Mercurial\;w:\far;w:\bin;C:\Program Files (x86)\Vim\vim72;c:\python26;C:\Program Files (x86)\Mercurial
+Path=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64;C:\Windows\Microsoft.NET\Framework64\v3.5;C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft .NET Framework 3.5 (Pre-Release Version);C:\Windows\Microsoft.NET\Framework64\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\x64;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\win64\x64;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Perl64\site\bin;C:\Perl64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Avid;C:\Program Files\Common Files\Avid;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\ManageSoft\Common;C:\Program Files (x86)\AccuRev\bin;C:\Program Files (x86)\Mercurial\;w:\far;w:\bin;C:\Program Files (x86)\Vim\vim72;c:\python26;C:\Program Files (x86)\Mercurial
 PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
 PERLDIR=c:\perl64
 PROCESSOR_ARCHITECTURE=AMD64
@@ -48,6 +52,9 @@
 USERNAME=dion
 USERPROFILE=C:\Users\dion
 VBOX_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
+VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
 VS71COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\Tools\
 VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\
+VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0
 windir=C:\Windows
+WindowsSdkDir=C:\Program Files\Microsoft SDKs\Windows\v6.0A\
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://buildbot.net/pipermail/devel/attachments/20110923/3885ccf9/attachment.bin>


More information about the devel mailing list