summaryrefslogtreecommitdiff
path: root/README
blob: c480c5e78260de3723d0e576db9bb5fef65f6404 (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
SHORT INSTRUCTIONS

- download XCode
- run sudo xcode-select --switch /Applications/Xcode.app/ContentsDeveloper
- download and run
  http://cgit.freedesktop.org/spice/spice-jhbuild/plain/spice-osx-build-setup.sh?h=osx
- copy ~/Source/spice-jhbuild/jhbuildrc to ~/.jhbuildrc-custom
- add ~/.local/bin to your path
- run jhbuild bootstrap
- run jhbuild build
- you can now run remote-viewer with jhbuild run remote-viewer



DETAILED INSTRUCTIONS

This is a jhbuild moduleset to build remote-viewer on Mac OSX
Before using it, you need to install XCode. I'm using XCode 4.3.3 for Lion.
After installing it, I had to run the command below to setup everything
as expected:
sudo xcode-select --switch /Applications/Xcode.app/ContentsDeveloper

If you want to build spice-gtk from git (this moduleset is building it
from tarballs), you also need Perl::Text::CSV. To install it you can run:
sudo xcode-select --switch /Applications/Xcode.app/ContentsDeveloper

Once these prerequisite are addressed, you can download the
spice-osx-build-setup.sh script from
http://cgit.freedesktop.org/spice/spice-jhbuild/plain/spice-osx-build-setup.sh?h=osx
and run it:
sh spice-osx-build-setup.sh

It will download the gtk-osx jhbuild moduleset using the
gtk-osx-build-setup.sh script from the gtk-osx project (see
https://live.gnome.org/GTK%2B/OSX/Building). This in turn installs jhbuild in
~/Source and creates ~/.local/bin/jhbuild. It will also install ~/.jhbuildrc
and ~/.jhbuildrc-custom and will copy the current gtk-osx modules into
~/Source/jhbuild/modulesets. 

After the script runs, ~/Source/spice-jhbuild will contain a jhbuildrc file.
You can copy it to ~/.jhbuildrc-custom and jhbuild (as setup by the ~/.jhbuildrc
file created by gtk-osx) will pick it automatically. Alternatively, you can copy
it to ~/.jhbuildrc-spice and set the JHB environment variable to 'spice' (or
use any other prefix of your liking). You can edit this jhbuildrc file if you
want to configure the location where source will be downloaded/expanded, and
the location where the built binaries/libraries will be installed.

Make sure ~/.local/bin is in your PATH, this is where the jhbuild binary is
located. You can then run "jhbuild bootstrap" followed by "jhbuild build", and
this will download and build virt-viewer and all its dependencies. Once this is
done, "jhbuild run remote-viewer" will start remote-viewer.

If a weird build error happens while building freetype, exit jhbuild, run
"jhbuild buildone -cfa freetype" and restart "jhbuild build", this should
get rid of it.