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

Re: [PATCH] Build batch file for Windows.

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

D.J. Heap wrote:
> Martin Tomes wrote:
>> The file I posted earlier wasn't quite right, this one will work on a
> Should this go into build/win32 (maybe named vc6-build.bat or something,
> though)? Any thoughts or objections?

I have added some code so it can be run from anywhere so here it is again and build/win32 looks like
a good place to put it. I have also attached a patch for INSTALL which mentions it's existence.

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

     * INSTALL
       Mention the above build script.

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

--- INSTALL (revision 9562)
+++ INSTALL (working copy)
@@ -711,6 +711,9 @@

    E.4 Building the Binaries

+ To build the binaries either follow the instructions here or run
+ build\win32\vc6-build.bat
     Start in the SVN directory you created.

     Set up the environment.

@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=1.0.x
rem DIR is appended to src- to make the dir name, e.g., src-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 ====== End of shell variables which need to be set.

rem Set up path to include Python and BDB.

rem Set INCLUDE and LIB for the msdev builds.

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
goto allok

echo Unable to find %DRIVE%:\SVN\src-%DIR%\subversion
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 openssl-0.9.7d\out32dll\libeay32.dll svn-win32-%VER%\bin
copy openssl-0.9.7d\out32dll\ssleay32.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%:/SVN/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 Thu Apr 29 10:33:38 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.