2012-06-09 16:13:04 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# create-uninstalled-setup.sh
|
|
|
|
#
|
|
|
|
# Little shell script that creates a fresh GStreamer uninstalled setup in
|
|
|
|
# your home directory.
|
|
|
|
#
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
#
|
2015-04-22 09:14:53 +00:00
|
|
|
# Copyright (C) 2011-2015 Tim-Philipp Müller <tim centricular net>
|
2012-06-09 16:13:04 +00:00
|
|
|
#
|
|
|
|
# This script is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Library General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Library General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Library General Public
|
|
|
|
# License along with this library; if not, write to the
|
2012-11-03 20:44:48 +00:00
|
|
|
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
# Boston, MA 02110-1301, USA.
|
2012-06-09 16:13:04 +00:00
|
|
|
#
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2013-12-26 12:16:26 +00:00
|
|
|
# set BRANCH to e.g. "1.2" to track the stable 1.2 branch instead of master
|
2012-06-09 16:13:04 +00:00
|
|
|
BRANCH="master"
|
|
|
|
|
|
|
|
# set to "ssh" if you have a developer account and ssh access
|
|
|
|
GIT_ACCESS="anongit"
|
|
|
|
|
2013-12-26 12:16:26 +00:00
|
|
|
# re-use and reference local master branch checkout if one already exists
|
|
|
|
# (saves network bandwidth)
|
|
|
|
REUSE_EXISTING_MASTER_CHECKOUT="true"
|
|
|
|
|
2012-06-09 16:13:04 +00:00
|
|
|
# git modules to clone
|
2015-04-22 09:14:53 +00:00
|
|
|
MODULES="gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad gst-libav"
|
2012-06-09 16:13:04 +00:00
|
|
|
|
|
|
|
# note: we use ~/gst because that's what the gst-uninstalled script
|
|
|
|
# uses by default, so don't just change that to something else
|
|
|
|
UNINSTALLED_ROOT=~/gst
|
|
|
|
|
|
|
|
echo "==========================================================================================="
|
|
|
|
echo "Creating new GStreamer uninstalled environment for branch $BRANCH in $UNINSTALLED_ROOT ... "
|
|
|
|
echo "==========================================================================================="
|
|
|
|
|
|
|
|
mkdir -p $UNINSTALLED_ROOT
|
|
|
|
mkdir -p $UNINSTALLED_ROOT/$BRANCH
|
|
|
|
|
|
|
|
mkdir -p $UNINSTALLED_ROOT/$BRANCH/prefix
|
|
|
|
|
|
|
|
|
2012-07-27 22:54:00 +00:00
|
|
|
echo ""
|
|
|
|
echo "Checking basic build tools and dependencies are installed..."
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
if ! pkg-config --version 2>/dev/null >/dev/null; then
|
|
|
|
DEPS_OK="no"
|
|
|
|
elif ! pkg-config --exists glib-2.0 orc-0.4 2>/dev/null >/dev/null; then
|
|
|
|
DEPS_OK="no"
|
|
|
|
elif ! bison --version 2>/dev/null >/dev/null; then
|
|
|
|
DEPS_OK="no"
|
|
|
|
elif ! flex --version 2>/dev/null >/dev/null; then
|
|
|
|
DEPS_OK="no"
|
|
|
|
else
|
|
|
|
DEPS_OK="yes"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$DEPS_OK" != "yes"; then
|
|
|
|
echo "==========================================================================================="
|
|
|
|
echo ""
|
|
|
|
echo " Some very basic build tools or dependencies are missing."
|
|
|
|
echo ""
|
2015-04-22 09:14:53 +00:00
|
|
|
echo " Please install the following tools: pkg-config, bison, flex"
|
2012-07-27 22:54:00 +00:00
|
|
|
echo ""
|
2015-04-22 09:14:53 +00:00
|
|
|
echo " and the following libraries: GLib (libglib2.0-dev or glib2-devel)"
|
|
|
|
echo " and Orc (liborc-0.4-dev or orc-devel)"
|
|
|
|
#echo " Please visit"
|
|
|
|
#echo ""
|
|
|
|
#echo " http://gstreamer.freedesktop.org/wiki/BuildDependenciesDebianUbuntu"
|
|
|
|
#echo ""
|
2014-02-17 17:28:38 +00:00
|
|
|
#echo " or"
|
|
|
|
#echo ""
|
|
|
|
#echo " http://gstreamer.freedesktop.org/wiki/Fedora"
|
|
|
|
#echo ""
|
2015-04-22 09:14:53 +00:00
|
|
|
#echo " for instructions how to install them on Debian/Ubuntu-based systems."
|
2012-07-27 22:54:00 +00:00
|
|
|
echo ""
|
|
|
|
echo "==========================================================================================="
|
2015-04-22 09:14:53 +00:00
|
|
|
exit 1
|
2012-07-27 22:54:00 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2012-06-09 16:13:04 +00:00
|
|
|
cd $UNINSTALLED_ROOT/$BRANCH
|
|
|
|
|
|
|
|
for m in $MODULES
|
|
|
|
do
|
2013-12-26 12:16:26 +00:00
|
|
|
REF=""
|
|
|
|
if test "$BRANCH" != "master" \
|
|
|
|
-a "x$REUSE_EXISTING_MASTER_CHECKOUT" = "xtrue" \
|
|
|
|
-a -d ../master/$m; then
|
|
|
|
REF="--reference=../master/$m"
|
|
|
|
fi
|
|
|
|
|
2012-06-09 16:13:04 +00:00
|
|
|
if test "$GIT_ACCESS" = "ssh"; then
|
2013-12-26 12:16:26 +00:00
|
|
|
git clone $REF ssh://git.freedesktop.org/git/gstreamer/$m
|
2012-06-09 16:13:04 +00:00
|
|
|
else
|
2013-12-26 12:16:26 +00:00
|
|
|
git clone $REF git://anongit.freedesktop.org/gstreamer/$m
|
2012-06-09 16:13:04 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd $m
|
|
|
|
if test "$BRANCH" != "master"; then
|
|
|
|
git checkout -b $BRANCH origin/$BRANCH
|
|
|
|
fi
|
2015-04-22 09:14:53 +00:00
|
|
|
git submodule init && git submodule update
|
2012-06-09 16:13:04 +00:00
|
|
|
cd ..
|
|
|
|
done
|
|
|
|
|
|
|
|
cd $UNINSTALLED_ROOT
|
|
|
|
ln -s $BRANCH/gstreamer/scripts/gst-uninstalled gst-$BRANCH
|
|
|
|
chmod +x gst-$BRANCH
|
|
|
|
|
|
|
|
cd ~
|
|
|
|
|
|
|
|
echo "==========================================================================================="
|
|
|
|
echo
|
|
|
|
echo "Done. Created new GStreamer uninstalled environment for branch $BRANCH in $UNINSTALLED_ROOT"
|
|
|
|
echo
|
|
|
|
echo "To enter the uninstalled environment do: cd $UNINSTALLED_ROOT; ./gst-$BRANCH"
|
|
|
|
echo
|
|
|
|
echo "To leave the uninstalled environment do: exit"
|
|
|
|
echo
|
|
|
|
echo "To check the uninstalled environment do: printenv | grep GST"
|
|
|
|
echo " (loads of output = you're in the uninstalled environment)"
|
|
|
|
echo
|
|
|
|
echo "==========================================================================================="
|
|
|
|
echo
|
|
|
|
echo "Now compile all GStreamer modules one by one by first switching into"
|
|
|
|
echo "the uninstalled environment and then doing:"
|
|
|
|
echo
|
|
|
|
echo " cd <MODULE>; ./autogen.sh; make"
|
|
|
|
echo
|
|
|
|
echo "First gstreamer, then gst-plugins-base, then the other modules."
|
|
|
|
echo "You do not need to do 'make install'"
|
|
|
|
echo
|
|
|
|
echo "==========================================================================================="
|
|
|
|
echo
|
|
|
|
echo "If your system GLib is too old, you can install a newer version"
|
|
|
|
echo "into --prefix=$UNINSTALLED_ROOT/$BRANCH/prefix and it should be picked up"
|
|
|
|
echo "by autogen.sh/configure"
|
|
|
|
echo
|
|
|
|
echo "==========================================================================================="
|
2014-02-17 17:28:38 +00:00
|
|
|
#echo
|
|
|
|
#echo "Also see http://gstreamer.freedesktop.org/wiki/UninstalledSetup"
|
|
|
|
#echo
|
|
|
|
#echo "==========================================================================================="
|
2012-06-09 16:13:04 +00:00
|
|
|
|