[ekiga] Made it easier to test ekiga plugins without installing



commit 87d3a0824b373a3d16e9198540174ce16e4ab3db
Author: Julien Puydt <jpuydt gnome org>
Date:   Wed Jun 24 14:01:43 2009 +0200

    Made it easier to test ekiga plugins without installing
    
    This is to make developpers' life less miserable.

 lib/engine/framework/kickstart.h  |    4 ++--
 lib/engine/plugin/plugin-core.cpp |   14 ++++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/lib/engine/framework/kickstart.h b/lib/engine/framework/kickstart.h
index 728f40f..a4d4b06 100644
--- a/lib/engine/framework/kickstart.h
+++ b/lib/engine/framework/kickstart.h
@@ -37,8 +37,8 @@
 #define __KICKSTART_H__
 
 /* We want the engine startup to be as automatic as possible -- in particular,
- * it should handle dependancies as transparently as possible (external plugins
- * may come at one point).
+ * it should handle dependancies as transparently as possible so external
+ * plugins work correctly.
  *
  * This kickstart object works like this : some objects are registered to it,
  * and are responsible of initializing a portion of code. Those objects are
diff --git a/lib/engine/plugin/plugin-core.cpp b/lib/engine/plugin/plugin-core.cpp
index d78e97f..b8f48fd 100644
--- a/lib/engine/plugin/plugin-core.cpp
+++ b/lib/engine/plugin/plugin-core.cpp
@@ -58,6 +58,12 @@
 //
 // which can be compiled with :
 // gcc -o hello.so hello.cpp -shared -export-dynamic -I$(PATH_TO_EKIGA_SOURCES)/lib/engine/framework `pkg-config --cflags sigc++-2.0`
+//
+// additionally, if you want to debug a plugin you're writing, then you should
+// set DEBUG to 1 at the start of that file, and put your plugin (and its
+// dependancies) in the ekiga_debug_plugins/ directory in your temporary
+// directory ("/tmp" on unix-like systems) : that way ekiga will only load that
+// and be verbose about it.
 
 static void
 plugin_parse_file (Ekiga::KickStart& kickstart,
@@ -149,6 +155,14 @@ plugin_parse_directory (Ekiga::KickStart& kickstart,
 void
 plugin_init (Ekiga::KickStart& kickstart)
 {
+#ifdef DEBUG
+  // should make it easier to test ekiga without installing
+  gchar* path = g_build_path (G_DIR_SEPARATOR_S,
+			      g_get_tmp_dir (), "ekiga_debug_plugins", NULL);
+  plugin_parse_directory (kickstart, path);
+  g_free (path);
+#else
   plugin_parse_directory (kickstart,
 			  EKIGA_PLUGIN_DIR);
+#endif
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]