File: INSTALL

package info (click to toggle)
rapidsvn 0.12.0dfsg-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 7,616 kB
  • ctags: 6,139
  • sloc: cpp: 20,665; ansic: 10,058; sh: 9,991; python: 664; makefile: 361; xml: 57
file content (550 lines) | stat: -rw-r--r-- 18,864 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
               ======================================
                      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=<location of apr-config>
        --with-apu-config=<location of apu-config>
        --with-neon-config=<location of neon-config>
        --with-wx-config=<location of wx-config>
        --with-svn-include=<directory which contains "subversion-1"
        --with-svn-lib=<directory which contains "livsvn*"
        
        These options will be pretty sufficient for most installations.
        
2.3     Building the application

        Well, type:
        make
        
        Now the application should build. If you get compiler or linker
        errors first check the configuration and directories on your
        machine. If this doesnt solve your problems, google for help,
        search the mailing list archives and if the problem is still
        persistent, ask about your problem on users@rapidsvn.tigris.org.
        
2.4     Installing the application

        Well, type (as user "root"):
        make install
        
        Of course, you can create binary packges for your distribution
        as well and then use the mechanisms it provides to install the 
        package (e.g. dpkg, rpm). This is beyond the scope of this file.
        
        

3       Building on Windows

        We are describing only ONE version or Subversion and wxWidgets
        for Windows. On Unix, you often have to use the libraries that
        are already installed. On Windows, things are different: you
        download and build what you need. 
        
        Most people wont build RapidSVN on Windows at all but use the
        binary packages.

3.1     Building on Windows using Microsoft Visual Studio 6.0

3.1.1   Building OpenSSL

        Unpack the OpenSSL source package. Follow the build instructions
        to configure and compile it. Configure OpenSSL so a static library
        is built. You have to build using ms\nt.mak to achieve this.
        The static library version of OpenSSL avoids conflicts with already 
        installed versions of OpenSSL DLLs on the system. 
        
        The directory that contains OpenSSL in our example will be:
          C:\OpenSSL-0.9.8a


3.1.2   Building ZLib

        Unpack the ZLib source package. Follow the build instructions
        to configure and compile it.
        
        The directory that contains OpenSSL in our example will be:
          C:\ZLib-1.2.3
          


3.1.3   Building Subversion 1.3.0

    A. Unpack

        Unpack a Subversion source package. Read the file INSTALL in the 
        Subversion directory and make sure you have installed all the 
        tools you need.
        
        You will have to install Python, Perl, Microsoft Platform SDK
        and an assembler like nasm or masm.
        
        The directory that contains Subversion in our example will be:
          C:\Subversion-1.3.0
        
        Unpack the Berkeley DB binaries provided on the Subversion site
        to the source tree. After this, the Berkeley DB directory
        should be:
          C:\Subversion-1.3.0\db4-win32
          
        Unpack the LibIntl "svn-win32-libintl.zip" package provided on the 
        Subversion site and unpack it to a directory so after unpacking
        you have a directory like:
          C:\svn-win32-libintl


    B. Patch
    
        Well, some releases of Subversion cant be compiled on Windows without
        adding some minor modifications.
        
        Open the file "C:\Subversion-1.3.0\neon\src\ne_xml.c
        
        Comment out the code the lines 50-54:
        //#if !defined(XML_MAJOR_VERSION) || (XML_MAJOR_VERSION < 2 \
        //                                    && XML_MINOR_VERSION == 95 \
        //                                    && XML_MICRO_VERSION < 2)
        //#define NEED_BOM_HANDLING
        //#endif
        
        
    C. Configure
        
        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.
        
        Before configuring and compiling the code we want to tell Subversion
        it shall link to the static library version of OpenSSL.
        
        Create an environment variable OPENSSL_STATIC with the value "yes"
        to achieve this.
        
        Now we have to configure the source tree using a python script
        and tell the script to create the Visual Studio workspace and
        project files:
        
        C:\Subversion-1.3.0> 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, 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.

		Berkeley DB (BDB) support is not included because of difficulties
		enabling static BDB support while building Subversion 1.6.2+. (It
		might work as a dynamic build with a normally-installed Berkeley
		DB on the system, as per Linux and other Unixes, but this would
		not result in a self-contained and easily-installed Mac OS X
		application.)

4.1     Preparations 

	Create the following directory:
        $HOME/RapidSVN-build

	This will be our temporary directory where all the necessary
	libraries that arent 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"
	

4.2     Download and Install required packages

	Make sure you have installed Xcode (so gcc will work).

	Download the following tarballs:
	- wxMac-2.8.10.tar.gz
	- subversion-1.6.2.tar.gz (or newer)
	- subversion-deps-1.6.2.tar.gz (or newer)

	Extract the packages to $HOME/RapidSVN-build, so
	we have a directory $HOME/RapidSVN-build/subversion-1.6.2
    and so on.


4.3     Configure/Compile/Install Subversion

        cd to:
          $HOME/RapidSVN-build/subversion-1.6.2

        Configure a static build with OpenSSL and Berkeley DB support:
          CFLAGS="-g -O2 -arch i386 -arch ppc -mmacosx-version-min=10.3 -fvisibility=hidden" \
            LDFLAGS="-arch i386 -arch ppc -mmacosx-version-min=10.3" ./configure --prefix=$HOME/RapidSVN-build \
            --without-berkeley-db --with-ssl --disable-shared --without-apxs

        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'.


4.4     Configure/Compile/Install wxWidgets

	cd to the extracted wxWidgets directory.

        Configure wxWidgets, so it is NOT built as shared library;
        with Unicode support:
          CFLAGS="-I$HOME/RapidSVN-build/include/apr-1" \
            CXXFLAGS="-I$HOME/RapidSVN-build/include/apr-1" \
            LDFLAGS="-L$HOME/RapidSVN-build/lib" \
	    ./configure --prefix=$HOME/RapidSVN-build \
            --disable-shared --enable-unicode --enable-universal_binary \
            --with-macosx-version-min=10.3

        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.5     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:
          CFLAGS="-g -O2 -arch i386 -arch ppc -fvisibility=hidden -I$HOME/RapidSVN-build/include" \
            CXXFLAGS="-g -O2 -arch i386 -arch ppc -fvisibility=hidden -fvisibility-inlines-hidden" \
            LDFLAGS="-arch i386 -arch ppc -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