Installing plugins in Firefox extensions >= 0.9

Andre Pang <[email protected]> Sun, 23 Jan 2005 02:03:51 +1100
Newsgroups gmane.comp.mozilla.devel.xpinstall
Message-ID <[email protected]>
Hi all,

I'm trying to install a plugin as part of a Firefox extension that I'm 
developing (using the >= 0.9 Firefox extension API; i.e. install.rdf 
rather than install.js).  Is this possible at all?  The Packaging 
Firefox/Thunderbird Extensions webpage says that "There is now no way 
of placing files outside of the file structure mandated above during 
the install process. If you need to modify files elsewhere, you'll have 
to do it the first time your extension code runs (and then set a pref 
or something similar so that you don't do it again)."  I have two 
questions:

1.  I am happy to put extra code into one of my component registration 
sections to copy the plugin from the extension's directory to the 
proper Firefox plugins directory.  However, I don't know how to obtain 
a path to the extension's directory (e.g. on Windows, this would be 
"C:\Documents and Settings\USER\Application 
Data\Mozilla\Firefox\xxxx.xxx\extensions\UUID".  If I could obtain a 
path to the extension's directory, I could copy the plugin from there 
to the user's plugins directory or the system plugin directory, and 
tell Firefox to rescan the plugin directory, which solves the issue 
nicely.

2.  Will installing plugins be considered part of the Firefox Extension 
"API" in the future (e.g. for Firefox 1.1)?  I'm sure I'm not the only 
one who wants to install a plugin in an FF extension ...

Thanks!


-- 
% Andre Pang : trust.in.love.to.save  <http://www.algorithm.com.au/>