summaryrefslogtreecommitdiff
path: root/README
blob: 10f41b3e257a92999ccfaf0cc826f6a320196a44 (plain)
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
This file contains build instructions for Nautilus, the GNOME shell
and file manager.

====================
0: Table of contents
====================

0: Table of contents
1: Hacking
2: Introduction
3: Distribution-specific notes
4: Compiling
5: Issues when running Nautilus
6: Mozilla support
7: FreeType issues

==========
1: Hacking
==========

If you would like to hack on Nautilus, or have patches, please send
mail to the Nautilus maintainer: Darin Adler <darin@eazel.com>.
Patches should also be sent to the Nautilus mailing list:
<nautilus-list@lists.eazel.com>

The HACKING file contains other things you should know when hacking on
Nautilus and when contributing code. Please, make sure you check the
coding style document in docs/style-guide.html and other documents
found in the "docs" directory.

===============
2: Introduction
===============

To build Nautilus without interfering with an existing Gnome install,
you will need to build several components either from CVS or from 
tarballs into a separate prefix. Detailed instructions on how
to accomplish this are available in section 4.

==============================
3: Distribution-specific notes
==============================

The following describes the libraries that Nautilus hackers use for
development and what we have tested with. At the moment, we make no
guarantees one way or another about whether Nautilus will work with
other versions.

You will also need the library package that is associated with each
development package, these versions are for Red Hat 6.2 and Debian
"potato":

library         Red Hat                     Debian                          approx. version
--------------  ------------------------    ------------------------------  ------------------
audiofile       audiofile-devel-0.1.9-3     libaudiofile-dev (0.1.9-0.1)    0.1.9
esound		esound-0.2.20		    ???				    0.2
libc            glibc-devel-2.1.3-15        libc6-dev (2.1.3-10)            2.1.3
libc++          egcs-c++-1.1.2-30           libstdc++2.10-dev (2.95.2-12)   2.9.0, 2.10
libjpeg         libjpeg-devel-6b-10         libjpeg62-dev (6b-1.2)          6b 1.0-1.2
libpng          libpng-devel-1.0.5-3        libpng2-dev (1.0.5-1)           1.0.5
libtiff         libtiff-devel-3.5.4-5       libtiff3g-dev (3.5.4-5)         3.5.4
libungif        libungif-devel-4.1.0-4      libungif3g-dev (3.0-3)          3.0 or 4.1.0
Xlib            XFree86-devel-3.3.6-20      xlib6g-dev (3.3.6-7)            3.3.6
zlib            zlib-devel-1.1.3-6          zlib1g-dev (1.1.3-5)            1.1.3
freetype2	freetype2-devel-1.0beta8    ???				    1.0beta8

Other modules for Red Hat users: either 6.1 or 6.2

        - For most modules, the versions in Red Hat 6.1 or 6.2 will do (listed above).
        - ORBit requires popt-1.5, which can be fetched from:

        ftp://ftp.valinux.com/pub/mirrors/redhat/rawhide/i386/RedHat/RPMS/popt-1.5-0.45.i386.rpm
        ftp://ftp.valinux.com/pub/mirrors/redhat/redhat/redhat-6.2/i386/RedHat/RPMS/popt-1.5-0.48.i386.rpm

	- FreeType packages are available here:

	http://developer.eazel.com/eazel-hacking/updates/freetype2/freetype2-1.0beta8-0_eazel_1.i386.rpm
	http://developer.eazel.com/eazel-hacking/updates/freetype2/freetype2-devel-1.0beta8-0_eazel_1.i386.rpm

Other modules for Debian users: using potato, or possibly woody

If you need to get a copy of popt from source: 

        CVSROOT=:pserver:anonymous@cvs.rpm.org:/cvs/devel
        The default password is a carriage return.  You should do a cvs co popt

============
4: Compiling
============

