Make a status test pass against old servers.
[svn.git] / build / win32 / vc6-build.bat.in
blob5b16e339de555a8c1b40b5a6ec6a01974cb4de1d
1 @echo off
3 rem ====== Environment change lives only for the duration of the script
4 setlocal
6 rem ====== Set these shell variables before doing a build.
7 rem VER is used to name the output bin dir as svn-win32-%VER%
8 set VER=trunk
9 rem DIR is appended to src- to make the dir name, e.g., src-trunk
10 set DIR=trunk
11 set DRIVE=C
12 set PYTHONDIR=C:\Python22
13 set AWKDIR=C:\SVN\awk
14 set NASMDIR=C:\SVN\nasm
15 set SDKINC=C:\Program Files\Microsoft SDK\include
16 set SDKLIB=C:\Program Files\Microsoft SDK\lib
17 set APACHEDIR=C:\Program Files\Apache Group\Apache2
18 set GETTEXTINC=C:\SVN\gettext\include
19 set GETTEXTLIB=C:\SVN\gettext\lib
20 set GETTEXTBIN=C:\SVN\gettext\bin
21 rem ====== End of shell variables which need to be set.
23 rem Set up path to include Python and BDB.
24 PATH=%PATH%;%DRIVE%:\SVN\src-%DIR%\db4-win32;%NASMDIR%;%PYTHONDIR%;%AWKDIR%;%GETTEXTBIN%
26 rem Set INCLUDE and LIB for the msdev builds.
27 set INCLUDE=%SDKINC%;%INCLUDE%;%GETTEXTINC%
28 set LIB=%SDKLIB%;%LIB%;%GETTEXTLIB%
30 rem Check that the subversion code exists here.
31 cd %DRIVE%:\SVN\src-%DIR%
32 if not exist subversion goto wrongstartdir
33 cd ..
35 rem ====== Check the prerequisites are at least in the right place.
36 if not exist httpd-2.0.50 goto httpderr
37 if not exist nasm goto nasmerr
38 if not exist openssl-0.9.7d goto opensslerr
39 if not exist src-%DIR% goto svnerr
40 if not exist zlib goto zliberr
41 if not exist zlib\zlibstat.lib goto zlibstaterr
42 if not exist src-%DIR%\db4-win32 goto bdberr
43 if not exist src-%DIR%\neon goto neonerr
44 if not exist gettext goto gettexterr
45 goto allok
47 :wrongstartdir
48 echo Unable to find %DRIVE%:\SVN\src-%DIR%\subversion
49 goto theveryend
50 :httpderr
51 echo Unable to find httpd-2.0.50
52 goto end
53 :nasmerr
54 echo Unable to find nasm
55 goto end
56 :opensslerr
57 echo Unable to find openssl-0.9.7d
58 goto end
59 :svnerr
60 echo Unable to find Subversion source in src-%DIR%
61 goto end
62 :zliberr
63 echo Unable to find zlib
64 goto end
65 :zlibstaterr
66 echo Please copy zlib\static32\zlibstat.lib to zlib\zlibstat.lib
67 goto end
68 :bdberr
69 echo Unable to find Berekely DB
70 goto end
71 :neonerr
72 echo Unable to find neon
73 goto end
74 :gettexterr
75 echo Unable to find gettext
76 goto end
77 :allok
79 rem ====== Build openssl.
80 cd openssl-0.9.7d
81 perl Configure VC-WIN32
82 call ms\do_nasm
83 nmake -f ms\ntdll.mak
84 cd out32dll
85 call ..\ms\test
86 cd ..\..
88 rem ====== Build Apache 2
89 cd src-%DIR%
90 python gen-make.py -t dsp --with-httpd=..\httpd-2.0.50 --with-berkeley-db=db4-win32 --with-openssl=..\openssl-0.9.7d --with-zlib=..\zlib --enable-nls --enable-bdb-in-apr-util
91 cd ..
92 msdev httpd-2.0.50\apache.dsw /MAKE "BuildBin - Win32 Release"
94 rem ====== Subversion
95 cd src-%DIR%
96 msdev subversion_msvc.dsw /USEENV /MAKE "__ALL_TESTS__ - Win32 Release"
97 mkdir Release\subversion\tests\cmdline
98 xcopy /S /Y subversion\tests\cmdline Release\subversion\tests\cmdline
99 copy Release\subversion\mod_dav_svn\mod_dav_svn.so "%APACHEDIR%"\modules
100 copy Release\subversion\mod_authz_svn\mod_authz_svn.so "%APACHEDIR%"\modules
101 cd ..
103 rem ====== Copy the binaries into a tree suitable for zipping.
104 mkdir svn-win32-%VER%
105 mkdir svn-win32-%VER%\bin
106 mkdir svn-win32-%VER%\httpd
107 mkdir svn-win32-%VER%\iconv
108 copy src-%DIR%\db4-win32\bin\libdb42.dll svn-win32-%VER%\bin
109 copy openssl-0.9.7d\out32dll\libeay32.dll svn-win32-%VER%\bin
110 copy openssl-0.9.7d\out32dll\ssleay32.dll svn-win32-%VER%\bin
111 copy httpd-2.0.50\srclib\apr\Release\libapr.dll svn-win32-%VER%\bin
112 copy httpd-2.0.50\srclib\apr-iconv\Release\libapriconv.dll svn-win32-%VER%\bin
113 copy httpd-2.0.50\srclib\apr-iconv\Release\iconv\*.so svn-win32-%VER%\iconv
114 copy httpd-2.0.50\srclib\apr-util\Release\libaprutil.dll svn-win32-%VER%\bin
115 copy gettext\bin\intl.dll svn-win32-%VER%\bin
116 copy gettext\bin\iconv.dll svn-win32-%VER%\bin
117 copy src-%DIR%\Release\subversion\svn\svn.exe svn-win32-%VER%\bin
118 copy src-%DIR%\Release\subversion\svnadmin\svnadmin.exe svn-win32-%VER%\bin
119 copy src-%DIR%\Release\subversion\svndumpfilter\svndumpfilter.exe svn-win32-%VER%\bin
120 copy src-%DIR%\Release\subversion\svnlook\svnlook.exe svn-win32-%VER%\bin
121 copy src-%DIR%\Release\subversion\svnserve\svnserve.exe svn-win32-%VER%\bin
122 copy src-%DIR%\Release\subversion\svnversion\svnversion.exe svn-win32-%VER%\bin
123 copy src-%DIR%\Release\subversion\mod_authz_svn\mod_authz_svn.so svn-win32-%VER%\httpd
124 copy src-%DIR%\Release\subversion\mod_dav_svn\mod_dav_svn.so svn-win32-%VER%\httpd
125 copy svn-win32-%VER%\bin\intl.dll "%APACHEDIR%\bin"
126 copy svn-win32-%VER%\bin\iconv.dll "%APACHEDIR%\bin"
127 copy svn-win32-%VER%\bin\libdb42.dll "%APACHEDIR%\bin"
129 rem ====== Configure Apache ready for doing tests.
130 @echo off
131 echo Configure Apache to use the mod_dav_svn and mod_authz_svn modules
132 echo by making sure these lines appear uncommented in httpd.conf:
133 echo LoadModule dav_module modules/mod_dav.so
134 echo LoadModule dav_fs_module modules/mod_dav_fs.so
135 echo LoadModule dav_svn_module modules/mod_dav_svn.so
136 echo LoadModule authz_svn_module modules/mod_authz_svn.so
137 echo And further down the file add:
138 echo ^<Location /svn-test-work/repositories^>
139 echo DAV svn
140 echo SVNParentPath %DRIVE%:/SVN/src-%DIR%/Release/subversion/tests/cmdline/svn-test-work/repositories
141 echo ^</Location^>
142 echo ^<Location /svn-test-work/local_tmp/repos^>
143 echo DAV svn
144 echo SVNPath %DRIVE%:/SVN/src-%DIR%/Release/subversion/tests/cmdline/svn-test-work/local_tmp/repos
145 echo ^</Location^>
146 echo Then restart Apache.
148 echo Please configure Apache and press enter:
149 pause
150 @echo on
152 rem ====== Run the tests.
153 PATH=%DRIVE%:\SVN\svn-win32-%VER%\bin;%PATH%
154 cd src-%DIR%
155 python win-tests.py -c -r -v
156 python win-tests.py -c -r -v -u http://localhost
157 cd ..
159 :end
160 cd src-%DIR%
161 endlocal
162 :theveryend