2004-02-16 15:47:23 +00:00
|
|
|
#!/bin/bash -i
|
2004-02-16 16:00:39 +00:00
|
|
|
#
|
2010-01-13 08:31:26 +00:00
|
|
|
# this script is in git as gstreamer/scripts/gst-uninstalled
|
2004-02-16 16:00:39 +00:00
|
|
|
#
|
2008-01-03 09:43:41 +00:00
|
|
|
# It will set up the environment to use and develop gstreamer and projects
|
2009-02-14 13:35:48 +00:00
|
|
|
# that use gstreamer with an uninstalled git checkout of gstreamer and the
|
2008-01-03 09:43:41 +00:00
|
|
|
# plugin modules.
|
2004-02-16 15:47:23 +00:00
|
|
|
#
|
2008-01-03 09:43:41 +00:00
|
|
|
# It will set up LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PKG_CONFIG_PATH,
|
|
|
|
# GST_PLUGIN_PATH, GST_PLUGIN_SYSTEM_PATH, GST_REGISTRY, MANPATH, PYTHONPATH
|
|
|
|
# to prefer the uninstalled versions but also contain the installed ones.
|
|
|
|
# The only exception to this is, that no system installed plugins will be
|
|
|
|
# used but only the uninstalled ones.
|
2004-02-16 15:47:23 +00:00
|
|
|
#
|
2008-01-03 09:43:41 +00:00
|
|
|
# This script assumes that the relevant modules are checked out one by one
|
|
|
|
# under a given tree specified below in MYGST.
|
2004-02-16 15:47:23 +00:00
|
|
|
#
|
2008-01-03 09:43:41 +00:00
|
|
|
# Symlink this script in a directory in your path (for example $HOME/bin). You
|
|
|
|
# must name the symlink gst-something, where something is the subdirectory
|
|
|
|
# of MYGST that contains your gstreamer module checkouts.
|
2004-02-16 15:47:23 +00:00
|
|
|
#
|
|
|
|
# e.g.:
|
|
|
|
# - mkdir $HOME/gst/head
|
|
|
|
# - ln -sf gst-uninstalled $HOME/bin/gst-head
|
|
|
|
# - checkout copies of gstreamer modules in $HOME/gst/head
|
|
|
|
# - gst-head
|
|
|
|
|
2008-01-03 09:43:41 +00:00
|
|
|
# This script is run -i so that PS1 doesn't get cleared
|
2004-02-16 15:47:23 +00:00
|
|
|
|
2009-02-14 13:35:48 +00:00
|
|
|
# Change this variable to the location of your gstreamer git checkouts
|
2004-02-16 15:47:23 +00:00
|
|
|
MYGST=$HOME/gst
|
|
|
|
|
2008-01-03 09:43:41 +00:00
|
|
|
#
|
|
|
|
# Everything below this line shouldn't be edited!
|
|
|
|
#
|
|
|
|
|
2004-02-16 15:47:23 +00:00
|
|
|
# extract version from $0
|
|
|
|
# if this script is called "gst-head" then version will be "head"
|
|
|
|
VERSION=`echo $0 | sed s/.*gst-//g`
|
|
|
|
|
|
|
|
# base path under which dirs are installed
|
|
|
|
GST=$MYGST/$VERSION
|
2011-02-02 02:07:58 +00:00
|
|
|
GST_PREFIX=$GST/prefix
|
2004-02-16 15:47:23 +00:00
|
|
|
if test ! -e $GST; then
|
|
|
|
echo "$GST does not exist !"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
# set up a bunch of paths
|
2009-03-19 10:44:13 +00:00
|
|
|
PATH="\
|
|
|
|
$GST/gstreamer/tools:\
|
|
|
|
$GST/gst-plugins-base/tools:\
|
|
|
|
$GST/gst-player/src:\
|
|
|
|
$GST/gst-editor/src:\
|
2009-10-07 07:54:41 +00:00
|
|
|
$GST/gstreamer-sharp/tools:\
|
2013-02-21 09:18:14 +00:00
|
|
|
$GST/orc/tools:\
|
2011-02-02 02:07:58 +00:00
|
|
|
$GST_PREFIX/bin:\
|
2009-03-19 10:44:13 +00:00
|
|
|
$PATH"
|
2006-03-24 18:38:12 +00:00
|
|
|
|
2004-04-07 10:37:04 +00:00
|
|
|
# /some/path: makes the dynamic linker look in . too, so avoid this
|
2011-02-02 02:07:58 +00:00
|
|
|
LD_LIBRARY_PATH=$GST_PREFIX/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
|
|
|
DYLD_LIBRARY_PATH=$GST_PREFIX/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}
|
2012-01-21 12:56:50 +00:00
|
|
|
GI_TYPELIB_PATH=$GST_PREFIX/share/gir-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}
|
2007-01-17 14:26:46 +00:00
|
|
|
|
2013-02-21 09:18:14 +00:00
|
|
|
# ORC
|
2013-04-02 22:04:51 +00:00
|
|
|
LD_LIBRARY_PATH=$GST/orc/orc/.libs:$GST/orc/orc-test/.libs:$LD_LIBRARY_PATH
|
|
|
|
DYLD_LIBRARY_PATH=$GST/orc/orc/.libs:$GST/orc/orc-test/.libs:$DYLD_LIBRARY_PATH
|
2013-02-21 09:18:14 +00:00
|
|
|
|
2009-03-19 10:44:13 +00:00
|
|
|
# GStreamer rtsp server library
|
|
|
|
LD_LIBRARY_PATH=$GST/gst-rtsp-server/gst/rtsp-server/.libs:$LD_LIBRARY_PATH
|
|
|
|
DYLD_LIBRARY_PATH=$GST/gst-rtsp-server/gst/rtsp-server/.libs:$DYLD_LIBRARY_PATH
|
2012-01-21 12:56:50 +00:00
|
|
|
GI_TYPELIB_PATH=$GST/gst-rtsp-server/gst/rtsp-server:$GI_TYPELIB_PATH
|
2009-03-19 10:44:13 +00:00
|
|
|
|
2012-11-26 23:16:52 +00:00
|
|
|
# GStreamer Editing Services library
|
|
|
|
LD_LIBRARY_PATH=$GST/gst-editing-services/ges/.libs:$LD_LIBRARY_PATH
|
|
|
|
DYLD_LIBRARY_PATH=$GST/gst-editing-services/ges/.libs:$DYLD_LIBRARY_PATH
|
2013-03-16 12:00:55 +00:00
|
|
|
GI_TYPELIB_PATH=$GST/gst-editing-services/ges:$GI_TYPELIB_PATH
|
2012-11-26 23:16:52 +00:00
|
|
|
PATH=$GST/gst-editing-services/tools:$PATH
|
|
|
|
|
|
|
|
|
2008-04-11 09:27:44 +00:00
|
|
|
# GStreamer plugins base libraries
|
2013-03-05 10:30:22 +00:00
|
|
|
for path in allocators app audio fft pbutils riff rtp rtsp sdp tag utils video
|
2006-03-24 18:38:12 +00:00
|
|
|
do
|
|
|
|
LD_LIBRARY_PATH=$GST/gst-plugins-base/gst-libs/gst/$path/.libs:$LD_LIBRARY_PATH
|
2007-01-17 14:26:46 +00:00
|
|
|
DYLD_LIBRARY_PATH=$GST/gst-plugins-base/gst-libs/gst/$path/.libs:$DYLD_LIBRARY_PATH
|
2012-01-21 12:56:50 +00:00
|
|
|
GI_TYPELIB_PATH=$GST/gst-plugins-base/gst-libs/gst/$path:$GI_TYPELIB_PATH
|
2006-03-24 18:38:12 +00:00
|
|
|
done
|
2008-04-11 09:27:44 +00:00
|
|
|
|
2012-06-18 19:54:29 +00:00
|
|
|
# GStreamer plugins bad libraries
|
2013-07-03 08:27:13 +00:00
|
|
|
for path in basecamerabinsrc codecparsers uridownloader egl insertbin interfaces mpegts
|
2012-06-18 19:54:29 +00:00
|
|
|
do
|
|
|
|
LD_LIBRARY_PATH=$GST/gst-plugins-bad/gst-libs/gst/$path/.libs:$LD_LIBRARY_PATH
|
|
|
|
DYLD_LIBRARY_PATH=$GST/gst-plugins-bad/gst-libs/gst/$path/.libs:$DYLD_LIBRARY_PATH
|
|
|
|
GI_TYPELIB_PATH=$GST/gst-plugins-bad/gst-libs/gst/$path:$GI_TYPELIB_PATH
|
|
|
|
done
|
|
|
|
|
2008-04-11 09:27:44 +00:00
|
|
|
# GStreamer core libraries
|
2013-03-05 10:30:22 +00:00
|
|
|
for path in base check controller net
|
2006-03-24 18:38:12 +00:00
|
|
|
do
|
|
|
|
LD_LIBRARY_PATH=$GST/gstreamer/libs/gst/$path/.libs:$LD_LIBRARY_PATH
|
2007-01-17 14:26:46 +00:00
|
|
|
DYLD_LIBRARY_PATH=$GST/gstreamer/libs/gst/$path/.libs:$DYLD_LIBRARY_PATH
|
2012-01-21 12:56:50 +00:00
|
|
|
GI_TYPELIB_PATH=$GST/gstreamer/libs/gst/$path:$GI_TYPELIB_PATH
|
2006-03-24 18:38:12 +00:00
|
|
|
done
|
|
|
|
LD_LIBRARY_PATH=$GST/gstreamer/gst/.libs:$LD_LIBRARY_PATH
|
2007-01-17 14:26:46 +00:00
|
|
|
DYLD_LIBRARY_PATH=$GST/gstreamer/gst/.libs:$DYLD_LIBRARY_PATH
|
2012-01-21 12:56:50 +00:00
|
|
|
GI_TYPELIB_PATH=$GST/gstreamer/gst:$GI_TYPELIB_PATH
|
2006-03-24 18:38:12 +00:00
|
|
|
export LD_LIBRARY_PATH
|
2007-01-17 14:26:46 +00:00
|
|
|
export DYLD_LIBRARY_PATH
|
2012-01-21 12:56:50 +00:00
|
|
|
export GI_TYPELIB_PATH
|
2006-03-24 18:38:12 +00:00
|
|
|
|
2009-03-19 10:44:13 +00:00
|
|
|
export PKG_CONFIG_PATH="\
|
2011-02-02 02:07:58 +00:00
|
|
|
$GST_PREFIX/lib/pkgconfig\
|
2009-03-19 10:44:13 +00:00
|
|
|
:$GST/gstreamer/pkgconfig\
|
|
|
|
:$GST/gst-plugins-base/pkgconfig\
|
|
|
|
:$GST/gst-plugins-good/pkgconfig\
|
2010-09-07 22:48:56 +00:00
|
|
|
:$GST/gst-plugins-ugly/pkgconfig\
|
|
|
|
:$GST/gst-plugins-bad/pkgconfig\
|
2013-02-28 19:40:32 +00:00
|
|
|
:$GST/gst-libav/pkgconfig\
|
2010-09-07 22:48:56 +00:00
|
|
|
:$GST/gst-ffmpeg/pkgconfig\
|
2009-03-19 10:44:13 +00:00
|
|
|
:$GST/gst-python/pkgconfig\
|
|
|
|
:$GST/gst-rtsp-server/pkgconfig\
|
2012-11-26 23:16:52 +00:00
|
|
|
:$GST/gst-editing-services/pkgconfig\
|
2009-10-07 07:54:41 +00:00
|
|
|
:$GST/gstreamer-sharp/pkgconfig\
|
2013-02-21 09:18:14 +00:00
|
|
|
:$GST/orc\
|
2011-08-15 11:17:44 +00:00
|
|
|
:$GST/farsight2\
|
|
|
|
:$GST/libnice/nice\
|
2009-03-19 10:44:13 +00:00
|
|
|
${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
|
|
|
|
|
|
|
export GST_PLUGIN_PATH="\
|
2009-08-02 13:28:38 +00:00
|
|
|
$GST/gstreamer/plugins\
|
|
|
|
:$GST/gst-plugins-base/ext\
|
|
|
|
:$GST/gst-plugins-base/gst\
|
|
|
|
:$GST/gst-plugins-base/sys\
|
|
|
|
:$GST/gst-plugins-good/ext\
|
|
|
|
:$GST/gst-plugins-good/gst\
|
|
|
|
:$GST/gst-plugins-good/sys\
|
|
|
|
:$GST/gst-plugins-ugly/ext\
|
|
|
|
:$GST/gst-plugins-ugly/gst\
|
|
|
|
:$GST/gst-plugins-ugly/sys\
|
|
|
|
:$GST/gst-plugins-bad/ext\
|
|
|
|
:$GST/gst-plugins-bad/gst\
|
|
|
|
:$GST/gst-plugins-bad/sys\
|
2012-09-11 12:22:57 +00:00
|
|
|
:$GST/gst-libav/ext/\
|
2012-07-12 12:17:51 +00:00
|
|
|
:$GST/gst-ffmpeg/ext/\
|
2012-07-12 11:09:13 +00:00
|
|
|
:$GST/gnonlin/gnl/.libs\
|
|
|
|
:$GST/gst-openmax/omx/.libs\
|
|
|
|
:$GST/gst-omx/omx/.libs\
|
2013-07-16 15:47:45 +00:00
|
|
|
:$GST/gst-plugins-gl/gst/gl/.libs\
|
2012-07-12 11:09:13 +00:00
|
|
|
:$GST/clutter-gst/clutter-gst/.libs\
|
2009-03-19 10:44:13 +00:00
|
|
|
:$GST/plugins\
|
2011-08-15 11:17:44 +00:00
|
|
|
:$GST/farsight2/gst\
|
|
|
|
:$GST/farsight2/transmitters\
|
|
|
|
:$GST/libnice/gst\
|
2009-03-19 10:44:13 +00:00
|
|
|
${GST_PLUGIN_PATH:+:$GST_PLUGIN_PATH}"
|
|
|
|
|
2007-04-12 10:32:38 +00:00
|
|
|
# don't use any system-installed plug-ins at all
|
2005-11-08 11:52:24 +00:00
|
|
|
export GST_PLUGIN_SYSTEM_PATH=
|
2007-04-12 10:32:38 +00:00
|
|
|
# set our registry somewhere else so we don't mess up the registry generated
|
|
|
|
# by an installed copy
|
2009-08-02 13:33:59 +00:00
|
|
|
rm -f $GST/gstreamer/registry.xml 2>/dev/null
|
|
|
|
export GST_REGISTRY=$GST/gstreamer/registry.dat
|
2009-02-06 09:49:34 +00:00
|
|
|
# Point at the uninstalled plugin scanner
|
2009-11-16 00:12:22 +00:00
|
|
|
export GST_PLUGIN_SCANNER=$GST/gstreamer/libs/gst/helpers/gst-plugin-scanner
|
2009-08-02 13:33:59 +00:00
|
|
|
|
2007-04-17 14:36:35 +00:00
|
|
|
# once MANPATH is set, it needs at least an "empty"component to keep pulling
|
|
|
|
# in the system-configured man paths from man.config
|
|
|
|
# this still doesn't make it work for the uninstalled case, since man goes
|
|
|
|
# look for a man directory "nearby" instead of the directory I'm telling it to
|
2011-02-02 02:07:58 +00:00
|
|
|
export MANPATH=$GST/gstreamer/tools:$GST_PREFIX/share/man:$MANPATH
|
2004-08-09 09:20:06 +00:00
|
|
|
pythonver=`python -c "import sys; print sys.version[:3]"`
|
2011-02-02 02:07:58 +00:00
|
|
|
export PYTHONPATH=$GST/gst-python:$GST_PREFIX/lib/python$pythonver/site-packages${PYTHONPATH:+:$PYTHONPATH}
|
2004-02-16 15:47:23 +00:00
|
|
|
|
2012-07-12 11:09:13 +00:00
|
|
|
# clutter-gst
|
|
|
|
export PKG_CONFIG_PATH=$GST/clutter-gst:$PKG_CONFIG_PATH
|
|
|
|
export LD_LIBRARY_PATH=$GST/clutter-gst/clutter-gst/.libs:$LD_LIBRARY_PATH
|
|
|
|
export DYLD_LIBRARY_PATH=$GST/clutter-gst/clutter-gst/.libs:$DYLD_LIBRARY_PATH
|
|
|
|
|
2009-03-03 19:58:53 +00:00
|
|
|
# totem-pl-parser
|
|
|
|
export PKG_CONFIG_PATH=$GST/totem-pl-parser:$PKG_CONFIG_PATH
|
|
|
|
export LD_LIBRARY_PATH=$GST/totem-pl-parser/plparse/.libs:$LD_LIBRARY_PATH
|
|
|
|
export DYLD_LIBRARY_PATH=$GST/totem-pl-parser/plparse/.libs:$DYLD_LIBRARY_PATH
|
|
|
|
|
|
|
|
# totem
|
|
|
|
export PATH=$GST/totem/src:$PATH
|
|
|
|
|
2009-10-07 07:54:41 +00:00
|
|
|
# gstreamer-sharp
|
|
|
|
export MONO_PATH=$GST/gstreamer-sharp/gstreamer-sharp:$MONO_PATH
|
|
|
|
export LD_LIBRARY_PATH=$GST/gstreamer-sharp/gstreamer-sharp/glue/.libs:$LD_LIBRARY_PATH
|
|
|
|
export DYLD_LIBRARY_PATH=$GST/gstreamer-sharp/gstreamer-sharp/glue/.libs:$DYLD_LIBRARY_PATH
|
|
|
|
|
2012-04-25 16:11:03 +00:00
|
|
|
# insanity
|
|
|
|
export PYTHONPATH=$GST/insanity:$PYTHONPATH
|
|
|
|
export PATH=$GST/insanity/bin:$PATH
|
|
|
|
export PKG_CONFIG_PATH=$GST/insanity/lib:$GST/insanity-gst/lib:$PKG_CONFIG_PATH
|
|
|
|
export GI_TYPELIB_PATH=$GST/insanity/lib/insanity:$GST/insanity-gst/lib/insanity-gst:$GI_TYPELIB_PATH
|
|
|
|
|
2012-09-11 12:22:57 +00:00
|
|
|
if [ -d "$GST/gst-libav" -a -d "$GST/gst-ffmpeg" ]; then
|
|
|
|
echo
|
|
|
|
echo "====================================================================="
|
|
|
|
echo " You have both an uninstalled gst-ffmpeg checkout and a gst-libav"
|
|
|
|
echo " checkout. You need to remove one of those. You should remove"
|
|
|
|
echo
|
|
|
|
echo " $GST/gst-ffmpeg"
|
|
|
|
echo
|
|
|
|
echo " since gst-libav replaces gst-ffmpeg."
|
|
|
|
echo "====================================================================="
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2004-02-16 15:47:23 +00:00
|
|
|
# if we got a command, run it, else start a shell
|
|
|
|
if test ! -z "$1";
|
|
|
|
then
|
|
|
|
$@
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|
2004-02-16 16:09:12 +00:00
|
|
|
# set up prompt to help us remember we're in a subshell, cd to
|
|
|
|
# the gstreamer base dir and start $SHELL
|
2004-02-16 15:47:23 +00:00
|
|
|
cd $GST
|
2005-11-07 18:16:13 +00:00
|
|
|
shell=$SHELL
|
2011-01-08 02:19:31 +00:00
|
|
|
if test "x$SHELL" = "x/bin/bash"
|
2005-11-07 18:16:13 +00:00
|
|
|
then
|
|
|
|
# debian/ubuntu resets our PS1. bastards.
|
2005-12-16 17:34:19 +00:00
|
|
|
shell="$SHELL --noprofile"
|
2005-11-07 18:16:13 +00:00
|
|
|
fi
|
|
|
|
PS1="[gst-$VERSION] $PS1" $shell
|
2005-11-08 11:52:24 +00:00
|
|
|
|