I’m trying to install my example extension which has the following directory structure.
myexample
- install.rdf
- chrome.manifest
- content
-- myexample.js
-- myexample.xul
The file chrome.manifest contains:
content myexample chrome/content/
overlay chrome://browser/content/browser.xul
chrome://myexample/content/myexample.xul
It’s pretty minimalist extension.
I created a zip file from it:
zip -r myexample.xpi myexample/
When installing it in Firefox Tools -> Add-ons -> Install Add-on from file ... -> choose myexample.xpi it writes:
This add-on could not be installed because it appears to be corrupt.
Did I something wrong?
The title of your question is misleading – there is nothing wrong with your
chrome.manifest. This error message rather means that Firefox couldn’t findinstall.rdffile at the top level of your add-on. If you rununzip -l myexample.xpiyou will see something like this:As you see, all files you zipped have been put into the
myexample/subdirectory instead of being at the top level of the archive. To get the correct result you need to run the following commands: