-
Notifications
You must be signed in to change notification settings - Fork 28
/
gtk-osx-build-setup.sh
executable file
·85 lines (72 loc) · 2.65 KB
/
gtk-osx-build-setup.sh
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
#!/bin/sh
#
# Script that sets up jhbuild for GTK+ OS X building. Run this to
# checkout jhbuild and the required configuration.
#
# Copyright 2007, 2008, 2009 Imendio AB
#
# Run this whenever you want to update jhbuild or the jhbuild setup;
# it is safe to run it repeatedly. Note that it overwrites
# ~/.jhbuildrc however. Custom settings should be kept in
# ~/.jhbuildrc-custom.
#
# You need Mac OS X 10.4 or newer and Xcode 2.5 or newer. Make sure
# you have subversion (svn) installed, 10.5 has it by default.
#
# Quick HOWTO:
#
# sh gtk-osx-build-setup.sh
#
# jhbuild bootstrap
# jhbuild build meta-gtk-osx-bootstrap
# jhbuild build
#
# See http://live.gnome.org/GTK%2B/OSX for more information.
#
SOURCE=$HOME/Source
BASEURL="http://github.com/rhult/gtk-osx-build/raw/master"
do_exit()
{
echo $1
exit 1
}
get_moduleset_from_git()
{
curl -s "$BASEURL/modulesets/$1" -o $SOURCE/jhbuild/modulesets/$1
}
if test x`which svn` == x; then
do_exit "Svn (subversion) is not available, please install it and try again."
fi
mkdir -p $SOURCE 2>/dev/null || do_exit "The directory $SOURCE could not be created. Check permissions and try again."
rm -f tmp-jhbuild-revision
curl -s $BASEURL/jhbuild-revision -o tmp-jhbuild-revision
JHBUILD_REVISION=`cat tmp-jhbuild-revision 2>/dev/null`
if test x"$JHBUILD_REVISION" = x; then
do_exit "Could not find jhbuild revision to use."
fi
JHBUILD_REVISION_OPTION="-r$JHBUILD_REVISION"
echo "Checking out jhbuild ($JHBUILD_REVISION) from subversion..."
if ! test -d $SOURCE/jhbuild; then
svn co $JHBUILD_REVISION_OPTION http://svn.gnome.org/svn/jhbuild/trunk $SOURCE/jhbuild >/dev/null
else
(cd $SOURCE/jhbuild && svn up $JHBUILD_REVISION_OPTION >/dev/null)
fi
echo "Installing jhbuild..."
(cd $SOURCE/jhbuild && make -f Makefile.plain DISABLE_GETTEXT=1 install >/dev/null)
echo "Installing jhbuild configuration..."
curl -s $BASEURL/jhbuildrc-gtk-osx -o $HOME/.jhbuildrc
curl -s $BASEURL/jhbuildrc-gtk-osx-fw-10.4 -o $HOME/.jhbuildrc-fw-10.4
curl -s $BASEURL/jhbuildrc-gtk-osx-fw-10.4-test -o $HOME/.jhbuildrc-fw-10.4-test
if [ ! -f $HOME/.jhbuildrc-custom ]; then
curl -s $BASEURL/jhbuildrc-gtk-osx-custom-example -o $HOME/.jhbuildrc-custom
fi
echo "Installing gtk-osx moduleset files..."
MODULES="gtk-osx-gstreamer.modules gtk-osx-gtkmm.modules gtk-osx-python.modules gtk-osx-random.modules gtk-osx-themes.modules gtk-osx-unsupported.modules gtk-osx-webkit-deps.modules gtk-osx.modules gtk-osx-bootstrap.modules"
for m in $MODULES; do
get_moduleset_from_git $m
done
if test "x`echo $PATH | grep $HOME/bin`" == x; then
echo "PATH does not contain $HOME/bin, it is recommended that you add that."
echo
fi
echo "Done."