Firefox 4 上的 NPAPI 插件安装问题 .. 被识别为扩展
我有一个简单的 NPAPI 插件,由 dll 和 xpt 组成。我尝试根据以下文档在 Firefox 4 上安装它 但是
当我尝试加载 . xpi 在浏览器中,它会将其识别为扩展而不是插件。 有其他方法可以将其安装为插件吗?
I have a simple NPAPI plugin consisting of a dll and xpt. I tried installing it on Firefox 4 according to the following documentation
https://developer.mozilla.org/en/Shipping_a_plugin_as_a_Toolkit_bundle
but when i try to load the .xpi in the browser, it recognizes it as an extension instead of a plugin.
Is there a different way to install it as a plugin?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
XPT是xpcom接口定义;自 Firefox 3.6 起,xpcom 插件不再在 Firefox 中运行。有关详细信息,请参阅 http:// /colonelpanic.net/2010/01/firefox-3-6-has-removed-support-for-xpcom-plugins/
XPI 文件是一个扩展,但它可能包含 npapi 插件作为扩展的一部分。如果我们假设您实际上没有使用 xpt 并且您的插件在 Firefox 3.6 中工作,那么您遇到的问题很可能是 Firefox 4 不再默认解压 XPI,并且插件无法使用它需要。请参阅https://developer.mozilla.org/En/Updating_extensions_for_Firefox_4.0#XPI_unpacking
但是,我更喜欢像 Dpp 建议的那样使用注册表进行安装。这就是 FireBreath 使用的方法。请参阅 https://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Plug-有关此方法的文档,请参见_Development_Overview#Installing_Plug-ins。
XPT is the xpcom interface defintion; xpcom plugins no longer work in Firefox as of Firefox 3.6. For more information, see http://colonelpanic.net/2010/01/firefox-3-6-has-removed-support-for-xpcom-plugins/
A XPI file is an extension, but it may contain a npapi plugin as part of the extension. If we go with the assumption that you aren't actually using that xpt and your plugin worked in Firefox 3.6, most likely the issue you're having is that Firefox 4 no longer unpacks the XPI by default, and for a plugin to work it needs to. See https://developer.mozilla.org/En/Updating_extensions_for_Firefox_4.0#XPI_unpacking
However, I much prefer installing using the registry like Dpp suggested. That is the method that FireBreath uses. See https://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Plug-in_Development_Overview#Installing_Plug-ins for documentation on this method.
您可以通过在 HKLM\Software\MozillaPlugins\YourPluginName 中创建一个注册表项来安装该插件,其中包含以下值: Description 、 Path 、 Product 、 Vendor 和 Version (均为 REG_SZ )。我不知道这是否是你想要的,但你可以看看这个方法。
You can install the plugin by creating a reg key in HKLM\Software\MozillaPlugins\YourPluginName that contains the following values : Description , Path , Product , Vendor and Version (all REG_SZ). I don't know if this is what you want , but you could take a look at this approach.