将浏览器插件变成 XPI
我有一个非常旧的(1992 年)Mac 浏览器插件,可以在多种不同的浏览器中运行。然而,由于 Firefox 在 Firefox 3.6 中将其插件限制为 XPI 文件,因此该插件不再起作用。
我一直无法找到一个有用的文档来描述我需要对我的插件执行哪些操作才能使其成为 XPI,或者至少可以由 Firefox 加载,任何人都可以向我指出这样的文档吗?或者只是向我解释我需要做什么?我正在使用 Xcode。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
脑;问题很可能是在 Firefox 3.6 中,他们删除了 npapi 插件对 XPCOM 接口的支持。你需要使用 npruntime 来代替。
http://colonelpanic.net /2010/01/firefox-3-6-has-removed-support-for-xpcom-plugins/
您还可以考虑使用 FireBreath 来重写它,因为它抽象了很多细节。
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.
因此,如果这是一个 NPAPI 插件,您只需创建一个简单的 XPI(它是一个 ZIP 文件):
这来自 https://developer.mozilla.org/en/Bundles 我之前链接的页面。
您可以通过阅读并遵循 MDC 上的 install.rdf 参考页来创建 install.rdf 或只需使用类似的东西生成存根扩展
扩展向导(这里是addons.mozilla.org 上的“更官方”版本,但我没有使用过)并获取 install.rdf从它。
您可能应该在 install.rdf 中将扩展名限制为 Mac(为此您必须阅读 install.rdf 参考)。
[原来的答案是:]插件使用什么技术? XPI 是一种打包机制;您问题的答案取决于 Firefox 3.6 是否仍支持您使用的技术。
我不认为有跨浏览器插件技术,这种技术在 1992 年就开始使用,现在仍在使用,所以很难猜测你在谈论哪种插件。
So if this is an NPAPI plugin, you can just create a simple XPI (it's a ZIP file):
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.