]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/blob - docs/faq/gst-uninstalled
65b63715165acda72c78b8083855c97edf45ef91
[glsdk/gstreamer0-10.git] / docs / faq / gst-uninstalled
1 #!/bin/bash -i
2 #
3 # this script is in git as gstreamer/docs/faq/gst-uninstalled
4 #
5 # It will set up the environment to use and develop gstreamer and projects
6 # that use gstreamer with an uninstalled git checkout of gstreamer and the
7 # plugin modules.
8 #
9 # It will set up LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PKG_CONFIG_PATH,
10 # GST_PLUGIN_PATH, GST_PLUGIN_SYSTEM_PATH, GST_REGISTRY, MANPATH, PYTHONPATH
11 # to prefer the uninstalled versions but also contain the installed ones.
12 # The only exception to this is, that no system installed plugins will be
13 # used but only the uninstalled ones.
14 #
15 # This script assumes that the relevant modules are checked out one by one
16 # under a given tree specified below in MYGST.
17 #
18 # Symlink this script in a directory in your path (for example $HOME/bin). You
19 # must name the symlink gst-something, where something is the subdirectory
20 # of MYGST that contains your gstreamer module checkouts.
21 #
22 # e.g.:
23 # - mkdir $HOME/gst/head
24 # - ln -sf gst-uninstalled $HOME/bin/gst-head
25 # - checkout copies of gstreamer modules in $HOME/gst/head
26 # - gst-head
28 # This script is run -i so that PS1 doesn't get cleared
30 # Change this variable to the location of your gstreamer git checkouts
31 MYGST=$HOME/gst
33 #
34 # Everything below this line shouldn't be edited!
35 #
37 # extract version from $0
38 # if this script is called "gst-head" then version will be "head"
39 VERSION=`echo $0 | sed s/.*gst-//g`
41 # base path under which dirs are installed
42 GST=$MYGST/$VERSION
43 if test ! -e $GST; then
44   echo "$GST does not exist !"
45   exit
46 fi
48 # set up a bunch of paths
49 PATH="\
50 $GST/gstreamer/tools:\
51 $GST/gst-plugins-base/tools:\
52 $GST/gst-player/src:\
53 $GST/gst-editor/src:\
54 $GST/gstreamer-sharp/tools:\
55 $GST/prefix/bin:\
56 $PATH"
58 # /some/path: makes the dynamic linker look in . too, so avoid this
59 LD_LIBRARY_PATH=$GST/prefix/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
60 DYLD_LIBRARY_PATH=$GST/prefix/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}
62 # GStreamer rtsp server library
63 LD_LIBRARY_PATH=$GST/gst-rtsp-server/gst/rtsp-server/.libs:$LD_LIBRARY_PATH
64 DYLD_LIBRARY_PATH=$GST/gst-rtsp-server/gst/rtsp-server/.libs:$DYLD_LIBRARY_PATH
66 # GStreamer ffmpeg libraries
67 for path in libavformat libavutil libavcodec libpostproc libavdevice
68 do
69    LD_LIBRARY_PATH=$GST/gst-ffmpeg/gst-libs/ext/ffmpeg/$path:$LD_LIBRARY_PATH
70    DYLD_LIBRARY_PATH=$GST/gst-ffmpeg/gst-libs/ext/ffmpeg/$path:$DYLD_LIBRARY_PATH
71 done
73 # GStreamer plugins base libraries
74 for path in app audio cdda fft interfaces pbutils netbuffer riff rtp rtsp sdp tag utils video 
75 do
76   LD_LIBRARY_PATH=$GST/gst-plugins-base/gst-libs/gst/$path/.libs:$LD_LIBRARY_PATH
77   DYLD_LIBRARY_PATH=$GST/gst-plugins-base/gst-libs/gst/$path/.libs:$DYLD_LIBRARY_PATH
78 done
80 # GStreamer core libraries
81 for path in base net check controller dataprotocol
82 do
83   LD_LIBRARY_PATH=$GST/gstreamer/libs/gst/$path/.libs:$LD_LIBRARY_PATH
84   DYLD_LIBRARY_PATH=$GST/gstreamer/libs/gst/$path/.libs:$DYLD_LIBRARY_PATH
85 done
86 LD_LIBRARY_PATH=$GST/gstreamer/gst/.libs:$LD_LIBRARY_PATH
87 DYLD_LIBRARY_PATH=$GST/gstreamer/gst/.libs:$DYLD_LIBRARY_PATH
88 export LD_LIBRARY_PATH
89 export DYLD_LIBRARY_PATH
90   
91 export PKG_CONFIG_PATH="\
92 $GST/prefix/lib/pkgconfig\
93 :$GST/gstreamer/pkgconfig\
94 :$GST/gst-plugins-base/pkgconfig\
95 :$GST/gst-plugins-good/pkgconfig\
96 :$GST/gst-python/pkgconfig\
97 :$GST/gst-rtsp-server/pkgconfig\
98 :$GST/gstreamer-sharp/pkgconfig\
99 ${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
101 export GST_PLUGIN_PATH="\
102 $GST/gstreamer/plugins\
103 :$GST/gst-plugins-base/ext\
104 :$GST/gst-plugins-base/gst\
105 :$GST/gst-plugins-base/sys\
106 :$GST/gst-plugins-good/ext\
107 :$GST/gst-plugins-good/gst\
108 :$GST/gst-plugins-good/sys\
109 :$GST/gst-plugins-ugly/ext\
110 :$GST/gst-plugins-ugly/gst\
111 :$GST/gst-plugins-ugly/sys\
112 :$GST/gst-plugins-bad/ext\
113 :$GST/gst-plugins-bad/gst\
114 :$GST/gst-plugins-bad/sys\
115 :$GST/gst-ffmpeg/ext\
116 :$GST/gnonlin/gnl\
117 :$GST/gst-openmax\
118 :$GST/gst-plugins-gl/gst\
119 :$GST/plugins\
120 ${GST_PLUGIN_PATH:+:$GST_PLUGIN_PATH}"
122 # don't use any system-installed plug-ins at all
123 export GST_PLUGIN_SYSTEM_PATH=
124 # set our registry somewhere else so we don't mess up the registry generated
125 # by an installed copy
126 rm -f $GST/gstreamer/registry.xml 2>/dev/null
127 export GST_REGISTRY=$GST/gstreamer/registry.dat
128 # Point at the uninstalled plugin scanner
129 export GST_PLUGIN_SCANNER=$GST/gstreamer/libs/gst/helpers/plugin-scanner
131 # once MANPATH is set, it needs at least an "empty"component to keep pulling
132 # in the system-configured man paths from man.config
133 # this still doesn't make it work for the uninstalled case, since man goes
134 # look for a man directory "nearby" instead of the directory I'm telling it to
135 export MANPATH=$GST/gstreamer/tools:$GST/prefix/share/man:$MANPATH
136 pythonver=`python -c "import sys; print sys.version[:3]"`
137 export PYTHONPATH=$GST/gst-python:$GST/prefix/lib/python$pythonver/site-packages${PYTHONPATH:+:$PYTHONPATH}
139 # totem-pl-parser
140 export PKG_CONFIG_PATH=$GST/totem-pl-parser:$PKG_CONFIG_PATH
141 export LD_LIBRARY_PATH=$GST/totem-pl-parser/plparse/.libs:$LD_LIBRARY_PATH
142 export DYLD_LIBRARY_PATH=$GST/totem-pl-parser/plparse/.libs:$DYLD_LIBRARY_PATH
144 # totem
145 export PATH=$GST/totem/src:$PATH
147 # gstreamer-sharp
148 export MONO_PATH=$GST/gstreamer-sharp/gstreamer-sharp:$MONO_PATH
149 export LD_LIBRARY_PATH=$GST/gstreamer-sharp/gstreamer-sharp/glue/.libs:$LD_LIBRARY_PATH
150 export DYLD_LIBRARY_PATH=$GST/gstreamer-sharp/gstreamer-sharp/glue/.libs:$DYLD_LIBRARY_PATH
152 # gst-qa-system
153 export PYTHONPATH=$GST/gst-qa-system:$PYTHONPATH
154 export PATH=$GST/gst-qa-system/bin:$PATH
156 # if we got a command, run it, else start a shell
157 if test ! -z "$1";
158 then
159   $@
160   exit $?
161 fi
163 # set up prompt to help us remember we're in a subshell, cd to
164 # the gstreamer base dir and start $SHELL
165 cd $GST
166 shell=$SHELL
167 if test "x$SHELL" == "x/bin/bash"
168 then
169   # debian/ubuntu resets our PS1.  bastards.
170   shell="$SHELL --noprofile"
171 fi
172 PS1="[gst-$VERSION] $PS1" $shell