2004-02-16 15:47:23 +00:00
|
|
|
#!/bin/bash -i
|
2004-02-16 16:00:39 +00:00
|
|
|
#
|
|
|
|
# this script is in CVS as gstreamer/docs/faq/gst-uninstalled
|
|
|
|
#
|
2004-02-16 15:47:23 +00:00
|
|
|
# set up environment to use and develop gstreamer and friends uninstalled
|
|
|
|
#
|
|
|
|
# set up PATH, LD_LIBRARY_PATH, PKG_CONFIG_PATH, GST_PLUGIN_PATH, MANPATH,
|
|
|
|
# PYTHONPATH
|
|
|
|
#
|
|
|
|
# prefer uninstalled versions, but also put installed ones on the path
|
|
|
|
#
|
|
|
|
# this script assumes that the relevant modules are checked out one by one
|
|
|
|
# under a given tree specified below in MYGST
|
|
|
|
#
|
|
|
|
# symlink this script in a directory in your path (for example $HOME/bin)
|
|
|
|
# to a name that reflects the version of your checkout
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# this script is run -i so that PS1 doesn't get cleared
|
|
|
|
|
|
|
|
# change this variable to a different location depending on where you
|
|
|
|
# store your cvs checkouts
|
|
|
|
MYGST=$HOME/gst
|
|
|
|
|
|
|
|
# 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
|
|
|
|
if test ! -e $GST; then
|
|
|
|
echo "$GST does not exist !"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
# set up a bunch of paths
|
|
|
|
PATH=$GST/gstreamer/tools:$GST/gst-plugins/tools:$GST/gst-player/src:$GST/gst-editor/src:$GST/prefix/bin:$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
|
2006-03-24 18:38:12 +00:00
|
|
|
LD_LIBRARY_PATH=$GST/prefix/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
|
|
|
for path in audio cdda interfaces netbuffer riff rtp tag video
|
|
|
|
do
|
|
|
|
LD_LIBRARY_PATH=$GST/gst-plugins-base/gst-libs/gst/$path/.libs:$LD_LIBRARY_PATH
|
|
|
|
done
|
|
|
|
for path in base net check controller dataprotocol
|
|
|
|
do
|
|
|
|
LD_LIBRARY_PATH=$GST/gstreamer/libs/gst/$path/.libs:$LD_LIBRARY_PATH
|
|
|
|
done
|
|
|
|
LD_LIBRARY_PATH=$GST/gstreamer/gst/.libs:$LD_LIBRARY_PATH
|
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
|
2006-04-03 08:59:52 +00:00
|
|
|
export PKG_CONFIG_PATH=$GST/prefix/lib/pkgconfig:$GST/gstreamer/pkgconfig:$GST/gst-plugins/pkgconfig:$GST/gst-plugins-base/pkgconfig:$GST/gst-plugins-good/pkgconfig:$GST/gst-python/pkgconfig:$PKG_CONFIG_PATH
|
2006-04-06 17:36:27 +00:00
|
|
|
export GST_PLUGIN_PATH=$GST/gstreamer:$GST/gst-plugins:$GST/gst-plugins-base:$GST/gst-plugins-good:$GST/gst-plugins-ugly:$GST/gst-plugins-bad:$GST/gst-ffmpeg:$GST/gnonlin:$GST/gst-monkeysaudio:$GST/plugins:$GST_PLUGIN_PATH
|
2005-11-08 11:52:24 +00:00
|
|
|
export GST_PLUGIN_SYSTEM_PATH=
|
|
|
|
export GST_REGISTRY=$GST/gstreamer/registry.xml
|
2004-02-16 15:47:23 +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]"`
|
2006-07-02 14:05:54 +00:00
|
|
|
export PYTHONPATH=$GST/gst-python:$GST/prefix/lib/python$pythonver/site-packages${PYTHONPATH:+:$PYTHONPATH}
|
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
|
|
|
|
if test "x$SHELL" == "x/bin/bash"
|
|
|
|
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
|
|
|
|