====================================== INSTALLING RapidSVN ====================================== Contents: 0. Preface 1. Prerequisites 2. Building on Linux/Unix 3. Building on Windows 4. Building on Mac OS/X 0 Preface This document will provide you some step-by-step instructions to get RapidSVN up and running on several platforms. We are mentioning only a few configurations and solutions that have worked for us. If there is some configuration or information missing that you feel might be important, dont hesitate to post on users@rapidsvn.tigris.org. 1 Prerequisites RapidSVN depends on several libraries, some are optional, some are mandatory, others are necessary only for a specific platform. 1.1 Platforms RapidSVN has been built and is run on several platforms: - Windows 95/98/98 SE/ME/NT/2k/XP - Unix (Linux, Solaris, FreeBSD) - Mac OS/X (Tiger) 1.2 Compilers Most platforms use the GNU GCC Compiler, but on Windows you will need some Microsoft C++ Compiler. We are using VCC 6.0, but newer ones should work as well. There are efforts underway to build on Windows using GCC as well, but right now, MS VCC is the simple answer. 1.3 Libraries RapidSVN can be compiled whereever Subversion and wxWidgets are available. All of the other dependencies are optional or are needed only on some platforms. Mandatory libraries: - Subversion >= 1.0 (for the Subversion functionality) - Apache Portable Runtime (included with Subversion) - Neon (included with Subversion) - wxWidgets (for the graphical user interface) - LibIntl (Windows only) Optional libraries/applications: - InnoSetup: installer for Windows - Berkeley DB: repository access for BDB repositories - doxygen: for code documentation - graphviz: for code documentation (needed with doxygen) - cppunit: for the regression tests - OpenSSL: for SSL support) - xsltproc: manpage generation - DocBook XSL Manpage Stylesheet: manpage creation - libtool: generation of "configure" - autogen: generation of "configure" 2 Building on Linux/Unix 2.1 Building/Installing the libraries You have to make sure Subversion and wxWidgets are compiled and installed on your machine, including the files needed for development (e.g. headers). There are binary packages for Subversion and wxWidgets available on most distributions. As long as you dont need special features that are not compiled in you may want to stick with these. 2.2 Configuring the application If you are building RapidSVN from the tarball, there is already the "configure" script present. If you are building from a fresh working copy from the repository, you need to create this script running ./autogen.sh. You need libtool and autogen for this. Now that you have a "configure" script in the top directory of the RapidSVN source tree, run it and check the output: ./configure The script will try to figure out which libraries are available on your machine and where to find them. There are several options for "configure" to tell the script where to find stuff: --with-apr-config= --with-apu-config= --with-neon-config= --with-wx-config= --with-svn-include= python gen-make.py -t dsp \ --with-openssl=C:\openssl-0.9.8a \ --with-zlib=C:\zlib-1.2.3 --with-libintl=C:\svn-win32-libintl D. Compile Start Microsoft Visual C++ 6.0 and open the workspace: C:\Subversion-1.3.0\subversion_msvc.dsw Activate the configuration "__ALL__ - Debug" and start the compilation. After a while the compilation should have finished. Now activate the configuration "__ALL__ - Release" and start the compilation. 3.1.4 Building wxWidgets 2.6.2 A. Unpack Unpack wxWidgets source package. The directory that contains wxWidgets in our example will be: C:\wxWidgets-2.6.2 B. Patch wxWidgets has to be modified to run without error. The runtime error will only occur when building and running the Unicode Debug build of wxWidgets. Open the file "C:\wxWidgets-2.6.2\src\common\xpmdecod.c" Change line 553 from name = wxStrdupA(inname); to name = _strdup(inname); C. Configure We have to configure and compile wxWidgets four times. To configure wxWidgets you have to edit the file C:\wxWidgets\build\msw\config.vc The following setting apply for all of our configurations: SHARED = 0 MONOLITHIC = 0 USE_GUI = 1 USE_EXCEPTIONS = 1 USE_THREADS = 1 For RapidSVN we need four permutations of BUILD = debug | release UNICODE = 0 | 1 D. Compile Open a command shell and make sure the Visual Studio tools are can be found by typing "nmake". There may be a shortcut to a batch script provided by Microsoft Visual Studio that has setup the environment variables correctly. Change to the directory C:\wxWidgets-2.6.2\build\msw and type nmake /f makefile.vc 3.1.5 Building RapidSVN A. Prepare Create the environment variables OPENSSL, WX and SUBVERSION. In our example, these will be OPENSSL=C:\openssl-0.9.8a SUBVERSION=C:\subversion-1.3.0 WX=C:\wxWidgets-2.6.2 LIBINTL=C:\svn-win32-libintl The directory that contains RapidSVN in our example will be: C:\RapidSVN B. Compile Now open the RapidSVN workspace in Microsoft Visual C++ 6.0: C:\RapidSVN\rapidsvn.dsw Compilation should work out of the box now. You will have to adapt paths a bit if you plan to use a different version of wxWidgets or Subversion. If you want to create an installed you have to compile the configurations: rapidsvn - Win32 Release rapidsvn - Win32 Unicode Release If you plan to debug and develop for RapidSVN you might want to build the debug configurations as well rapidsvn - Win32 Debug rapidsvn - Win32 Unicode Debug C. Create Installer Run the batch script to collect necessary DLLs: C:\RapidSVN\packages\win32\FetchFiles.bat Now open the Innosetup project and compile the installer: C:\RapidSVN\packages\win32\rapidsvn.iss 4 Building on Mac OS/X Basically, building on Mac OS/X the same mechanisms are used as under Linux. But there are some differences. While on Linux an application is a binary which relies on some shared libraries (which are single binary files as well), application on Mac OS/X have to resist in a special directory structure. This binary can still rely on other shared libraries, but since most applications on Mac OS/X are installed only by dragging the application icon to the destination you cannot be sure, whethere the installed shared libraries match the versions you need. We decided to use only static linking for Subversion and wxWidgets on Mac OS/X, so everything is included in a single binary. First, we need to create some temporary directories 4.1 Building/Installing the libraries TO BE CONTINUED...