[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 (trunk code).

From: Martin Tomes <lists_at_tomes.org>
Date: 2004-05-05 14:28:32 CEST

Log Message:
Add build batch file for Win32 build.

     * build/win32/vc6-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

rem ====== Set these shell variables before doing a build.
rem VER is used to name the output bin dir as svn-win32-%VER%
set VER=trunk
rem DIR is appended to src- to make the dir name, e.g., src-trunk
set DIR=trunk
set DRIVE=C
set PYTHONDIR=C:\Python22
set SDKINC=C:\Program Files\Microsoft SDK\include
set SDKLIB=C:\Program Files\Microsoft SDK\lib
set APACHEDIR=C:\Program Files\Apache Group\Apache2
set GETTEXTINC=C:\SVN\gettext\include
set GETTEXTLIB=C:\SVN\gettext\lib
set GETTEXTBIN=C:\SVN\gettext\bin
rem ====== End of shell variables which need to be set.

rem Set up path to include Python and BDB.
PATH=%PATH%;%DRIVE%:\SVN\src-%DIR%\db4-win32;%DRIVE%:\SVN\nasm;%PYTHONDIR%;%GETTEXTBIN%

rem Set INCLUDE and LIB for the msdev builds.
set INCLUDE=%SDKINC%;%INCLUDE%;%GETTEXTINC%
set LIB=%SDKLIB%;%LIB%;%GETTEXTLIB%

rem Check that the subversion code exists here.
cd %DRIVE%:\SVN\src-%DIR%
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
if not exist gettext goto gettexterr
goto allok

:wrongstartdir
echo Unable to find %DRIVE%:\SVN\src-%DIR%\subversion
goto theveryend
:httpderr
echo Unable to find httpd-2.0.49
goto end
:nasmerr
echo Unable to find nasm
goto end
:opensslerr
echo Unable to find openssl-0.9.7d
goto end
:svnerr
echo Unable to find Subversion source in src-%DIR%
goto end
:zliberr
echo Unable to find zlib
goto end
:zliberrstat
echo Please copy zlib\static32\zlibstat.lib to zlib\zlibstat.lib
goto end
:bdberr
echo Unable to find Berekely DB
goto end
:neonerr
echo Unable to find neon
goto end
:gettexterr
echo Unable to find gettext
goto end
:allok

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
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 --enable-nls
msdev subversion_msvc.dsw /USEENV /MAKE "__ALL_TESTS__ - Win32 Release"
mkdir Release\subversion\tests\clients
xcopy /S /Y subversion\tests\clients Release\subversion\tests\clients
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 openssl-0.9.7d\out32dll\libeay32.dll svn-win32-%VER%\bin
copy openssl-0.9.7d\out32dll\ssleay32.dll svn-win32-%VER%\bin
copy httpd-2.0.49\srclib\apr\Release\libapr.dll svn-win32-%VER%\bin
copy httpd-2.0.49\srclib\apr-iconv\Release\libapriconv.dll svn-win32-%VER%\bin
copy httpd-2.0.49\srclib\apr-util\Release\libaprutil.dll svn-win32-%VER%\bin
copy gettext\bin\intl.dll svn-win32-%VER%\bin
copy gettext\bin\iconv.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 svn-win32-%VER%\httpd\mod_dav_svn.so "%APACHEDIR%"\modules
copy svn-win32-%VER%\httpd\mod_authz_svn.so "%APACHEDIR%"\modules
copy svn-win32-%VER%\bin\intl.dll "%APACHEDIR%\bin"
copy svn-win32-%VER%\bin\iconv.dll "%APACHEDIR%\bin"
copy svn-win32-%VER%\bin\libdb42.dll "%APACHEDIR%\bin"
copy httpd-2.0.49\srclib\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%:/SVN/src-%DIR%/Release/subversion/tests/clients/cmdline/local_tmp/repos
echo ^</Location^>
echo Then restart Apache.

echo Please configure Apache and press enter:
pause
@echo on

rem ====== Run the tests.
PATH=%DRIVE%:\SVN\svn-win32-%VER%\bin;%PATH%
cd src-%DIR%
python win-tests.py -c -r -v
python win-tests.py -c -r -v --url="http://localhost"
cd ..

:end
cd src-%DIR%
:theveryend

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 5 14:29:12 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.