1echo off
2rem
3rem Copyright (C) 2004,2005  Internet Systems Consortium, Inc. ("ISC")
4rem Copyright (C) 2001-2002  Internet Software Consortium.
5rem 
6rem Permission to use, copy, modify, and distribute this software for any
7rem purpose with or without fee is hereby granted, provided that the above
8rem copyright notice and this permission notice appear in all copies.
9rem 
10rem THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11rem REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12rem AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13rem INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14rem LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15rem OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16rem PERFORMANCE OF THIS SOFTWARE.
17
18rem BuildSetup.bat
19rem This script sets up the files necessary ready to build BIND 9.
20rem This requires perl to be installed on the system.
21
22rem Set up the configuration file
23cd ..
24copy config.h.win32 config.h
25cd win32utils
26
27rem Get and update for the latest build of the openssl and libxml libraries
28perl updateopenssl.pl
29perl updatelibxml2.pl
30
31rem Generate the version information
32perl makeversion.pl
33
34rem Generate header files for lib/dns
35
36call dnsheadergen.bat
37
38rem Make sure that the Build directories are there.
39
40if NOT Exist ..\Build mkdir ..\Build
41if NOT Exist ..\Build\Release mkdir ..\Build\Release
42if NOT Exist ..\Build\Debug mkdir ..\Build\Debug
43
44echo Copying the ARM and the Installation Notes.
45
46copy ..\COPYRIGHT ..\Build\Release
47copy ..\README ..\Build\Release
48copy ..\HISTORY ..\Build\Release
49copy readme1st.txt ..\Build\Release
50copy index.html ..\Build\Release
51copy ..\doc\arm\*.html ..\Build\Release
52copy ..\doc\arm\Bv9ARM.pdf ..\Build\Release
53copy ..\CHANGES ..\Build\Release
54copy ..\FAQ ..\Build\Release
55
56echo Copying the standalone manual pages.
57
58copy ..\bin\named\named.html ..\Build\Release
59copy ..\bin\rndc\*.html ..\Build\Release
60copy ..\bin\confgen\*.html ..\Build\Release
61copy ..\bin\dig\*.html ..\Build\Release
62copy ..\bin\nsupdate\*.html ..\Build\Release
63copy ..\bin\check\*.html ..\Build\Release
64copy ..\bin\dnssec\dnssec-keygen.html ..\Build\Release
65copy ..\bin\dnssec\dnssec-signzone.html ..\Build\Release
66copy ..\bin\dnssec\dnssec-dsfromkey.html ..\Build\Release
67copy ..\bin\dnssec\dnssec-keyfromlabel.html ..\Build\Release
68copy ..\bin\pkcs11\pkcs11-keygen.html ..\Build\Release
69copy ..\bin\pkcs11\pkcs11-list.html ..\Build\Release
70copy ..\bin\pkcs11\pkcs11-destroy.html ..\Build\Release
71
72echo Copying the migration notes.
73
74copy ..\doc\misc\migration ..\Build\Release
75copy ..\doc\misc\migration-4to9 ..\Build\Release
76
77call SetupLibs.bat
78
79rem
80rem set vcredist here so that it is correctly expanded in the if body 
81rem
82set vcredist=BootStrapper\Packages\vcredist_x86\vcredist_x86.exe
83
84if Defined FrameworkSDKDir (
85
86rem
87rem vcredist_x86.exe path relative to FrameworkSDKDir
88rem 
89if Exist "%FrameworkSDKDir%\%vcredist%" (
90
91echo Copying Visual C x86 Redistributable Installer
92
93rem
94rem Use /Y so we allways have the current version of the installer.
95rem
96
97copy /Y "%FrameworkSDKDir%\%vcredist%" ..\Build\Release\
98copy /Y "%FrameworkSDKDir%\%vcredist%" ..\Build\Debug\
99
100) else (
101	echo "**** %FrameworkSDKDir%\%vcredist% not found ****"
102)
103) else (
104	echo "**** Warning FrameworkSDKDir not defined ****"
105	echo "****         Run vsvars32.bat            ****"
106)
107
108echo Running Message Compiler
109
110cd ..\lib\win32\bindevt
111mc bindevt.mc
112cd ..\..\..\win32utils
113
114rem Done
115