[英]Is it possible for Firefox Add-on installed via registry to use updateURL?
I have built a Firefox extension using the Add-On SDK and forced it to install via registry key. 我已经使用附加SDK构建了Firefox扩展,并通过注册表项强制安装它。 (via
HKLM\\Software\\Mozzilla\\Firefox\\Extensions\\extensionid
) (通过
HKLM\\Software\\Mozzilla\\Firefox\\Extensions\\extensionid
)
When I go to Add-ons Manager and select "Check for updates", it does not issue request to the url specified in <updateUrl>
. 当我转到附加组件管理器并选择“检查更新”时,它不会向
<updateUrl>
指定的URL发出请求。 There are requests going out for https://versioncheck.addons.mozilla.org/ ... but not for my custom url specified in <updateUrl>
. 有些请求针对https://versioncheck.addons.mozilla.org/ ...,但不针对
<updateUrl>
指定的我的自定义URL。
This is reproducible also with an empty hello world extension built using the Firefox Add-On SDK: 使用Firefox附加SDK开发的空白hello world扩展也可以重现此问题:
cfx init
cfx xpi --update-url https://fooo.com/update.rdf
Then unpack the XPI using WinRAR into C:\\test-extension
and add a string value under the following registry key: 然后使用WinRAR将XPI解压缩到
C:\\test-extension
并在以下注册表项下添加一个字符串值:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Firefox\Extensions\
with a string value named jid1-W2S1bxv6O1LoAA@jetpack
(generated extension ID) pointing to the folder with the unpacked XPI: 带有名为
jid1-W2S1bxv6O1LoAA@jetpack
的字符串值(生成的扩展ID)指向带有解压后的XPI的文件夹:
registry value name: jid1-W2S1bxv6O1LoAA@jetpack
value: C:\\test-extension
注册表值名称:
jid1-W2S1bxv6O1LoAA@jetpack
值: C:\\test-extension
Then start Firefox, the extension will be installed into Firefox. 然后启动Firefox,该扩展程序将安装到Firefox中。 From Add-ons Manager, select check for updates.
在附加组件管理器中,选择检查更新。
The URL specified as <updateURL>
in C:\\test-extension\\install.rdf
is never accessed. 永远不会访问在
C:\\test-extension\\install.rdf
指定为<updateURL>
的URL。
For sake of completeness, this is the install.rdf
file (untouched default directly from output generated from cfx): 为了完整起见,这是
install.rdf
文件(未经修改的直接来自cfx生成的输出的默认值):
<?xml version="1.0" encoding="utf-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>jid1-W2S1bxv6O1LoAA@jetpack</em:id>
<em:version>0.1</em:version>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:unpack>false</em:unpack>
<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>19.0</em:minVersion>
<!-- I tried also with maxVersion 25.* -->
<em:maxVersion>20.*</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Front End MetaData -->
<em:name>TEST</em:name>
<em:description>a basic add-on</em:description>
<em:creator></em:creator>
<em:updateURL>https://mydomain.com/updates.rdf</em:updateURL>
</Description>
</RDF>
When I install the .xpi file manually with a drag and drop into Firefox, then the updateURL is checked as expected when I invoke Check for Updates
in Add-ons Manager. 当我通过拖放操作手动安装.xpi文件到Firefox中时,当我在“加载项管理器”中调用“
Check for Updates
时,将按预期检查updateURL。
Am I missing something? 我想念什么吗? Are updates via
<updateURL>
supported for extensions installed via registry? 通过注册表安装的扩展是否支持通过
<updateURL>
进行的更新?
Installations via the Windows Registry are locked , and therefore add-ons are not considered upgradeable. 通过Windows注册表进行的安装已锁定 ,因此附加组件不被视为可升级。 Such locations are considered external and not app-controlled unlike add-ons in the profile, there is a high likelihood that the user cannot upgrade the add-on anyway (only the system administrator can).
与配置文件中的加载项不同,此类位置被视为外部位置,不受应用程序控制,因此用户极有可能无法升级加载项(只有系统管理员才能升级)。
Add-ons installed via either the Registry of a system location must provide either own upgrade mechanism. 通过系统位置的任一注册表安装的加载项必须提供自己的升级机制。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.