Re: Alpha-11 blockers

"A. Craig West" <[email protected]> Sat, 21 Feb 2004 03:13:30 -0500 (EST)
Newsgroups gmane.network.everybuddy.user
Message-ID <[email protected]>
On Sat, 21 Feb 2004, Philip S Tellis wrote:

> Sometime Today, Meredydd assembled some asciibets to say:
> 
> > > Shouldn't this be taken from config.h or something? After all, if
> > > someone has done ./configure --prefix=/usr, you want to be looking
> > > in /usr/lib/eb-lite, not /usr/local/lib.
> > 
> > Oops, it appears that this one is original. My bad. Nevertheless, it 
> > really ought to be changed before release.
> 
> if you can commit this, i'll fix it as soon as i get the source.

Actually, it was in the automake stuff originally. That one in the c file is
an emergency back-up.

-------------------- Patch Begins -------------------------
Index: core/src/main.c
===================================================================
--- core/src/main.c	(revision 291)
+++ core/src/main.c	(working copy)
@@ -35,9 +35,14 @@
 #include "contactlist.h"
 #include "util.h"
 
+#define FORCE_NEW_PLUGINS_DIR
 #ifndef PLUGINS_DIR
-# define PLUGINS_DIR "/usr/local/share/eb-lite/plugins"
+/* Makefile should everride this */
+# define PLUGINS_DIR "/usr/local/lib/eb-lite"
 #endif
+#ifndef OLD_PLUGINS_DIR
+# define OLD_PLUGINS_DIR "/usr/local/share/eb-lite/plugins"
+#endif
 
 //#ifndef VERSION
 #define VERSION "EB-lite alpha-11"
@@ -211,6 +216,15 @@
   plugins_init();
 
   eb_put_default(registry, "config/plugin_dir", PLUGINS_DIR);
+#ifdef FORCE_NEW_PLUGINS_DIR
+  if (!strcmp(eb_get_value(registry, "config/plugin_dir"), OLD_PLUGINS_DIR))
+  {
+    // For now, force the new plugin location
+    // We should remove this code once we have some expectation that the user
+    // might have changed it, but right now they won't have done that, anyways
+    eb_put_value(registry, "config/plugin_dir", PLUGINS_DIR);
+  }
+#endif /* FORCE_NEW_PLUGINS_DIR */
 
   load_local_accounts();
   load_plugins(eb_get_value(registry, "config/plugin_dir"));
Index: core/src/Makefile.am
===================================================================
--- core/src/Makefile.am	(revision 291)
+++ core/src/Makefile.am	(working copy)
@@ -27,5 +27,5 @@
 eb_lite_LDADD = $(STATIC_LIBS) -lstdc++ $(WIN32_LIBS)
 eb_lite_DEPENDENCIES = $(STATIC_LIBS)
 
-AM_CPPFLAGS = @CPPFLAGS@ -DPLUGINS_DIR=\"$(datadir)/eb-lite/plugins\"
+AM_CPPFLAGS = @CPPFLAGS@ -DPLUGINS_DIR=\"$(libdir)/eb-lite\"
 
-------------------- Patch Ends ---------------------------

-- 
Craig West         Ph: (416) 666-1645	|  It's not a bug,
[email protected]              	|  It's a feature...