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
22echo Generate header files for lib/dns
23
24cd ..\..\lib\dns
25cd win32
26nmake /nologo /f gen.mak CFG="gen - @PLATFORM@ Release"  NO_EXTERNAL_DEPS="1"
27cd ..
28gen -s . -t > include/dns/enumtype.h
29gen -s . -c > include/dns/enumclass.h
30gen -s . -i -P ./rdata/rdatastructpre.h -S ./rdata/rdatastructsuf.h > include/dns/rdatastruct.h
31gen -s . > code.h
32cd ..\..\win32utils\legacy
33
34rem Make sure that the Build directories are there.
35
36if NOT Exist ..\..\Build mkdir ..\..\Build
37if NOT Exist ..\..\Build\Release mkdir ..\..\Build\Release
38if NOT Exist ..\..\Build\Debug mkdir ..\..\Build\Debug
39
40echo Copying the ARM and the Installation Notes.
41
42copy ..\..\COPYRIGHT ..\..\Build\Release
43copy ..\..\COPYRIGHT ..\..\Build\Debug
44copy ..\..\README ..\..\Build\Release
45copy ..\..\HISTORY ..\..\Build\Release
46copy ..\readme1st.txt ..\..\Build\Release
47copy ..\index.html ..\..\Build\Release
48copy ..\..\doc\arm\*.html ..\..\Build\Release
49copy ..\..\doc\arm\Bv9ARM.pdf ..\..\Build\Release
50copy ..\..\CHANGES ..\..\Build\Release
51if Exist ..\CHANGES.SE copy ..\CHANGES.SE ..\Build\Release
52copy ..\..\FAQ ..\..\Build\Release
53
54echo Copying the standalone manual pages.
55
56copy ..\..\bin\named\named.html ..\..\Build\Release
57copy ..\..\bin\rndc\*.html ..\..\Build\Release
58copy ..\..\bin\confgen\*.html ..\..\Build\Release
59copy ..\..\bin\dig\*.html ..\..\Build\Release
60copy ..\..\bin\delv\*.html ..\..\Build\Release
61copy ..\..\bin\nsupdate\*.html ..\..\Build\Release
62copy ..\..\bin\check\*.html ..\..\Build\Release
63copy ..\..\bin\dnssec\dnssec-keygen.html ..\..\Build\Release
64copy ..\..\bin\dnssec\dnssec-signzone.html ..\..\Build\Release
65copy ..\..\bin\dnssec\dnssec-dsfromkey.html ..\..\Build\Release
66copy ..\..\bin\dnssec\dnssec-keyfromlabel.html ..\..\Build\Release
67copy ..\..\bin\dnssec\dnssec-settime.html ..\..\Build\Release
68copy ..\..\bin\dnssec\dnssec-revoke.html ..\..\Build\Release
69copy ..\..\bin\dnssec\dnssec-verify.html ..\..\Build\Release
70copy ..\..\bin\dnssec\dnssec-importkey.html ..\..\Build\Release
71@IF PYTHON
72copy ..\..\bin\python\dnssec-checkds.html ..\..\Build\Release
73copy ..\..\bin\python\dnssec-coverage.html ..\..\Build\Release
74@END PYTHON
75@IF PKCS11
76copy ..\..\bin\pkcs11\pkcs11-keygen.html ..\..\Build\Release
77copy ..\..\bin\pkcs11\pkcs11-list.html ..\..\Build\Release
78copy ..\..\bin\pkcs11\pkcs11-destroy.html ..\..\Build\Release
79copy ..\..\bin\pkcs11\pkcs11-tokens.html ..\..\Build\Release
80@END PKCS11
81copy ..\..\bin\tools\arpaname.html ..\..\Build\Release
82copy ..\..\bin\tools\genrandom.html ..\..\Build\Release
83copy ..\..\bin\tools\isc-hmac-fixup.html ..\..\Build\Release
84copy ..\..\bin\tools\named-journalprint.html ..\..\Build\Release
85copy ..\..\bin\tools\named-rrchecker.html ..\..\Build\Release
86copy ..\..\bin\tools\nsec3hash.html ..\..\Build\Release
87
88echo Copying the migration notes.
89
90copy ..\..\doc\misc\migration ..\..\Build\Release
91copy ..\..\doc\misc\migration-4to9 ..\..\Build\Release
92
93@IF OPENSSL
94echo Copying the OpenSSL DLL and LICENSE.
95
96copy @OPENSSL_DLL@ ..\..\Build\Release\
97copy @OPENSSL_DLL@ ..\..\Build\Debug\
98copy @OPENSSL_PATH@\LICENSE ..\..\Build\Release\OpenSSL-LICENSE
99copy @OPENSSL_PATH@\LICENSE ..\..\Build\Debug\OpenSSL-LICENSE
100@END OPENSSL
101
102@IF LIBXML2
103echo Copying the libxml DLL.
104
105copy @LIBXML2_DLL@ ..\..\Build\Release\
106copy @LIBXML2_DLL@ ..\..\Build\Debug\
107@END LIBXML2
108
109@IF GSSAPI
110echo Copying the GSSAPI and KRB5 DLLs.
111
112copy @GSSAPI_DLL@ ..\..\Build\Release\
113copy @GSSAPI_DLL@ ..\..\Build\Debug\
114copy @KRB5_DLL@ ..\..\Build\Release\
115copy @KRB5_DLL@ ..\..\Build\Debug\
116copy @COMERR_DLL@ ..\..\Build\Release\
117copy @COMERR_DLL@ ..\..\Build\Debug\
118copy @K5SPRT_DLL@ ..\..\Build\Release\
119copy @K5SPRT_DLL@ ..\..\Build\Debug\
120copy @WSHELP_DLL@ ..\..\Build\Release\
121copy @WSHELP_DLL@ ..\..\Build\Debug\
122@END GSSAPI
123
124@IF GEOIP
125echo Copying the GeoIP DLL.
126
127copy @GEOIP_DLL@ ..\..\Build\Release\
128copy @GEOIP_DLL@ ..\..\Build\Debug\
129@END GEOIP
130
131@IF IDNKIT
132echo Copying the IDN kit DLL.
133
134copy @IDN_DLL@ ..\Build\Release\
135copy @IDN_DLL@ ..\Build\Debug\
136copy @ICONV_DLL@ ..\Build\Release\
137copy @ICONV_DLL@ ..\Build\Debug\
138@END IDNKIT
139
140echo Copying the redistributable runtime object.
141
142rem
143rem Use /Y so we always have the current version of the installer.
144rem
145
146copy /Y @VCREDIST_PATH@ ..\..\Build\Release\
147copy /Y @VCREDIST_PATH@ ..\..\Build\Debug\
148
149@IF TESTS
150cd ..\..\bin\tests\dst
151copy "Kdh.+002+18602.key.in" "Kdh.+002+18602.key"
152copy "Kdh.+002+18602.private.in" "Kdh.+002+18602.private"
153copy "Kdh.+002+48957.key.in" "Kdh.+002+48957.key"
154copy "Kdh.+002+48957.private.in" "Kdh.+002+48957.private"
155copy "Ktest.+001+00002.key.in" "Ktest.+001+00002.key"
156copy "Ktest.+001+54622.key.in" "Ktest.+001+54622.key"
157copy "Ktest.+001+54622.private.in" "Ktest.+001+54622.private"
158copy "Ktest.+003+23616.key.in" "Ktest.+003+23616.key"
159copy "Ktest.+003+23616.private.in" "Ktest.+003+23616.private"
160copy "Ktest.+003+49667.key.in" "Ktest.+003+49667.key"
161copy dst_2_data.in dst_2_data
162copy t2_data_1.in t2_data_1
163copy t2_data_2.in t2_data_2
164copy t2_dsasig.in t2_dsasig
165copy t2_rsasig.in t2_rsasig
166cd ..\..\..\win32utils\legacy
167@END TESTS
168
169echo Running Message Compiler
170
171cd ..\..\lib\win32\bindevt
172mc bindevt.mc
173cd ..\..\..\win32utils\legacy
174
175rem Done
176