开发者

Turning a browser plugin into an XPI

开发者 https://www.devze.com 2022-12-18 23:27 出处:网络
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开发者_StackOverflow中文版 Firefox 3.6, the plu

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开发者_StackOverflow中文版 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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号