Re: [Ekiga-devel-list] HEAD has issues...



On Sun, 10 Sep 2006 10:50:33 +0200
Julien PUYDT <jpuydt free fr> wrote:

> Julien PUYDT a écrit :
> > Craig Southeren a écrit :
> > 
> >> It could be the plugin code looking for plugins, if the PWLIBPLUGINDIR
> >> environment variable is set weirdly
> > 
> > I think it's the plugin code
> 
> Here it is, from src/ptlib/common/pluginmgr.cxx :
> 
> PStringArray PPluginManager::GetPluginDirs()
> {
>    PString env = ::getenv(ENV_PWLIB_PLUGIN_DIR);
>    if (env == NULL) {
>      // env = P_DEFAULT_PLUGIN_DIR;
>      PString execDir = PProcess::Current().GetFile();
>      PINDEX sepLoc = execDir.FindLast(PDIR_SEPARATOR);
>      if(sepLoc != P_MAX_INDEX){
>          execDir = execDir.Left(sepLoc);
>      }
>      env = execDir + DIR_SEP + P_DEFAULT_PLUGIN_DIR;
>    }
> 
>    // split into directories on correct seperator
>    return env.Tokenise(DIR_SEP, TRUE);
> }
> 
> This means :
> - if I don't have ENV_PWLIB_PLUGIN_DIR set ;
> - then he code used to be searching P_DEFAULT_PLUGIN_DIR (but it's now 
> commented out ;
> - the current code checks from where we were run, and adds 
> P_DEFAULT_PLUGIN_DIR to it.
> 
> What is P_DEFAULT_PLUGIN_DIR, then ? In the same file, I find :
> define P_DEFAULT_PLUGIN_DIR ".:/usr/lib/pwlib"
> 
> So what happens is that in my case env becomes :
> /home/jpuydt/.:/usr/lib/pwlib
> when I launch from a menu, which will search in all my home directory.
> 
> I can get away of course by doing:
> mkdir toto
> cd toto
> ekiga
> because in that case, I'll end up with env being 
> /something/toto/.:/usr/lib/pwlib
> 
> Let me try to make a list of problems in the code :
> - GetPluginDirs assumes P_DEFAULT_PLUGIN_DIR is a single token (wrong in 
> my case : I have two tokens) ;
> - GetPluginDirs assumes P_DEFAULT_PLUGIN_DIR is not a directory in 
> itself, but a directory layout precision (wrong in my case : one of them 
> could indeed be a directory layout precision, but the other is an 
> absolute path) ;
> - GetPluginDirs assumes the exec directory is of importance to find the 
> plugins ; which is partially wrong : it should in fact try to find my 
> home directory, and in such a case look in .pwlib/plugins or something 
> like this.

The P_DEFAULT_PLUGIN_DIR symbol was added to support Ekiga - I presumed
it was set in the Ekiga Makefile. 

I have no problems changing the default path on Linux for plugins to be
~/pwlib_plugins or some such

I'll implement some new code for plugin searching in the next few days 
(I need to do some changes for the H.263 plugin anyway), but feel free
to offer some patches if you like.

   Craig


-----------------------------------------------------------------------
 Craig Southeren          Post Increment ? VoIP Consulting and Software
 craigs postincrement com au                   www.postincrement.com.au

 Phone:  +61 243654666      ICQ: #86852844
 Fax:    +61 243656905      MSN: craig_southeren hotmail com
 Mobile: +61 417231046      Jabber: craigs jabber org

 "It takes a man to suffer ignorance and smile.
  Be yourself, no matter what they say."   Sting





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