User's Guide: preTools Suite for Windows

Getting Started



preTools are "front-ends" to Microsoft's build utilities. Instead of running a tool such as Nmake or Build, you run a preTool in its place. The preTool simply initializes a bunch of environment variables before launching the tool. The tool then runs in the context of the environment created.

Currently, three preTools have been developed. preMake is a "front-end" to Nmake.exe, preBuild is a "front-end" to Build.exe, and preVCbld is a "front-end" to VCBuild.exe. Other possible candidates for preTools are: devenv.exe (the Visual Studio command-line), msbuild.exe (the .NET Build Engine), and preFast.exe (a C/C++ lint tool from the DDK/WDK).

preTools can be customized to prepare environments for any build component (compiler, SDK, DDK, library, etc.). Each preTool reads an XML configuration file that contains four top level elements under its root.

  1. The detect element contains rules for detecting the presence and location of each type of build component.
  2. The  base_configurations element contains one base_config sub-element for each build component. These hold the definitions of environment variables and their initial values for a build component.
  3. The setups element contains one or more setup sub-elements for each base_config. Each setup sub-element supplies customizations or overrides of the standard base_config.
  4. The configurations element contains one or more named configuration sub-elements. Each configuration defines a group of build components and setups and the order in which they are processed. A configuration name is supplied on the preTool command-line to specify a particular build environment.

preTools can be used with any editor or IDE that supports launching external tools. preTools can also be launched from scripting languages or other build tools such as Ant. The programs are Win32 console applications, with support for Windows 95/98/ME/2000/XP/Vista and Windows 2003 Server.