XXX Builds Microsoft Visual Studio project files. This builds a Visual Studio project file, based on the version of Visual Studio that is configured (either the latest installed version, or the version set by &cv-MSVS_VERSION; in the Environment constructor). For VS 6, it will generate .dsp and .dsw files, for VS 7, it will generate .vcproj and .sln files. It takes several lists of filenames to be placed into the project file, currently these are limited to srcs, incs, localincs, resources, and misc. These are pretty self explanatory, but it should be noted that the srcs list is NOT added to the &cv-SOURCES; construction variable. This is because it represents a list of files to be added to the project file, not the source used to build the project file (in this case, the "source" is the &SConscript; file used to call MSVSProject). In addition to these values (which are all optional, although not specifying any of them results in an empty project file), the following values must be specified: target: The name of the target .dsp or .vcproj file. The correct suffix for the version of Visual Studio must be used, but the &cv-MSVSPROJECTSUFFIX; construction value will be defined to the correct value (see example below). variant: The name of this particular variant. These are typically things like "Debug" or "Release", but really can be anything you want. Multiple calls to MSVSProject with different variants are allowed: all variants will be added to the project file with their appropriate build targets and sources. buildtarget: A list of SCons.Node.FS objects which is returned from the command which builds the target. This is used to tell SCons what to build when the 'build' button is pressed inside of the IDE. Example usage: barsrcs = ['bar.cpp'], barincs = ['bar.h'], barlocalincs = ['StdAfx.h'] barresources = ['bar.rc','resource.h'] barmisc = ['bar_readme.txt'] dll = local.SharedLibrary(target = 'bar.dll', source = barsrcs) local.MSVSProject(target = 'Bar' + env['MSVSPROJECTSUFFIX'], srcs = barsrcs, incs = barincs, localincs = barlocalincs, resources = barresources, misc = barmisc, buildtarget = dll, variant = 'Release') When the Microsoft Visual Studio tools are initialized, they set up this dictionary with the following keys: VERSION the version of MSVS being used (can be set via MSVS_VERSION) VERSIONS the available versions of MSVS installed VCINSTALLDIR installed directory of Visual C++ VSINSTALLDIR installed directory of Visual Studio FRAMEWORKDIR installed directory of the .NET framework FRAMEWORKVERSIONS list of installed versions of the .NET framework, sorted latest to oldest. FRAMEWORKVERSION latest installed version of the .NET framework FRAMEWORKSDKDIR installed location of the .NET SDK. PLATFORMSDKDIR installed location of the Platform SDK. PLATFORMSDK_MODULES dictionary of installed Platform SDK modules, where the dictionary keys are keywords for the various modules, and the values are 2-tuples where the first is the release date, and the second is the version number. If a value isn't set, it wasn't available in the registry. Tells the MS Visual Studio tools to use minimal INCLUDE, LIB, and PATH settings, instead of the settings from the IDE. For Visual Studio, SCons will (by default) automatically determine where MSVS is installed, and use the LIB, INCLUDE, and PATH variables set by the IDE. You can override this behavior by setting these variables after Environment initialization, or by setting MSVS_IGNORE_IDE_PATHS = 1 in the Environment initialization. Specifying this will not leave these unset, but will set them to a minimal set of paths needed to run the tools successfully. For VS6, the mininimal set is: INCLUDE:'VSDir\VC98\ATL\include;VSDir\VC98\MFC\include;VSDir\VC98\include' LIB:'VSDir\VC98\MFC\lib;VSDir\VC98\lib' PATH:'VSDir\Common\MSDev98\bin;VSDir\VC98\bin' For VS7, it is: INCLUDE:'VSDir\Vc7\atlmfc\include;VSDir\Vc7\include' LIB:'VSDir\Vc7\atlmfc\lib;VSDir\Vc7\lib' PATH:'VSDir\Common7\Tools\bin;VSDir\Common7\Tools;VSDir\Vc7\bin' Where 'VSDir' is the installed location of Visual Studio. Tells the MS Visual Studio tool(s) to use the MFC directories in its default paths for compiling and linking. Under MSVS version 6, setting MSVS_USE_MFC_DIRS to a non-zero value adds the ATL\include and MFC\include directories to the default INCLUDE external environment variable, and adds the MFC\lib directory to the default LIB external environment variable. Under MSVS version 7, setting MSVS_USE_MFC_DIRS to a non-zero value adds the atlmfc\include directory to the default INCLUDE external environment variable, and adds the atlmfc\lib directory to the default LIB external environment variable. The current default value is 1 which means these directories are added to the paths by default. This default value is likely to change in a future release, so users who want the ATL and MFC values included in their paths are encouraged to enable the MSVS_USE_MFC_DIRS value explicitly to avoid future incompatibility. This variable has no effect if the INCLUDE or LIB environment variables are set explictly. Sets the preferred version of MSVS to use. SCons will (by default) select the latest version of MSVS installed on your machine. So, if you have version 6 and version 7 (MSVS .NET) installed, it will prefer version 7. You can override this by specifying the MSVS_VERSION variable in the Environment initialization, setting it to the appropriate version ('6.0' or '7.0', for example). If the given version isn't installed, tool initialization will fail. The action used to generate Microsoft Visual Studio project and solution files. The suffix used for Microsoft Visual Studio project (DSP) files. The default value is .vcproj when using Visual Studio version 7.x (.NET), and .dsp when using earlier versions of Visual Studio. The suffix used for Microsoft Visual Studio solution (DSW) files. The default value is .sln when using Visual Studio version 7.x (.NET), and .dsw when using earlier versions of Visual Studio.