Building AutoWin Packages

The piece of software you are installing uses the AutoWin build system to support Windows builds using Visual C++. This system is designed to provide a framework that will allow the package to be compiled using a wide range of compilers.


Setting up a command line environment to Visual C++
Performing a basic build
Performing a manual build (specify compiler settings)
Performing standard customisations on a build
Performing extra customisations on a build

Setting up a command line environment to Visual C++

AutoWin achieves this by using the command-line interface to your compiler. It is important, therefore, that you know how to set up a command-line environment. If you already know how to this, skip to the next section.

If you use Visual Studio .NET or newer (or Visual C++ .NET or newer), you will already have a command line shortcut installed into your start menu. Simply open this item, and proceed to the next step.

If you use the Visual C++ Toolkit (2003), or the Visual C++ Express Edition (2005), you may have this item, but it is not sufficient. You will also need to have installed the Platform SDK, and incorporate the two environments together. Visual C++ Express Edition 2008 includes a bundled Platform SDK which is auto-bundled and usually sufficient. To bundle manually, open the Visual C++ item from the start menu, and running the SetEnv.bat file from your Platform SDK directory. If using the Visual C++ Toolkit, you will also have to add the path containing NMAKE.EXE to your path (at the end!). This file is distributed as part of the Win64 support in your Platform SDK.

If you use an older version of Visual C++, open a command prompt. You will need to run a batch file that initializes your environment. If running Visual Studio, Visual C++ is (by default) the Vc\ subdirectory of your Visual Studio directory. The locations are:

Visual C++ 1.1 (32-bit edition)Installation Root\Bin\VcVars32.bat
Visual C++ 2.xInstallation Root\Bin\VcVars32.bat
Visual C++ 4.xInstallation Root\Bin\VcVars32.bat
Visual C++ 5.xVC Installation Root\Bin\VcVars32.bat
Visual C++ 6.xVC Installation Root\Bin\VcVars32.bat

Performing a basic build

Change to the directory where you have unpacked the source, and run:

build

Performing a manual build (specify compiler settings)

If you need finer grained control than build.bat, or if the automatic configuration is incorrect, consider using a manual build. This typically involves specifying the compiler version yourself. These settings can then be used to invake the Makefile directly:

NMAKE /f Makefile.w32 MSC_VER=1000 MSC_ED=std

Determining your version of C++

Antinat may need to know what version of Visual C++ you are running. This version number represents the version of the Microsoft C/C++ compiler, not Visual C++ (which uses marketing-inspired versioning.) Sometimes defaults will work (but are not optimal.) Here is a conversion table for your convenience:

Visual C++ 1.1 (32-bit edition)MSC_VER=800
Visual C++ 2.xMSC_VER=900
Visual C++ 4.xMSC_VER=1000
Visual C++ 5.xMSC_VER=1100
Visual C++ 6.xMSC_VER=1200
Visual C++ .NET (2002)MSC_VER=1300
Visual C++ .NET 2003MSC_VER=1310
Visual C++ .NET 2005MSC_VER=1400
Visual C++ .NET 2008MSC_VER=1500
Visual C++ .NET 2010MSC_VER=1600
Visual C++ .NET 2012MSC_VER=1700
Visual C++ .NET 2013MSC_VER=1800

Determining your edition of C++

Antinat may need to know what edition of Visual C++ you are running. Sometimes defaults will work (but are not optimal.) Here is a conversion table for your convenience:

Visual C++ 4.xStandard edition: MSC_ED=std; Professional edition: MSC_ED=pro
Visual C++ 5.xStandard edition: MSC_ED=std; Professional edition: MSC_ED=pro
Visual C++ 6.xStandard edition: MSC_ED=std; Professional edition: MSC_ED=pro
Visual C++ .NET (2002)Standard edition: MSC_ED=std; Professional edition: MSC_ED=pro
Visual C++ .NET 2003Standard edition: MSC_ED=std; Professional edition: MSC_ED=pro; Toolkit: MSC_ED=free
Visual C++ 2005Standard edition: MSC_ED=std; Professional edition: MSC_ED=pro; Express: MSC_ED=free
Visual C++ 2008Standard edition: MSC_ED=std; Professional edition: MSC_ED=pro; Express: MSC_ED=free; Windows Server 2008/Windows 7 SDK MSC_ED=free
Visual C++ 2010Standard edition: MSC_ED=std; Professional edition: MSC_ED=pro; Express: MSC_ED=free; Windows 7 SDK MSC_ED=free
Visual C++ 2012Standard edition: MSC_ED=std; Professional edition: MSC_ED=pro; Express: MSC_ED=free
Visual C++ 2013Standard edition: MSC_ED=std; Professional edition: MSC_ED=pro; Express: MSC_ED=free

Performing standard customisations on a build

AutoWin supports a number of standard compilation options. These options are supported across the different versions of Visual C++ so no matter what version you're running, the option will be available.
This flag...does thisDefaultLegitimate values
CLIB_SHARED Changes between using a static C library or the DLL (for your compiler.) Using a shared library makes smaller binaries, but users of your application must have it installed. CLIB_SHARED=1 (for MSC_VER 9-12), CLIB_SHARED=0 (otherwise.) CLIB_SHARED=0, CLIB_SHARED=1
DEBUG Enables debugging information in the build. 2 is full debugging, 1 is hybrid (optimized with debug.) DEBUG=0 DEBUG=0, DEBUG=1, DEBUG=2
RELOC Enables a relocatable binary. The main reason for using this is to support Win32s. RELOC=0 RELOC=0, RELOC=1
UNICODE Not all packages support this option. Attempts to build a Unicode binary, rather than ANSI. UNICODE=1 UNICODE=0, UNICODE=1
WITH_3D Not all versions of Visual C++ support this option. Attempts to use the ctl3d library, to provide a 3D interface. On MSC_VER 1000 and above, this is the default. WITH_3D=0 WITH_3D=0, WITH_3D=1

Performing extra customisations on a build

Your particular package may include additional options beyond those AutoWin provides. To see a description of these options, run:

build help