问题描述
我从 Mozilla 下载了基本的 Hello World xpi,它安装在我的 Firefox 中没有任何问题.然后我卸载了插件,解压缩了 xpi,然后,没有改变里面的任何东西,使用 7zip 再次压缩它.我尝试安装它,但 Firefox 给了我无法安装此插件,因为它似乎已损坏"错误.
I downloaded the basic Hello World xpi from Mozilla, and it installed in my Firefox without any problems. Then I unistalled the addon, unzipped the xpi, then, without changing anything inside it, zipped it again using 7zip. I tried to install it, and Firefox gave me a "This addon could not be installed because it appears to be corrupt" error.
推荐答案
解压 .xpi 会生成一个与 .xpi 同名的文件夹,其中包含其内容.要创建有效的 .xpi,请压缩该文件夹的内容,而不是文件夹本身.
Unzipping the .xpi produces a folder with the same name as the .xpi, with its contents. To create a working .xpi, zip the contents of that folder, not the folder itself.
归功于 nmaier.
这篇关于解压缩和压缩工作 .xpi 使其停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!