[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Build batch file for Windows.

From: Martin Tomes <lists_at_tomes.org>
Date: 2004-04-28 10:33:50 CEST

I don't know if you are interested in this, but this batch file implements section E.4 of my INSTALL

Log Message:
Add build batch file for Win32 build.

     * build.bat
       Implements section E.4 'Building the Binaries' of INSTALL for Win32

Martin Tomes
echo 'Martin x Tomes at controls x eurotherm x co x uk'\
  | sed -e 's/ x /\./g' -e 's/ at /@/'

@echo off
set VER=1.0.x
set DIR=1.0.x
set PYTHONDIR=C:\Python22
set SDKINC=C:\Program Files\Microsoft SDK\include
set SDKLIB=C:\Program Files\Microsoft SDK\lib
set APACHEMODDIR=C:\Program Files\Apache Group\Apache2\modules

rem Set up path to include Python and BDB.

rem Set INCLUDE and LIB for the msdev builds.

if not exist subversion goto wrongstartdir

cd ..

rem ====== Check the prerequisites are at least in the right place.
if not exist httpd-2.0.49 goto httpderr
if not exist nasm goto nasmerr
if not exist openssl-0.9.7d goto opensslerr
if not exist src-%DIR% goto svnerr
if not exist zlib goto zliberr
if not exist zlib\zlibstat.lib goto zlibstaterr
if not exist src-%DIR%\db4-win32 goto bdberr
if not exist src-%DIR%\neon goto neonerr
goto allok

echo Run this script from %DRIVE%\SVN\src-%DIR%
goto theveryend
echo Unable to find httpd-2.0.49
goto end
echo Unable to find nasm
goto end
echo Unable to find openssl-0.9.7d
goto end
echo Unable to find Subversion source in src-%DIR%
goto end
echo Unable to find zlib
goto end
echo Please copy zlib\static32\zlibstat.lib to zlib\zlibstat.lib
goto end
echo Unable to find Berekely DB
goto end
echo Unable to find neon
goto end

rem ====== Build openssl.
cd openssl-0.9.7d
perl Configure VC-WIN32
call ms\do_nasm
nmake -f ms\ntdll.mak
cd out32dll
call ..\ms\test
cd ..\..

rem ====== Build Apache 2
perl httpd-2.0.49\srclib\apr-util\build\w32locatedb.pl dll src-%DIR%\db4-win32\include src-%DIR%\db4-win32\lib
msdev httpd-2.0.49\apache.dsw /MAKE "BuildBin - Win32 Release"

rem ====== Subversion
mkdir src-%DIR%\apr
mkdir src-%DIR%\apr-iconv
mkdir src-%DIR%\apr-util
xcopy /S /Y httpd-2.0.49\srclib\apr src-%DIR%\apr
xcopy /S /Y httpd-2.0.49\srclib\apr-iconv src-%DIR%\apr-iconv
xcopy /S /Y httpd-2.0.49\srclib\apr-util src-%DIR%\apr-util
cd src-%DIR%
python gen-make.py -t dsp --with-httpd=..\httpd-2.0.49 --with-berkeley-db=db4-win32 --with-openssl=..\openssl-0.9.7d --with-zlib=..\zlib
msdev subversion_msvc.dsw /USEENV /MAKE "__ALL_TESTS__ - Win32 Release"
msdev subversion_msvc.dsw /USEENV /MAKE "test_utf - Win32 Release"
msdev subversion_msvc.dsw /USEENV /MAKE "test_ra_local - Win32 Release"
mkdir Release\subversion\tests\clients
xcopy /S /Y subversion\tests\clients Release\subversion\tests\clients
copy Release\subversion\mod_dav_svn\mod_dav_svn.so "%APACHEMODDIR%"
copy Release\subversion\mod_authz_svn\mod_authz_svn.so "%APACHEMODDIR%"
cd ..

rem ====== Copy the binaries into a tree suitable for zipping.
mkdir svn-win32-%VER%
mkdir svn-win32-%VER%\bin
mkdir svn-win32-%VER%\httpd
mkdir svn-win32-%VER%\iconv
copy src-%DIR%\db4-win32\bin\libdb42.dll svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\clients\cmdline\svn.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svnadmin\svnadmin.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svndumpfilter\svndumpfilter.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svnlook\svnlook.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svnserve\svnserve.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svnversion\svnversion.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\mod_authz_svn\mod_authz_svn.so svn-win32-%VER%\httpd
copy src-%DIR%\Release\subversion\mod_dav_svn\mod_dav_svn.so svn-win32-%VER%\httpd
copy src-%DIR%\apr-iconv\Release\iconv\*.so svn-win32-%VER%\iconv

rem ====== Configure Apache ready for doing tests.
@echo off
echo Configure Apache to use the mod_dav_svn and mod_authz_svn modules
echo by making sure these lines appear uncommented in httpd.conf:
echo LoadModule dav_module modules/mod_dav.so
echo LoadModule dav_fs_module modules/mod_dav_fs.so
echo LoadModule dav_svn_module modules/mod_dav_svn.so
echo LoadModule authz_svn_module modules/mod_authz_svn.so
echo And further down the file add:
echo ^<Location /repositories^>
echo DAV svn
echo SVNParentPath %DRIVE%:/SVN/src-%DIR%/Release/subversion/tests/clients/cmdline/repositories
echo ^</Location^>
echo ^<Location /local_tmp/repos^>
echo DAV svn
echo SVNPath %DRIVE%:/src-%DIR%/Release/subversion/tests/clients/cmdline/local_tmp/repos
echo ^</Location^>
echo Then restart Apache.

echo Please configure Apache and press enter:
@echo on

rem ====== Run the tests.
cd src-%DIR%
python win-tests.py -c -r -v
python win-tests.py -c -r -v -u http://localhost
cd ..

cd src-%DIR%

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 28 10:34:29 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.