~verterok/ubuntuone-client/fix-571548

« back to all changes in this revision

Viewing changes to README

  • Committer: Rodrigo Moya
  • Date: 2009-06-26 14:58:33 UTC
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: rodrigo.moya@canonical.com-20090626145833-18tb78qij0nacxaw
Added instructions to test Nautilus extension with jhbuild

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Hello
 
1
== Testing the Nautilus extension ==
 
2
Ideally, we should have packages for testing, but since for each change this
 
3
would be too much work, here are some instructions on how to setup a GNOME
 
4
development installation to test it, without interfering the system-installed
 
5
GNOME.
 
6
 
 
7
To do so, the best way might be to use jhbuild, a set of scripts to build
 
8
the whole GNOME desktop from GIT.
 
9
 
 
10
1. Install jhbuild
 
11
jhbuild package is available, but regardless of whether you install it with
 
12
apt-get or by just getting the sources from GNOME GIT, you should follow the
 
13
instructions at http://live.gnome.org/Jhbuild to set it up. The most important
 
14
thing is to have a ~/.jhbuildrc file where the configuration to be used for
 
15
building is stored. Default values should be ok, but make sure you set the
 
16
correct moduleset line, so that includes the correct GNOME version (2.28 for
 
17
Karmic). An example of this is:
 
18
 
 
19
        moduleset = [ 'gnome-2.28', 'freedesktop-2.28', 'gnome-external-deps-2.28', 'gnome-suites-2.28' ]
 
20
 
 
21
Which would install most of GNOME. Just using 'gnome-2.28' should be enough for
 
22
testing the Nautilus extension though, but it doesn't harm to have all the
 
23
others since jhbuild would just build what you tell it to build.
 
24
 
 
25
2. Bootstrap
 
26
This step installs, in the directory setup for installation in the ~/.jhbuildrc
 
27
file, all the build tools needed for building, like autotools, gettext, python,
 
28
etc.
 
29
 
 
30
This is optional, since if not done, jhbuild would use the needed stuff from
 
31
the system it's running on (autotools, gettext, etc), but if you see problems
 
32
related to these packages, bootstrap would get the correct versions of all
 
33
these tools.
 
34
 
 
35
To do this, just run:
 
36
 
 
37
        jhbuild bootstrap
 
38
 
 
39
3. Build Nautilus
 
40
 
 
41
        jhbuild build nautilus
 
42
 
 
43
This would build and install (in the directory setup for installation in the
 
44
~/.jhbuildrc) Nautilus and all its dependencies. This takes a long time, so
 
45
make sure to not plan to sit down looking at the computer until it ends. Also,
 
46
it would probably encounter some errors, which you'll have to try to deal with.
 
47
 
 
48
Documentation for some modules always fail (at least for me), so when it
 
49
happens to you, just open a shell from within jhbuild (it will offer you the
 
50
option when there is an error in building), edit the top-level Makefile (not
 
51
Makefile.am or Makefile.in, but plain Makefile) and remove 'doc' (or 'help')
 
52
from the SUBDIRS line.
 
53
 
 
54
Also, building API documentation takes a long time, so to reduce the time
 
55
needed for building, make sure to have this line:
 
56
 
 
57
        # extra arguments to pass to all autogen.sh scripts
 
58
        # to speed up builds of gnome2, try '--disable-static --disable-gtk-doc'
 
59
        autogenargs='--disable-static --disable-gtk-doc'
 
60
 
 
61
in ~/,jhbuildrc.
 
62
 
 
63
You might want to build the whole of GNOME. In that case, instead of 'jhbuild
 
64
build nautilus', run:
 
65
 
 
66
        jhbuild build
 
67
 
 
68
4. Build Ubuntu One Nautilus extension
 
69
 
 
70
You need to build the extension from within jhbuild environment. To do so,
 
71
I have a profile in GNOME Terminal which runs the following script:
 
72
 
 
73
        export BONOBO_ACTIVATION_PATH=/opt/extra/lib64/bonobo/servers:/opt/extra/lib/bonobo/servers
 
74
        export PATH=/opt/icecream/bin:/opt/extra/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/lib/jvm/jre/bin
 
75
        export LD_LIBRARY_PATH=/opt/extra/lib64:/opt/extra/lib
 
76
        export PKG_CONFIG_PATH=/opt/extra/lib64/pkgconfig:/opt/extra/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig
 
77
        export MONO_PATH=/usr/lib:/opt/extra/lib
 
78
        export XDG_DATA_DIRS=/opt/extra/share
 
79
        export XDG_CONFIG_DIRS=/opt/extra/etc/xdg
 
80
        export ACLOCAL_FLAGS="-I /opt/extra/share/aclocal"
 
81
 
 
82
        export GSM_VERBOSE_DEBUG=1
 
83
 
 
84
        alias make='make -j8'
 
85
        cd /opt/extra/src
 
86
        bash
 
87
 
 
88
Replace '/opt/extra' with the installation directory you setup in ~/.jhbuildrc.
 
89
 
 
90
All this just sets environment variables used for building to point to the
 
91
tree where jhbuild installed stuff.
 
92
 
 
93
Once running on jhbuild build environment, just build and install our extension:
 
94
 
 
95
        ./autogen.sh --prefix=$install_directory_in_jhbuildrc
 
96
        make
 
97
        make install
 
98
 
 
99
5. Test the extension
 
100
To test the extension you need to run the copy of Nautilus you just built with
 
101
jhbuild. You can either create a separate user and have the following in the
 
102
~/.xsession/~/.xinitc startup scripts:
 
103
 
 
104
        export PATH=/opt/extra/bin:$PATH
 
105
        ln -s /var/run/dbus/system_bus_socket /opt/extra/var/run/dbus/system_bus_socket
 
106
        jhbuild run /opt/extra/bin/gnome-session
 
107
 
 
108
or, the easiest way:
 
109
 
 
110
        jhbuild run /opt/extra/bin/nautilus
 
111
 
 
112
again, replacing /opt/extra with whatever install directory you use in
 
113
~/.jhbuilrc