~ubuntu-branches/ubuntu/karmic/ubuntuone-client/karmic-proposed

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
== Testing the Nautilus extension ==
Ideally, we should have packages for testing, but since for each change this
would be too much work, here are some instructions on how to setup a GNOME
development installation to test it, without interfering the system-installed
GNOME.

To do so, the best way might be to use jhbuild, a set of scripts to build
the whole GNOME desktop from GIT.

1. Install jhbuild
jhbuild package is available, but regardless of whether you install it with
apt-get or by just getting the sources from GNOME GIT, you should follow the
instructions at http://live.gnome.org/Jhbuild to set it up. The most important
thing is to have a ~/.jhbuildrc file where the configuration to be used for
building is stored. Default values should be ok, but make sure you set the
correct moduleset line, so that includes the correct GNOME version (2.28 for
Karmic). An example of this is:

	moduleset = [ 'gnome-2.28', 'freedesktop-2.28', 'gnome-external-deps-2.28', 'gnome-suites-2.28' ]

Which would install most of GNOME. Just using 'gnome-2.28' should be enough for
testing the Nautilus extension though, but it doesn't harm to have all the
others since jhbuild would just build what you tell it to build.

2. Bootstrap
This step installs, in the directory setup for installation in the ~/.jhbuildrc
file, all the build tools needed for building, like autotools, gettext, python,
etc.

This is optional, since if not done, jhbuild would use the needed stuff from
the system it's running on (autotools, gettext, etc), but if you see problems
related to these packages, bootstrap would get the correct versions of all
these tools.

To do this, just run:

	jhbuild bootstrap

3. Build Nautilus

	jhbuild build nautilus

This would build and install (in the directory setup for installation in the
~/.jhbuildrc) Nautilus and all its dependencies. This takes a long time, so
make sure to not plan to sit down looking at the computer until it ends. Also,
it would probably encounter some errors, which you'll have to try to deal with.

Documentation for some modules always fail (at least for me), so when it
happens to you, just open a shell from within jhbuild (it will offer you the
option when there is an error in building), edit the top-level Makefile (not
Makefile.am or Makefile.in, but plain Makefile) and remove 'doc' (or 'help')
from the SUBDIRS line.

Also, building API documentation takes a long time, so to reduce the time
needed for building, make sure to have this line:

	# extra arguments to pass to all autogen.sh scripts
	# to speed up builds of gnome2, try '--disable-static --disable-gtk-doc'
	autogenargs='--disable-static --disable-gtk-doc'

in ~/,jhbuildrc.

You might want to build the whole of GNOME. In that case, instead of 'jhbuild
build nautilus', run:

	jhbuild build

4. Build Ubuntu One Nautilus extension

You need to build the extension from within jhbuild environment. To do so,
I have a profile in GNOME Terminal which runs the following script:

	export BONOBO_ACTIVATION_PATH=/opt/extra/lib64/bonobo/servers:/opt/extra/lib/bonobo/servers
	export PATH=/opt/icecream/bin:/opt/extra/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/lib/jvm/jre/bin
	export LD_LIBRARY_PATH=/opt/extra/lib64:/opt/extra/lib
	export PKG_CONFIG_PATH=/opt/extra/lib64/pkgconfig:/opt/extra/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig
	export MONO_PATH=/usr/lib:/opt/extra/lib
	export XDG_DATA_DIRS=/opt/extra/share
	export XDG_CONFIG_DIRS=/opt/extra/etc/xdg
	export ACLOCAL_FLAGS="-I /opt/extra/share/aclocal"

	export GSM_VERBOSE_DEBUG=1

	alias make='make -j8'
	cd /opt/extra/src
	bash

Replace '/opt/extra' with the installation directory you setup in ~/.jhbuildrc.

All this just sets environment variables used for building to point to the
tree where jhbuild installed stuff.

Once running on jhbuild build environment, just build and install our extension:

	./autogen.sh --prefix=$install_directory_in_jhbuildrc
	make
	make install

5. Test the extension
To test the extension you need to run the copy of Nautilus you just built with
jhbuild. You can either create a separate user and have the following in the
~/.xsession/~/.xinitc startup scripts:

	export PATH=/opt/extra/bin:$PATH
	ln -s /var/run/dbus/system_bus_socket /opt/extra/var/run/dbus/system_bus_socket
	jhbuild run /opt/extra/bin/gnome-session

or, the easiest way:

	jhbuild run /opt/extra/bin/nautilus

again, replacing /opt/extra with whatever install directory you use in
~/.jhbuilrc