2012-06-28 106 views
0

我使用McCoy tool來「安裝」我的install.rdf文件並簽署我的update.rdf文件。Firefox插件無法識別Update.rdf文件上的新版本

在我Install.rdf文件我有:

<?xml version="1.0"?> 
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#" 
     xmlns:NC="http://home.netscape.com/NC-rdf#" 
     xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> 
    <RDF:Description RDF:about="rdf:#$e2DK." 
        em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" 
        em:minVersion="4.0" 
        em:maxVersion="15.*" /> 
    <RDF:Description RDF:about="urn:mozilla:install-manifest" 
        em:id="{ext-id}" 
        em:type="2" 
        em:name="Ext X" 
        em:version="1.0.4" 
        em:description="..." 
        em:creator="Bruno Leonardo Michels" 
        em:updateURL="http://www.example.com/dl/update.rdf" 
        em:bootstrap="false" 
        em:updateKey="xxx"> 
    <em:targetApplication RDF:resource="rdf:#$e2DK."/> 
    </RDF:Description> 
</RDF:RDF> 

在我Update.rdf文件我有:

<?xml version="1.0"?> 
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#" 
     xmlns:NC="http://home.netscape.com/NC-rdf#" 
     xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> 
    <RDF:Description RDF:about="rdf:#$D1abg" 
        em:version="1.0.4"> 
    <em:targetApplication RDF:resource="rdf:#$G1abg"/> 
    </RDF:Description> 
    <RDF:Description RDF:about="rdf:#$G1abg" 
        em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" 
        em:minVersion="4.0" 
        em:maxVersion="15.*" 
        em:updateLink="http://www.example.com/dl/ext.xpi" 
        em:updateInfoURL="http://www.example.com/dl/ext.txt" /> 
    <RDF:Description RDF:about="rdf:#$M1abg" 
        em:version="1.0.3"> 
    <em:targetApplication RDF:resource="rdf:#$P1abg"/> 
    </RDF:Description> 
    <RDF:Description RDF:about="urn:mozilla:extension:{ext-id}" 
        em:signature="xxx"> 
    <em:updates RDF:resource="rdf:#$C1abg"/> 
    </RDF:Description> 
    <RDF:Seq RDF:about="rdf:#$C1abg"> 
    <RDF:li RDF:resource="rdf:#$D1abg"/> 
    <RDF:li RDF:resource="rdf:#$M1abg"/> 
    </RDF:Seq> 
    <RDF:Description RDF:about="rdf:#$P1abg" 
        em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" 
        em:minVersion="4.0" 
        em:maxVersion="15.*" 
        em:updateLink="http://www.example.com/dl/ext103.xpi" 
        em:updateInfoURL="http://www.example.com/dl/ext.txt" /> 
</RDF:RDF> 

當我點擊 「查找更新」 火狐要求update.rdf URL並獲取正確的文件的正確版本(1.0.4)。但它沒有做任何事情,不顯示任何更新,不更新...它只是呆在那裏與版本1.0.3 ...

是不是em:version什麼決定了插件版本?我在這裏錯過了什麼?

爲了測試我安裝,並簽署了版本1.0.4,改變了版本,以安裝並簽署1.0.3,所以我有兩個版本不同的號碼。我安裝了版本1.0.3,我試圖通過更新獲取1.0.4

回答

1

因爲我沒有使用https我必須在update.rdf文件中包含em:updateHash下的em:updateLink。我使用從Hashtab生成的SHA1。

em:updateHash="sha1:<hash>" 

並添加散列後,你必須再次簽署文件。

+0

我有一個類似的問題,但已經有一個sha1哈希文件,所以不知道我的情況有什麼問題。我是否認爲sha1哈希是xpi文件? – GStubbenhagen