views:

110

answers:

2

I have a very old (1992) browser plugin for a mac that works in several different browsers. However, since Firefox restricted its plugins to XPI files in Firefox 3.6, the plugin no longer works.

I haven't been able to find a useful document describing what I need to do to my plugin to make it an XPI, or at least loadable by firefox, can anyone point me at such a document? or just explain to me what I need to do? I'm using Xcode.

A: 

So if this is an NPAPI plugin, you can just create a simple XPI (it's a ZIP file):

your-plugin.xpi/
  install.rdf
  plugins/
    your-plugin.dylib

This follows from the https://developer.mozilla.org/en/Bundles page I linked earlier.

You can create the install.rdf by reading and following the install.rdf reference page on MDC or just generate a stub extension using something like Extension Wizard (here's a "more official" version on addons.mozilla.org, but I haven't used that) and take the install.rdf from it.

You should probably limit the extension to Mac in your install.rdf (for that you'll have to read the install.rdf reference).


[original answer was:] What technology does the plugin use? XPI is a packaging mechanism; the answer to your question depends on whether the technology you use is still supported in Firefox 3.6.

I didn't think there were cross-browser plugin technologies, that worked in 1992 and are still in use now, so it's hard to guess what kind of plugin you're talking about.

Nickolay
It's an NPAPI plugin. It may not originally have been NPAPI, I wasn't at the company back then...
Brian Postow
@Brian Postow: ok, updated my answer. Out of interested, how was it installed before? By dropping the plugin it to Firefox's plugins folder?
Nickolay
we dropped the plugin into the /Library/Internet Plug-Ins folder.
Brian Postow
the plugin isn't currently a .dylib... it's a .plugin. Is there a diffrence?
Brian Postow
Ok, so I made the XPI and installed it, but it STILL has no effect... I'm guessing that that wasn't the problem...
Brian Postow
@Brian Postow: Judging from plugins I have installed, it can be a .plugin as well, I copied the dylib thing from the MDC docs. Re: /Library/Internet Plug-Ins - dropping a plugin there is supposed to work, I think. I definitely have some plugins there that do get recognized by Firefox. Perhaps you have a different problem?
Nickolay
Yes, a plugin can go there, the extension wizard worked fine, so, I'm assuming it's some other problem... but itworks in 3.5.7, just not 3.6... hrm...
Brian Postow
A: 

Brain; the problem is most likely that in Firefox 3.6 they removed support for XPCOM interfaces on npapi plugins. you need to use npruntime instead.

http://colonelpanic.net/2010/01/firefox-3-6-has-removed-support-for-xpcom-plugins/

You could also consider using FireBreath to rewrite it with, as that abstracts a lot of the details.

Taxilian