You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

How to get a no-cost Windows build environment for spamc

Once you install perl and the required perl modules, you can install SpamAssassin from the source files. When you perform the step of perl Makefile.PL, you are asked if you want to build spamc. You must answer "no" if you do not have the proper tools to build the spamc executable. Here is how you can get the tools from Microsoft at no cost. Before you do this, you should notice how much easier it is to just get a copy of spamc.exe from someone who has already built it.

Download and install Microsoft Visual C++ Toolkit 2003 from

http://msdn.microsoft.com/visualc/vctoolkit2003/

Note: By default, the toolkit is installed in C:\Program Files\Microsoft Visual C++ Toolkit 2003\. Instead of accepting the default, install it in a a short pathname without spaces such as C:\VC2003. It will avoid certain problems in a later step. If you do install into the default directory you can rename or move the directory tree, but then you must edit the VCVARS32.BAT that comes with it.

You do not need to select the install option that registers path information in the environment.

Download and install the Core Platform SDK from

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

That download requires that you use Internet Explorer and accept installation of an ActiveX control.

Note: This also should be installed in a directory with a short name with no spaces, such as C:\SDK, not in the default. You can move or rename the directory tree after installing if you change environment variables that refer to the directory.

Edit the file VCVARS32.BAT that is in the Microsoft Visual C++ Toolkit 2003 directory to add the include and lib directories of the SDK that you just installed to the INCLUDE and LIB environment variables.

Download the self-extracting archive file

http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe

Run it to create the files nmake.exe and nmake.err, which should both be placed in a directory that is in the Path, such as \perl\bin or the bin directory of the Visual C++ Toolkit. This version of nmake cannot handle long pathnames. If you installed the toolkit and SDK in short named directories, then that will be fine. An alternative is to use the short pathname equivalents when setting the INCLUDE and LIB environment variables.

A newer version of nmake.exe that can handle long pathnames is part of the .NET Framework 1.1 Software Development Kit. Getting it requires first installing the .NET 1.1 runtime, and then using Internet Explorer and accepting installation of an ActiveX control at http://msdn.microsoft.com/netframework/downloads/updates/. Once you install the .NET Framework 1.1 Software Development Kit, copy the nmake.exe file that comes with it to a directory that is on your path, such as \perl\bin or the bin directory of the Visual C++ Toolkit.

That is hundreds of megabytes of download just to get nmake.exe if you don't want the .NET runtime and SDK for other reasons.

Using the build environment

When you want to build SpamAssassin with spamc, use the shortcut named "Visual C++ Toolkit 2003 Command Prompt" that in the the directory in which you installed the toolkit. Doubleclicking on it will open a command prompt window with the proper build environment in which you can install SpamAsssassin and accept the option to build spamc.

  • No labels