将浏览器插件变成 XPI

发布于 2024-08-19 17:07:50 字数 217 浏览 5 评论 0原文

我有一个非常旧的(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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

岁月苍老的讽刺 2024-08-26 17:07:50

脑;问题很可能是在 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.

初相遇 2024-08-26 17:07:50

因此,如果这是一个 NPAPI 插件,您只需创建一个简单的 XPI(它是一个 ZIP 文件):

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

这来自 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):

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文