Original commit message from CVS:
* add 'toolsdir' to the pc files
* add our first plugin test, which involves simply running gst-compprep,
which in the course of creating the completion registry instantiates every
plugin. gst-register is run first.
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
+# the standard variables don't make sense for an uninstalled copy
+prefix=
+exec_prefix=
+libdir=
+includedir=
+toolsdir=${pcfiledir}/tools
Name: GStreamer Uninstalled
Description: Streaming-media framework, Not Installed
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
+toolsdir=${exec_prefix}/bin
Name: GStreamer
Description: Streaming-media framework
#include <stdio.h>
#include <string.h>
+#include <sys/stat.h>
#include <gst/gstconfig.h>
gchar *prev_word = argv[3];
gchar *partial_word = argv[2];
- int partial_len = strlen(partial_word);
+ int partial_len;
GList *elements;
GSList *pads;
int num_pads;
gchar *word;
GSList *words = NULL;
+ struct stat stat_buf;
+
+ partial_len = strlen(partial_word);
+
/***** Loading the completion information from the registry *****/
- doc = xmlParseFile (GST_CONFIG_DIR "/compreg.xml");
+ if (stat (GST_CONFIG_DIR"/compreg.xml", &stat_buf) == 0) {
+ doc = xmlParseFile (GST_CONFIG_DIR"/compreg.xml");
+ } else {
+ exit (1);
+ }
rootnode = doc->xmlRootNode;
elementnode = rootnode->xmlChildrenNode;