集成一个附加到自定义Firefox的建设 [英] Integrating an add-on into a custom Firefox build

查看:240
本文介绍了集成一个附加到自定义Firefox的建设的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一个自定义Firefox的版本。我想我的集成附加组件(附加SDK)到构建。我想preFER这个,而不是与火狐code直接集成。

I'm making a custom Firefox build. I would like to integrate my add-on (Add-on SDK) into the build. I would prefer this rather than directly integrating with the Firefox code.

什么是实现这一目标的最佳途径?

What is the best way to achieve this?

我想将它插入的 /浏览器/扩展/ 的目录中。如果这是一个好主意,那就请给我解释一下为什么(或指向适当的文档文件)。

I'm thinking about placing it into the /browser/extensions/ directory. If this is a good idea, then please explain to me why (or point to appropriate docs files).

有大约这是一个非常类似的问题:
<一href=\"http://stackoverflow.com/questions/35788485/how-to-integrate-add-ons-xpi-into-my-custom-firefox-build\">How以附加(的.xpi)融入我的自定义Firefox的建设?
不幸的是没有答案。

There is a very similar question about this: How to integrate add-ons (.xpi) into my custom Firefox build? Unfortunately there is no answer.

编辑:
我想我已经找到一种方法来做到这一点,但是,这种方法不记录,并在每种情况下可能无法正常工作。
我改名将.xpi文件ADDON_ID.xpi并把它放在'/浏览器/扩展/目录源$ C ​​$ C。
比我说:

I think I've found a way to do this, however, this method is not documented and might not work in every case. I renamed the .xpi file to ADDON_ID.xpi and placed it in '/browser/extensions/' directory in source code. Than I added:

FINAL_TARGET_FILES.features += [
    'ADDON_ID.xpi'
]

要'/browser/extensions/moz.build'文件。

to '/browser/extensions/moz.build' file.

建立浏览器之后,插件放置在/浏览器/功能目录中的应用程序文件。

After building the browser, addon was placed in '/browser/features' directory in application files.

插件集成这样从用户隐藏,并且不会被复制到用户配置文件夹。

Addon integrated like this is hidden from user and is not copied into user profile folder.

注意:
我没有在我的自定义生成使用Mozilla升级服务,所以我不能确定有没有问题,而更新的应用程序。

Note: I don't use Mozilla update services in my custom build, so I can't confirm that there is no problems while updating the application.

推荐答案

的<一个href=\"https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Customizing_Firefox#Including_extensions_with_your_distribution_of_Firefox\"相对=nofollow>记载的方式来做到这一点是包含的.xpi 的文件与目录中的分布:结果
[Firefox的安装目录] /分销/扩展的结果
加载项将被安装在(复制到)在第一次使用的那个版本的Firefox的配置文件中每个文件。每个配置文件扩展名的副本将使用正常自动更新程序自动更新。实际上,该加载项将被视为独立,如果安装在每个配置文件。用户不会被要求确认安装附加的。

The documented way to do this is to include the .xpi file with the distribution in the directory:
[Firefox install directory]/distribution/extensions
The add-on will then be installed in (copied to) each profile upon the first use of that version of Firefox with the profile. The copy of the extension in each profile will be automatically updated using the normal auto-updating procedure. Effectively, the add-on will be treated as if separately installed in each profile. The user will not be asked to confirm installation of the add-on.

有关更多信息,请参见:

For more information see:

  • Customizing Firefox: Including extensions with your distribution of Firefox (MDN documentation)
  • Installing extensions (MDN documentation)
  • Auto update of bundled Firefox extensions (Stackoverflow question)
  • Install WebExtensions on Firefox from the command line (Stackoverflow question)

这篇关于集成一个附加到自定义Firefox的建设的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