First, make sure you have installed the packages detailed below. If
you are running GNOME from binaries (Helix Code or your native
distribution binaries), please make sure you have installed the
corresponding development packages.  (i.e.: the *-devel packages which
provide the necessary C header files.

Then, make sure you have no old version of the packages nautilus
depends on on your system. You can check the version of the relevant
packages by trying to execute "package-config --version" (ie:
gnome-config --version will report gnome-libs version, gconf-config
--version will report gconf's version).

        Compiling from tarballs.
        ------------------------
If you are compiling from tarballs, (ie: using released versions of
nautilus and the relevant packages), you want to follow the
instructions below.

The following lists the packages and the versions they should report.

    module             version            configure options       dist.
    ------             ------             -----------------       ----- 
    rpm                <see below>        --enable-eazel-services RH6.2 or higher
    popt:              <1.5, but not from GNOME CVS, see below>   RH6.2
    glib:              1.2.8                                      HC1.2
    gtk+:              1.2.8                                      HC1.2
    imlib:             1.9.8.1                                    HC1.2
    gnome-xml:         1.8.10                                     HC1.2
    ORBit:             0.5.5                                      HC1.2
    gnome-libs:        1.2.7              --enable-prefer-db1     HC1.2
    gnome-http:        1.0.7					  HC1.2
    oaf:               0.6.2 			                  HC1.2
    gconf:             0.11
    gdk-pixbuf:        0.9.0              --enable-canvas-pixbuf  HC1.2
    gnome-print:       0.24					  HC1.2
    control-center     1.2.2					  HC1.2
    gnome-vfs:         HEAD 
    bonobo:            0.26					  HC
    libglade:          0.14				  	  HC1.2
    libunicode:        0.4					  HC
    medusa:            HEAD
    ammonite:          HEAD
    nautilus:          0.2   

RH6.2 == Version from Red Hat 6.2 OK
HC1.2 == Version from Helix Code Gnome 1.2 OK
HC == Helix Code may be from Evolution Preview

If you are running Helix Code's GNOME, you should not need recompile
the packages marked "HC1.2" provided you have installed the
corresponding development packages.

We assume you want to install these packages in another prefix than
/usr since you want to keep a working system. For the following, we
assume you are installing in /usr/local. ie: ${prefix}=/usr/local

Redefine your PATH environment variable: 
        export PATH=$PATH:${prefix}/bin
Redefine your LD_LIBRARY_PATH environment variable: 
        export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${prefix}/lib
Redefine your GNOME_PATH environment variable: 
        export GNOME_PATH=$GNOME_PATH:${prefix}

In the order defined above and with the specific options detailed
above, you should run the configure scripts with: "./configure
--prefix=${prefix} --special-options" Then, run make; get root and run
make install.

You should get a running nautilus soon after. :)

        Compiling from cvs.
        -------------------
Compiling from cvs usually requires more work and some packages may
not compile. Do so at your own risk!!

The following lists the packages and the versions that are required.

    module             branch             configure options      dist.
    ------             ------             -----------------      -----
    rpm                <see below>       --enable-eazel-services RH6.2 or higher
    popt:              <1.5, but not from GNOME CVS, see below>  RH6.2
    glib:              glib-1-2
    gtk+:              gtk-1-2
    imlib:             HEAD
    gnome-xml:         LIB_XML_1_BRANCH
    ORBit:             orbit-stable-0-5
    gnome-libs:        gnome-libs-1-0     --enable-prefer-db1
    gnome-http:        HEAD
    oaf:               oaf-stable-0-6
    gconf:             gconf-1-0          --disable-debug
    gdk-pixbuf:        HEAD               --enable-canvas-pixbuf
    gnome-print:       HEAD
    control-center     control-center-1-0
    gnome-vfs:         HEAD
    bonobo:            HEAD
    ammonite           HEAD
    xpdf:              HEAD
    medusa:            HEAD
    nautilus:          HEAD

RH6.2 == Version from Red Hat 6.2 OK

One difference between tarball and cvs compilation is that when you
get stuff from cvs, you don't get a configure script. This script has
to be generated.  This script is usually generated with the help of
another script available from cvs named "autogen.sh". For those
interested, "autogen.sh" will run in turn aclocal, automake, autoconf
and configure. You thus need versions of the GNU tools for the
following packages:

        package         version       command
        -------         -------       -------
        automake        1.4           automake --version
        autoconf        2.13          autoconf --version

Earlier versions might work but no one has tested them.

Once you have these tools, you need to follow the compilation
instructions detailed above for tarballs but instead of running
"./configure --stuff", you will run "./autogen.sh --stuff". Using this
also requires you to create the ${prefix}/share/aclocal directory
before compiling any package and setup the following environment
variable:

        export ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I ${prefix}/share/aclocal"

Besides these differences, building from CVS should be otherwise
like building from released packages as described above.

Which RPM version you need depends on your distro. If you have
RedHat6.2, you need at least 3.0.4. If you have RedHat7.0, you need
4.0. Unfortunately, the released rpms from RedHat have bug (a header
file is missing), so for RedHat7.0 you will need the EazelHacking
rpm's for RPM, available from 

	http://developer.eazel.com/eazel-hacking/updates/redhat70/rpm/

===============================
5: Issues when running Nautilus
===============================

There's a script named nautilus-clean.sh, at the top level of the
Nautilus sources. If OAF or GConf changes, you may need to run this
script to get Nautilus to work properly. One way to invoke it is
like this:

        ./nautilus-clean.sh -x

===============================
6: Mozilla support
===============================

Nautilus includes support for browsing HTML content on the local
computer as well as remote web servers.  HTML content is handled by
the Nautilus Mozilla Component.  This component can be optionally
built with Nautilus.  It is automatically enabled at configure time if
Mozilla development libraries are detected on your system.

Mozilla M18 is required for the Mozilla component to build.

The easiest way to get the Mozilla development libraries, is to use
Chris Blizzard's Mozilla rpms.  These can be fetched over here:

http://developer.eazel.com/eazel-hacking/updates/mozilla/mozilla-M18-4.i386.rpm
http://developer.eazel.com/eazel-hacking/updates/mozilla/mozilla-devel-M18-4.i386.rpm

After installing these rpms, you can build nautilus with Mozilla
support as follows:

cd nautilus
rm -f config.cache config.status
./configure

The configure script should automatically detect and use the Mozilla
development libraries.

Alternatively, you can build Mozilla from source and use that.  Lets
say that you built Mozilla in /foo/bar.  You can build nautilus with
support for that Mozilla build as follows:

cd nautilus
rm -f config.cache config.status
./configure --with-mozilla-lib-place=/foo/bar/mozilla/dist/bin
            --with-mozilla-include-place=/foo/bar/mozilla/dist/include

NOTE:   The above command should be issued in one line.  It is split
        into two lines in this document for readability.


NOTE: If you are building mozilla from source (NOT from the rpm), you
need to do some environment setup for the Mozilla component:

export MOZILLA_FIVE_HOME=/foo/bar/mozilla/dist/bin
export LD_LIBRARY_PATH=/foo/bar/mozilla/dist/bin:$LD_LIBRARY_PATH

If you experience linking problems (e. g. undefined reference to
`nsString type_info node'), please note that both applications
(mozilla and nautilus) must be compiled not only with the same version
of compiler, but also with the same compiler flags. Download the right
mozilla package for your distribution (see upper). If you have built
Mozilla from source, Mozilla by default adds CXXFLAGS -fno-rtti and
-fno-exceptions or -fno-handle-exceptions (depends on gcc version).
You have two chances to make things in sync:

1)
Compile mozilla with this .mozconfig script: (You must place it in your home directory)

# sh
# Build configuration script
#
# See http://www.mozilla.org/build/unix.html for build instructions.
#

# Options for 'configure' (same as command-line options).
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --enable-strip-libs
ac_add_options --enable-cpp-rtti
ac_add_options --disable-mailnews
ac_add_options --enable-optimize

2)
Configure mozilla with standard configure script and compile it.
Before configuring Nautilus set proper CXXFLAGS. For example with
latest gcc it means:

CXXFLAGS='-fno-rtti -fno-exceptions'
export CXXFLAGS

For more see configure.in in mozilla source. You can save some space by
disabling RTTI.

Finally, you can disable the Mozilla component (even if Mozilla
development libraries are installed in your system) as follows:

./configure --disable-mozilla-component

===============================
7: FreeType issues
===============================

Nautilus includes support for rendering anti aliased text (Smooth mode).
For smooth mode to work, Nautilus needs to detect and use FreeType2 
in your system.

To learn more about FreeType2, please see:

  http://freetype.sourceforge.net/

If you are using a RedHat 6.x or greater system, then you can easily
add FreeType2 support by installing the rpms found here:

  http://developer.eazel.com/eazel-hacking/updates/freetype2

We will soon have additional autoconf flags for supporting FreeType2
builds in arbitrary locations.

We will also soon have the equivalent Debian packages.