~unity-team/unity-jhbuild/trunk

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
HOW TO BUILD Unity WITH jhbuild
===============================

1. Make sure you have all required dependencies to build the whole Unity stack.
   Run the get-build-deps.sh script you'll find in this package.
   
   You should build with jhbuild == 2.32.4. Grab it from
   ftp://ftp.gnome.org/pub/gnome/sources/jhbuild/2.32/jhbuild-2.32.4.tar.gz
   The newer jhbuild versions seem to exhibit problems with out-of-srcdir
   builds.
   That being said, most of the unity projects should properly support
   out-of-srcdir builds, so this should no longer be an issue.

2. Check out lp:unity-jhbuild to ~/unity. Eg.
   
     $ bzr branch lp:unity-jhbuild ~/unity

3. To build the whole shebang:
   
     $ jhbuild -f ~/unity/unity.jhbuildrc

4. Launch a Unity session taking over your current session:

     $ jhbuild -f ~/unity/unity.jhbuildrc shell
     $ setsid unity
     
     (if the 'unity' command seems to hang, try 'compiz --replace ccp' instead)

5. To reestablish a normal session fire up a fresh terminal (ie. to avoid the
   jhbuild environment you have in the already running terminal) and run:

     $ setsid unity

Using local branches with jhbuild
=================================

You can edit ~/.jhbuildrc-custom file and add lines like:

branches['unity'] = 'projects/my-awesome-unity-branch'

This will make jhbuild use the ~/projects/my-awesome-unity-branch branch
to build the unity component. (of course you can also use lp:.. links)

Enjoy!

If you have questions or problems regarding building or running Unity using
these instructions please contact michal.hruby@canonical.com or via IRC
contact mhr3 or kamstrup on FreeNode (fx. on #ubuntu-unity)


Transient issues
================

Getting error about missing `pyrexc` while compiling compiz?
- apt-get install python-pyrex


setsid?
=======
The setsid command we prefix the unity command with is a bit like adding a &
to the end of a command to background it. The difference is that setsid detaches
the command from the running terminal so you are free to close the terminal
without killing your window manager :-)


CLEANING UP
===========

Everything from this build is installed under ~/unity and wont get picked up
when you are outside the "jhbuild shell". In particular we have

  ~/unity/
    build/
    install/
    source/

To clean everything except from the original jhbuild setup simply run:

  $ rm -rf ~/unity/{build,install,source}

TRICKS
======
It can be handy to have a small (jhbuild) tag in your command line prompt so
you can tell when you're inside a jhbuild shell. You can accomplish that by
putting this snippet at the bottom of your ~/.bashrc

  # Set special prompt when inside a jhbuild shell
  if [ -n "$UNDER_JHBUILD" ]; then
      PS1="[jhbuild] $PS1"
  fi