2 # ----------------------------------------------------------------------------
4 # create-uninstalled-setup.sh
6 # Little shell script that creates a fresh GStreamer uninstalled setup in
9 # ----------------------------------------------------------------------------
11 # Copyright (C) 2011-2012 Tim-Philipp Muller <tim centricular net>
13 # This script is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU Library General Public
15 # License as published by the Free Software Foundation; either
16 # version 2 of the License, or (at your option) any later version.
18 # This library is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # Library General Public License for more details.
23 # You should have received a copy of the GNU Library General Public
24 # License along with this library; if not, write to the
25 # Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
26 # Boston, MA 02110-1301, USA.
28 # ----------------------------------------------------------------------------
32 # set BRANCH to e.g. "1.2" to track the stable 1.2 branch instead of master
35 # set to "ssh" if you have a developer account and ssh access
38 # re-use and reference local master branch checkout if one already exists
39 # (saves network bandwidth)
40 REUSE_EXISTING_MASTER_CHECKOUT="true"
42 # git modules to clone
43 MODULES="gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad"
45 if test "$BRANCH" != "0.10"; then
46 MODULES="$MODULES gst-libav"
48 MODULES="$MODULES gst-ffmpeg"
51 # note: we use ~/gst because that's what the gst-uninstalled script
52 # uses by default, so don't just change that to something else
53 UNINSTALLED_ROOT=~/gst
55 echo "==========================================================================================="
56 echo "Creating new GStreamer uninstalled environment for branch $BRANCH in $UNINSTALLED_ROOT ... "
57 echo "==========================================================================================="
59 mkdir -p $UNINSTALLED_ROOT
60 mkdir -p $UNINSTALLED_ROOT/$BRANCH
62 mkdir -p $UNINSTALLED_ROOT/$BRANCH/prefix
66 echo "Checking basic build tools and dependencies are installed..."
69 if ! pkg-config --version 2>/dev/null >/dev/null; then
71 elif ! pkg-config --exists glib-2.0 orc-0.4 2>/dev/null >/dev/null; then
73 elif ! bison --version 2>/dev/null >/dev/null; then
75 elif ! flex --version 2>/dev/null >/dev/null; then
81 if test "$DEPS_OK" != "yes"; then
82 echo "==========================================================================================="
84 echo " Some very basic build tools or dependencies are missing."
88 echo " http://gstreamer.freedesktop.org/wiki/BuildDependenciesDebianUbuntu"
92 #echo " http://gstreamer.freedesktop.org/wiki/Fedora"
94 echo " for instructions how to install them on Debian/Ubuntu-based systems."
96 echo "==========================================================================================="
100 cd $UNINSTALLED_ROOT/$BRANCH
105 if test "$BRANCH" != "master" \
106 -a "x$REUSE_EXISTING_MASTER_CHECKOUT" = "xtrue" \
107 -a -d ../master/$m; then
108 REF="--reference=../master/$m"
111 if test "$GIT_ACCESS" = "ssh"; then
112 git clone $REF ssh://git.freedesktop.org/git/gstreamer/$m
114 git clone $REF git://anongit.freedesktop.org/gstreamer/$m
118 if test "$BRANCH" != "master"; then
119 git checkout -b $BRANCH origin/$BRANCH
125 ln -s $BRANCH/gstreamer/scripts/gst-uninstalled gst-$BRANCH
130 echo "==========================================================================================="
132 echo "Done. Created new GStreamer uninstalled environment for branch $BRANCH in $UNINSTALLED_ROOT"
134 echo "To enter the uninstalled environment do: cd $UNINSTALLED_ROOT; ./gst-$BRANCH"
136 echo "To leave the uninstalled environment do: exit"
138 echo "To check the uninstalled environment do: printenv | grep GST"
139 echo " (loads of output = you're in the uninstalled environment)"
141 echo "==========================================================================================="
143 echo "Now compile all GStreamer modules one by one by first switching into"
144 echo "the uninstalled environment and then doing:"
146 echo " cd <MODULE>; ./autogen.sh; make"
148 echo "First gstreamer, then gst-plugins-base, then the other modules."
149 echo "You do not need to do 'make install'"
151 echo "==========================================================================================="
153 echo "If your system GLib is too old, you can install a newer version"
154 echo "into --prefix=$UNINSTALLED_ROOT/$BRANCH/prefix and it should be picked up"
155 echo "by autogen.sh/configure"
157 echo "==========================================================================================="
159 #echo "Also see http://gstreamer.freedesktop.org/wiki/UninstalledSetup"
161 #echo "==========================================================================================="