Copyright (C) 2004, 2005  Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 2001, 2002  Internet Software Consortium.
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.

$Id: win32-build.txt,v 1.8.18.3 2005/11/01 05:50:31 marka Exp $

       BIND 9.4 for Win32 Source Build Instructions.  28-May-2005

Building BIND 9.4 on Windows NT/2000 has the following prerequisites:

1) You need to install Perl for Windows NT/2000. ActiveState
(http://www.activestate.com/) is the one most people install and use;
2) OpenSSL (http://www.openssl.org) needs to be downloaded and built
on the system on which you are building BIND.
3) If you want to build using Visual C++ 6.0, you'll need some extra
files that are to be found in the Platform SDK (which you will need
to install), namely:

iphlpapi.h
iptypes.h
ipexport.h
iphlpapi.lib

You'll also need an updated Iprtrmib.h - using the VC++6.0 one will
get you some compilation errors. You can just overwrite the old one if
you're not using it for any purposes, and maybe keep a backup of it. 

You can copy the header files under VC98\INCLUDE and the library file
under VC98\LIB. I think you can also put them in a separate directory
and add it to the include search list, but I don't know if that can be
made persistent. 

For building on VC++ 7.0 no extra files are required. 

The instructions assume a Visual C++ 6.0 compiler with Visual Studio and
Visual Studio Service Pack 3 or later. It may build and work with earlier
versions but it has not been tested. The binaries may be built and run on
any of the following platforms: NT 4.0 Workstation (SP3 or later), NT 4.0
Server (SP3 or later), Windows 2000 Professional (SP1 or later),
Windows 2000 Server or any kind (SP1 or later), Windows XP, Windows 2003
Server. It will NOT build or run on Windows 95, Windows 98, etc. platforms.

Step 1: Download and Build OpenSSL

Download and untar the OpenSSL sources from http://www.openssl.org/.
if you have place the BIND sources in /BIND9 you should place the
OpenSSL sources in /openssl-0.9.7c or the appropriate directory name
created when you untarred the openssl tarball.

Note: Building OpenSSL also requires that you install Perl as it uses
it during its build process. Follow the instructions for NT given
in the INSTALL.W32 file to build the kit. This will produce libeay32.lib
and libeay32.dll in the out32dll subdirectory. 


Step 2 Building BIND

You must build openssl first. 

From the command prompt cd to the win32utils under the BIND root.
Execute the BuildAll.bat file. This will do the following:
1) copy config.h.win32 to config.h in the root.
2) create the versions.h file in the root.
3) Build the gen application in the lib/dns directory.
4) Run the gen application and build the required lib/dns header
   files.
5) Create the Build/Release subdirectory under the root of the BIND
   source tree which will hold the binaries being built.
6) Build the libraries, named, application tools like dig, rndc
   dnssec tools, installer, checkconf and checkzones programs,
   BIND 9 Installer.
7) Copies the release notes and the OpenSSL DLL to the BUILD/Release
   directory.
8) Copies the BIND 9 ARM HTML files and the application HTML files
   to the Build\Release area.

If you wish to use Visual Studio for building, you can just run the
BuildSetup.bat file which will create all the necessary files and you
can then use the BINDBuild.dsw to open the workspace for all of the
libraries and applications. These files reside in the same win32utils
directory as this file.

The following files are built:

libbind9.dll
libisc.dll
libdns.dll
libisccc.dll
libisccfg.dll
liblwres.dll
named.exe
bindevt.dll 
BINDInstall.exe

rndc.exe
dig.exe
host.exe
nslookup.exe
nsupdate.exe

named-checkconf.exe
named-checkzone.exe

dnssec-keygen.exe
dnssec-signzone.exe

If you are building with VS.NET (aka VC++ V7) you will need additional
system DLL's: 

mfc71.dll
msvcr71.dll

or

mfc70.dll
msvcr70.dll

depending on your version of the compiler.

You should end up with 18-20 binaries in the bind9/Build/Release
directory. The Install instructions Readme1st.txt from win32utils and
libeay32.dll from the openssl/out32dll/ directory are also copied into
the Build area. In addition you should have 22 HTML files and a number
of text files.

The set of files in the directory bind9/Build/Release form the
installation kit which can then be zipped and distributed to any
suitable Windows NT 4.0 or Windows 2000 platform.

Installation is accomplished by running the BINDInstall program. All DLL's
are copied to the system32 area and all applications (including BINDInstall
which may be necessary for uninstalling BIND 9) to the dns/bin directory.
If BIND 8 has previously been installed on the system it must be uninstalled
first by running it's own BINDInstall program.  The BIND 9 installer does
not yet do this.

All bugs found, whether in the process of building the application or
running BIND or the tools should be reported to the bind9 bugs email
account at bind9-bugs@isc.org.

	Danny Mayer
	mayer@ntp.isc.org


