====================================== 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 3.2 Building on Windows using Cygwin and Gtk as X11 application Notation: This build is for only development. It would generate too many non-standard dependencies on your executable binary. 3.2.1 Installing All dependencies Install all below tools and dependencies via setup.exe of Cygwin. gcc g++ make libtool autoconf automake pkg-config xorg-x11-devel gtk2-x11-devel glib2-devel pango-devel atk-devel zlib png-devel libjpeg-devel tiff-devel libapr1 libaprutil1 libiconv2-devel libexpat0 openssl-devel libneon26 subversion-devel All other dependencies will be automaticaly selected. 3.2.4 Building wxWidgets as wxGtk Extract wxWidgets source package. You should build it as wxGtk which requires X11 server. Because wxMSW(using win32api) would conflict with exsisting your Subversion which configured for Cygwin. If you are using version 2.8.7 or lesser you might need to patch. http://svn.wxwidgets.org/viewvc/wx/wxWidgets/branches/WX_2_8_BRANCH/src/unix/displayx11.cpp?r1=49879&r2=50143 mkdir build/cygwin-gtk cd build/cygwin-gtk ../../configure --with-gtk=2 make make install wxGtk would be installed into /usr/local by default with name of ansi-release. But you can cofigure as you like. After installation, dlls are generated in the same directory of libraries. You should move them to your bin directory. mv /usr/local/lib/cygwx*.dll /usr/local/bin 3.2.4 Building and installing RapidSVN ...is same as Linux/Unix section. See 2.2 - 2.4. If your configure script failed, retry like: ./configure --with-apr-confg=apr-1-config --with-apu-config=apu-1-config 3.2.4 Using or testing RapidSVN X11 server is required before starting RapidSVN. (Xming is recommended instead of CygwinX.) And DISPLAY environment variable should be set to connect to X11 server form X client. DISPLAY=localhost:0 export DISPLAY Well, raunch RapidSVN now. src/rapidsvn.exe& 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, whether 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. 4.1 Preparations Create the following directory: $HOME/RapidSVN-build This will be our temporary directory where all the necessary libraries that aren't part of Darwin/OS X will be. The RapidSVN working copy will be there too. To make life easier for the configure scripts run export PATH=$HOME/RapidSVN-build/bin:$PATH export RAPIDSVN_ARCH="-arch i386 -arch ppc" (10.3 - 10.6) export RAPIDSVN_ARCH="-arch i386" (10.7+) 4.2 Download and Install required packages Make sure you have installed Xcode (so gcc will work). Download the following tarballs: - db-4.8.30.NC.tar.gz - apr-1.4.5.tar.bz2 - apr-util-1.3.12.tar.bz2 - neon-0.29.6.tar.gz - subversion-1.7.1.tar.bz2 - wxMac-2.8.12.tar.gz Extract the packages to $HOME/RapidSVN-build, so we have a directory $HOME/RapidSVN-build/subversion-1.7.1 and so on. 4.3 Configure/Compile/Install Berkeley DB cd to: $HOME/RapidSVN-build/db-4.8.30NC/build_unix Configure a static build: CFLAGS="-O3 $RAPIDSVN_ARCH -mmacosx-version-min=10.4 -fvisibility=hidden" \ LDFLAGS="$RAPIDSVN_ARCH -mmacosx-version-min=10.4" \ ../dist/configure --prefix=$HOME/RapidSVN-build --disable-shared Compile and install Berkeley DB: make make install 4.4 Configure/Compile/Install apr cd to: $HOME/RapidSVN-build/apr-1.4.5 Configure a static build: CFLAGS="-O3 $RAPIDSVN_ARCH -mmacosx-version-min=10.4 -fvisibility=hidden" \ LDFLAGS="$RAPIDSVN_ARCH -mmacosx-version-min=10.4" \ ./configure --prefix=$HOME/RapidSVN-build --disable-shared Compile and install apr: make make install 4.5 Configure/Compile/Install apr-util cd to: $HOME/RapidSVN-build/apr-util-1.3.12 Configure a static build: CFLAGS="-O3 $RAPIDSVN_ARCH -mmacosx-version-min=10.4 -fvisibility=hidden" \ LDFLAGS="$RAPIDSVN_ARCH -mmacosx-version-min=10.4" \ ./configure --prefix=$HOME/RapidSVN-build --with-apr=$HOME/RapidSVN-build \ --with-dbm=db48 --with-berkeley-db=$HOME/RapidSVN-build Compile and install apr-util: make make install 4.6 Configure/Compile/Install neon cd to: $HOME/RapidSVN-build/neon-0.29.6 Configure a static build: CFLAGS="-O3 $RAPIDSVN_ARCH -mmacosx-version-min=10.4 -fvisibility=hidden" \ LDFLAGS="$RAPIDSVN_ARCH -mmacosx-version-min=10.4" \ ./configure --prefix=$HOME/RapidSVN-build --disable-shared --with-ssl=openssl Compile and install neon: make make install 4.7 Configure/Compile/Install Subversion cd to: $HOME/RapidSVN-build/subversion-1.7.1 Configure a static build with OpenSSL and Berkeley DB support: CFLAGS="-g -O2 $RAPIDSVN_ARCH -mmacosx-version-min=10.4 -fvisibility=hidden -I$HOME/RapidSVN-build/include" \ LDFLAGS="$RAPIDSVN_ARCH -mmacosx-version-min=10.4 -L$HOME/RapidSVN-build/lib" ./configure --prefix=$HOME/RapidSVN-build \ --with-berkeley-db --disable-shared --without-apxs --with-apr=$HOME/RapidSVN-build --with-apr-util=$HOME/RapidSVN-build Compile and install Subversion: make make install You can check your installation for OpenSSL support by running: svn --version Check for the line '- handles 'https' scheme'. You can check your installation for Berkeley DB support by running: svnadmin create --fs-type=bdb /tmp/test 4.8 Configure/Compile/Install wxWidgets cd to the extracted wxWidgets directory. Configure wxWidgets, so it is NOT built as shared library; with Unicode support: sed -e "s#-arch ppc -arch i386#$RAPIDSVN_ARCH#" < configure > configure-rapidsvn chmod +x configure-rapidsvn CFLAGS="-I$HOME/RapidSVN-build/include/apr-1 -fvisibility=hidden" \ CXXFLAGS="-I$HOME/RapidSVN-build/include/apr-1 -fvisibility=hidden -fvisibility-inlines-hidden" \ LDFLAGS="-L$HOME/RapidSVN-build/lib" \ ./configure-rapidsvn --prefix=$HOME/RapidSVN-build \ --disable-shared --enable-unicode --enable-universal_binary \ --with-macosx-version-min=10.4 --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk Compile wxWidgets: make Install wxWidgets after successful compilation: make install If you have set PATH you can run "wx-config" now. If this works you have a running wxWidgets installation 4.9 Configure/Compile/Install RapidSVN Download and extract a RapidSVN tarball or checkout a new working copy of RapidSVN in $HOME/RapidSVN-build/rapidsvn Cd to the directory. Now configure the static build: ./autogen.sh CFLAGS="-g -O2 $RAPIDSVN_ARCH -fvisibility=hidden -I$HOME/RapidSVN-build/include" \ CXXFLAGS="-g -O2 $RAPIDSVN_ARCH -fvisibility=hidden -fvisibility-inlines-hidden" \ LDFLAGS="$RAPIDSVN_ARCH -L$HOME/RapidSVN-build/lib" ./configure --prefix=$HOME/RapidSVN-build \ --disable-shared \ --with-svn-include=$HOME/RapidSVN-build/include \ --with-svn-lib=$HOME/RapidSVN-build/lib \ --with-apr-config=$HOME/RapidSVN-build/bin/apr-1-config \ --with-apu-config=$HOME/RapidSVN-build/bin/apu-1-config \ --with-wx-config=$HOME/RapidSVN-build/bin/wx-config \ --disable-dependency-tracking Compile RapidSVN: make Since you cannot run a carbon application directly you have to create RapidSVN.app first: cd packages/osx ./make_osx_bundle.sh You can run RapidSVN from the shell: open -a RapidSVN.app