Firefox扩展自动更新功能无法正常工作

时间:2014-09-25 11:49:32

标签: apache firefox-addon firefox-addon-sdk

按照教程here,我尝试为Firefox插件实现自动更新功能。使用该指南,我为mccoy创建了密钥对。 随后我创建了我的install.rdf文件:

<?xml version="1.0"?>
<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>ext@xuldev.org</em:id>
      <em:name>tmp Extension</em:name>
      <em:type>2</em:type>
      <em:version>1.0</em:version>
      <em:updateURL>http://130.192.../update.rdf</em:updateURL>
      <em:updateKey>MIGfMA0GCSqGS...</em:updateKey>
      <em:targetApplication>
         <Description>
            <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
            <em:minVersion>4.0</em:minVersion>
            <em:maxVersion>30.*</em:maxVersion>
        </Description>
      </em:targetApplication>
   </Description>
</RDF>

随后我带了xpi文件的sha256,并创建了update.rdf文件:

<?xml version="1.0"?>
<r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns="http://www.mozilla.org/2004/em-rdf#">
<r:Description about="urn:mozilla:extension:myextension@ext@xuldev.org">
<updates>
<r:Seq>
<r:li>
<r:Description>
    <version>1.0.2</version>
    <targetApplication>
        <r:Description>
        <id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
        <minVersion>4.0</minVersion>
        <maxVersion>30.*</maxVersion>
        <updateLink>http://130.192.../ext.xpi</updateLink>
        <updateHash>
            sha256:b3290c69a1...
        </updateHash>
        </r:Description>
    </targetApplication>
</r:Description>
</r:li>
</r:Seq>
</updates>
</r:Description>
</r:RDF>

最后,我在我的网站文件夹中配置了.htaccess。直接在浏览器URL中插入updateLink,我找到了文件,但Firefox没有更新扩展名。从控制台日志中,我看到了:

addons.xpi  DEBUG   startup
addons.xpi  DEBUG   checkForChanges
addons.xpi  DEBUG   No changes found
addons.xpi  DEBUG   Registering manifest for C:\Users\...ext@xuldev.org.xpi
addons.xpi  DEBUG   Loading bootstrap scope from C:\Users\...ext@xuldev.org.xpi
addons.xpi  DEBUG   Calling bootstrap method startup on ext@xuldev.org version 1.0
addons.update-checker   WARN    Update manifest for ext@xuldev.org did not contain an updates property
addons.manager  DEBUG   onUpdateFinished for ext@xuldev.org

你有什么想法吗?非常感谢

0 个答案:

没有答案