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 "0.10" for a GStreamer 0.10.x checkout
35 # set to "ssh" if you have a developer account and ssh access
38 # git modules to clone
39 MODULES="gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad"
41 if test "$BRANCH" != "0.10"; then
42 MODULES="$MODULES gst-libav"
44 MODULES="$MODULES gst-ffmpeg"
47 # note: we use ~/gst because that's what the gst-uninstalled script
48 # uses by default, so don't just change that to something else
49 UNINSTALLED_ROOT=~/gst
51 echo "==========================================================================================="
52 echo "Creating new GStreamer uninstalled environment for branch $BRANCH in $UNINSTALLED_ROOT ... "
53 echo "==========================================================================================="
55 mkdir -p $UNINSTALLED_ROOT
56 mkdir -p $UNINSTALLED_ROOT/$BRANCH
58 mkdir -p $UNINSTALLED_ROOT/$BRANCH/prefix
62 echo "Checking basic build tools and dependencies are installed..."
65 if ! pkg-config --version 2>/dev/null >/dev/null; then
67 elif ! pkg-config --exists glib-2.0 orc-0.4 2>/dev/null >/dev/null; then
69 elif ! bison --version 2>/dev/null >/dev/null; then
71 elif ! flex --version 2>/dev/null >/dev/null; then
77 if test "$DEPS_OK" != "yes"; then
78 echo "==========================================================================================="
80 echo " Some very basic build tools or dependencies are missing."
84 echo " http://gstreamer.freedesktop.org/wiki/BuildDependenciesDebianUbuntu"
88 echo " http://gstreamer.freedesktop.org/wiki/Fedora"
90 echo " for instructions how to install them."
92 echo "==========================================================================================="
96 cd $UNINSTALLED_ROOT/$BRANCH
100 if test "$GIT_ACCESS" = "ssh"; then
101 git clone ssh://git.freedesktop.org/git/gstreamer/$m
103 git clone git://anongit.freedesktop.org/gstreamer/$m
107 if test "$BRANCH" != "master"; then
108 git checkout -b $BRANCH origin/$BRANCH
114 ln -s $BRANCH/gstreamer/scripts/gst-uninstalled gst-$BRANCH
119 echo "==========================================================================================="
121 echo "Done. Created new GStreamer uninstalled environment for branch $BRANCH in $UNINSTALLED_ROOT"
123 echo "To enter the uninstalled environment do: cd $UNINSTALLED_ROOT; ./gst-$BRANCH"
125 echo "To leave the uninstalled environment do: exit"
127 echo "To check the uninstalled environment do: printenv | grep GST"
128 echo " (loads of output = you're in the uninstalled environment)"
130 echo "==========================================================================================="
132 echo "Now compile all GStreamer modules one by one by first switching into"
133 echo "the uninstalled environment and then doing:"
135 echo " cd <MODULE>; ./autogen.sh; make"
137 echo "First gstreamer, then gst-plugins-base, then the other modules."
138 echo "You do not need to do 'make install'"
140 echo "==========================================================================================="
142 echo "If your system GLib is too old, you can install a newer version"
143 echo "into --prefix=$UNINSTALLED_ROOT/$BRANCH/prefix and it should be picked up"
144 echo "by autogen.sh/configure"
146 echo "==========================================================================================="
148 echo "Also see http://gstreamer.freedesktop.org/wiki/UninstalledSetup"
150 echo "==========================================================================================="