2 # ----------------------------------------------------------------------------
4 # create-uninstalled-setup.sh
6 # Little shell script that creates a fresh GStreamer uninstalled setup in
9 # ----------------------------------------------------------------------------
11 # Copyright (C) 2011-2015 Tim-Philipp Müller <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
39 #CLONE_OPTS="--depth=1 --no-single-branch"
41 # re-use and reference local master branch checkout if one already exists
42 # (saves network bandwidth)
43 REUSE_EXISTING_MASTER_CHECKOUT="true"
45 # git modules to clone
46 MODULES="gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad gst-libav"
48 # note: we use ~/gst because that's what the gst-uninstalled script
49 # uses by default, so don't just change that to something else
50 UNINSTALLED_ROOT=~/gst
52 echo "==========================================================================================="
53 echo "Creating new GStreamer uninstalled environment for branch $BRANCH in $UNINSTALLED_ROOT ... "
54 echo "==========================================================================================="
56 mkdir -p $UNINSTALLED_ROOT
57 mkdir -p $UNINSTALLED_ROOT/$BRANCH
59 mkdir -p $UNINSTALLED_ROOT/$BRANCH/prefix
63 echo "Checking basic build tools and dependencies are installed..."
66 if ! pkg-config --version 2>/dev/null >/dev/null; then
68 elif ! pkg-config --exists glib-2.0 orc-0.4 2>/dev/null >/dev/null; then
70 elif ! bison --version 2>/dev/null >/dev/null; then
72 elif ! flex --version 2>/dev/null >/dev/null; then
74 elif ! git --version 2>/dev/null >/dev/null; then
80 if test "$DEPS_OK" != "yes"; then
81 echo "==========================================================================================="
83 echo " Some very basic build tools or dependencies are missing."
85 echo " Please install the following tools: pkg-config, bison, flex, git"
87 echo " and the following libraries: GLib (libglib2.0-dev or glib2-devel)"
88 echo " and Orc (liborc-0.4-dev or orc-devel)"
91 #echo " http://gstreamer.freedesktop.org/wiki/BuildDependenciesDebianUbuntu"
95 #echo " http://gstreamer.freedesktop.org/wiki/Fedora"
97 #echo " for instructions how to install them on Debian/Ubuntu-based systems."
99 echo "==========================================================================================="
104 cd $UNINSTALLED_ROOT/$BRANCH
109 if test "$BRANCH" != "master" \
110 -a "x$REUSE_EXISTING_MASTER_CHECKOUT" = "xtrue" \
111 -a -d ../master/$m; then
112 REF="--reference=../master/$m"
115 if test "$GIT_ACCESS" = "ssh"; then
116 git clone $CLONE_OPTS $REF ssh://git.freedesktop.org/git/gstreamer/$m
118 git clone $CLONE_OPTS $REF https://anongit.freedesktop.org/git/gstreamer/$m
122 if test "$BRANCH" != "master"; then
123 git checkout -b $BRANCH origin/$BRANCH
125 git submodule init && git submodule update
130 ln -s $BRANCH/gstreamer/scripts/gst-uninstalled gst-$BRANCH
135 echo "==========================================================================================="
137 echo "Done. Created new GStreamer uninstalled environment for branch $BRANCH in $UNINSTALLED_ROOT"
139 echo "To enter the uninstalled environment do: cd $UNINSTALLED_ROOT; ./gst-$BRANCH"
141 echo "To leave the uninstalled environment do: exit"
143 echo "To check the uninstalled environment do: printenv | grep GST"
144 echo " (loads of output = you're in the uninstalled environment)"
146 echo "==========================================================================================="
148 echo "Now compile all GStreamer modules one by one by first switching into"
149 echo "the uninstalled environment and then doing:"
151 echo " cd <MODULE>; ./autogen.sh; make"
153 echo "First gstreamer, then gst-plugins-base, then the other modules."
154 echo "You do not need to do 'make install'"
156 echo "==========================================================================================="
158 echo "If your system GLib is too old, you can install a newer version"
159 echo "into --prefix=$UNINSTALLED_ROOT/$BRANCH/prefix and it should be picked up"
160 echo "by autogen.sh/configure"
162 echo "==========================================================================================="
164 #echo "Also see http://gstreamer.freedesktop.org/wiki/UninstalledSetup"
166 #echo "==========================================================================================="