
                     Subcommander, installation guide.
               ============================================

$LastChangedDate: 2005-11-13 16:01:44 +0100 (Sun, 13 Nov 2005) $

Contents:

     I.  Introduction
    II.  Build Notes
      A.  Requirements
       1.  Common
       2.  Unix
       3.  MacOSX
       4.  Windows
      B.  Unix
      C.  MacOSX
      D.  Windows



I.   Introduction

     This document tries to  collect the necessary information  to build
     Subcommander from source.
     
     If  you want  to  build  Subcommander  and the notes  below are not
     enough write to 
          
                         dev@subcommander.tigris.org
                      
     and I will try to fill the gaps in the notes below.
     

     To subscribe to the list send an email to:
     
                     dev-subscribe@subcommander.tigris.org



II.  Build Notes



  A. Requirements
  ===============
  
     1. Common Requirements:
     -----------------------
     
        - Subversion  1.2.x and  anything subversion  depends on. (neon,
          openssl, berkeley db (bdb), apr) http://subversion.tigirs.org
             
          Subcommander expects a full subversion build with ssl. bdb  is
          only required for the Win32  build. Unix and MacOSX  can do do
          without bdb.
          
        - Qt3 ( >= 3.2+ and < 4.0, ie. 3.2.x or 3.3.x)
          http://www.trolltech.com
          
        - boost
          http://www.boost.org
       

     2. Unix Requirements:
     ---------------------
     
        If your c++ compiler does have an incomplete stl (like gcc 2.96)
        you will need stlport to build Subcommander.
        
        - stlport
          http://www.stlport.org

          
     3. MacOSX Requirements:
     -----------------------
     
        - MacOSX 10.3, XCode 1.5
          MacOSX 10.4, XCode 2.0 (gcc 3.3)
        
        - Qt
          Subcommander depends on the native MacOSX version.
          
          
     4. Windows Requirements:
     ------------------------
     
        - Qt
          As far as I know, the  only way to get the 3.2  Non-Commercial
          Windows version is to buy  the book "C++ GUI Programming  with
          Qt 3".
          
        - Compiler
          vc71

        - cppunit 1.9.11
          http://cppunit.sourceforge.net
          only necessary if you want to build the (few) test.

     
  B. Unix
  =======
  
     If you  downloaded a  source archive  from  subcommander.tigris.org
     simply run the typical
     
     
     ./configure
     make
     make install
     
     
     To build the Subcommander source  from the  repository you have to
     run a few additional steps before you  can run configure, make and
     make install.
     
     ./gen_ac.sh           # this will create the configure script
     ./gen_version.rb      # this will create sublib/version.out.h
     
     
     make install  will copy the binaries to --prefix/bin and  the icons
     to --prefix/share/subcommander/icons.
     
     The binaries are named "sc" (subcommander) and "sm" (submerge).

     The configure  script  will try to  automatically detect  where the
     necessary libraries are installed on your system.

     If it is unable to automatically detect a library  you have to tell
     configure where it is using one of the --with-<library> options:

     --with-apr
     --with-apr-util
     --with-boost
     --with-subversion
     --with-qt
     --with-neon
     --with-openssl
     --with-berkeley-db
     --with-stlport

     apr, apr-util, subversion and qt are detected at several places.
     
     The qt detection uses $QTDIR to find Qt.  If $QTDIR  is not set you
     have to set --with-qt.
     
     boost, neon, ssl, bdb and  stlport  are only detected  if they  are
     installed in a standard path the compiler knows about.

     Building with  stlport links to  stlport_gcc  lib. You may  have to
     patch the library name if you build with a different compiler.

     boost
     ~~~~~
     
     You do not need a complete install of boost. Subcommander is  happy
     with just the path to its sources. You can simply extract boost  to
     a place of your  choice. Enter  the directory (boost-<version>) and
     create an 'include' link that points to the current directory '.'. 
     
     > cd boost-<version>
     > ln -s . include

     After that you can give the source path to Subcommanders  configure
     script.


     startup
     ~~~~~~~
     
     You  will   have  to   install  Subcommander   before  running  it.
     subcommander looks  for its   icons  and  the submerge   binary  in
     the  --prefix   path.   It  will    not   find  them  if  you   run
     subcommander  from  the  build  directory  (without  a  prior  make
     install).
      
 
  C. MacOSX build
  ===============
  
     You can follow the Unix/Linux build description for configure   and
     make. But do NOT run make install.
     
     After make  finished successfully  go to  the subfolder dist/macosx
     and  run the  ruby script   bundle.rb. It  does create  the binary
     bundels   for   subcommander    and   submerge   in the   subfolder
     "Subcommander".
    
       
  D. Windows build
  ================
  
     1. Apply doc/apr-iconv.patch to apr-iconv/lib/iconv_module.c.
        This patch will  make sure that  we use "our"  iconv modules and
        not those from another program (like TortoiseSVN..).
        
     2. Build Subversion.
        See  subversions INSTALL  file and  build  subversion  with nls,
        openssl and zlib.
     
     3. Build Subcommander
  
     The Windows build requires  all dependencies in a  "libs" subfolder
     in the subcommander source root folder. This should look like this:
     
     libs/apr                root dir of apr        source tree
          apr-iconv          root dir of apr-iconv  source tree
          apr-util           root dir of apr-util   source tree
          boost              root dir of boost      source tree
          openssl            root dir of openssl    source tree
          subversion         root dir of subversion source tree
          gettext            root dir of gettext installation
          qt                 root dir of qt installation
          db4                create this directory layout by copying the
            /include         files from the bdb build dirs.
              db.h
            /lib
              libdb42.lib
              libdb42d.lib

     The easiest way to create this is to use Windows junction points.

     Run the ruby script gen_version.rb  from the root source folder  to
     create  sublib/version.out.h.  If  you don't   have  ruby  you  can
     simply copy sublib/version.in.h to sublib/version.out.h.

     Open sc.sln with VC71 and build...
