无法解压和压缩 Firefox 插件

发布于 2024-10-09 10:50:58 字数 1796 浏览 9 评论 0原文

我正在尝试对我的旧 Firefox 插件进行一些更改(可在此处获取)。那里的 .xpi 包可以工作。但是,当我从字面上解压缩并重新压缩它时,它仍然会安装,但是插件应该插入的上下文菜单项不在这里。我到底做错了什么?

dylan~/scripts$ git clone [email protected]:nospampleasemam/peepshow
dylan~/scripts$ cd peepshow
dylan~/scripts/peepshow$ rm -rf *
dylan~/scripts/peepshow$ git checkout peepshow.xpi
dylan~/scripts/peepshow$ ## at this point I can install the addon and it works.
dylan~/scripts/peepshow$ unzip peepshow.xpi
Archive:  peepshow.xpi
   creating: chrome/
   creating: chrome/skin/
   creating: chrome/content/
 extracting: chrome/skin/returntoresults.css~  
 extracting: chrome/skin/returntoresults.css  
  inflating: chrome/skin/icon.jpg    
  inflating: chrome/content/loader.js  
  inflating: chrome/content/loader.js~  
  inflating: chrome/content/overlay.xul  
 extracting: chrome/content/resultscollector.js~  
  inflating: chrome/content/overlay.xul~  
  inflating: chrome.manifest         
  inflating: icon.png                
  inflating: install.rdf             
dylan~/scripts/peepshow$ rm peepshow.xpi 
dylan~/scripts/peepshow$ zip *
  adding: defaults/ (stored 0%)
  adding: defaults/preferences/ (stored 0%)
  adding: defaults/preferences/list.js~ (stored 0%)
  adding: defaults/preferences/list.js (stored 0%)
  adding: install.rdf (deflated 54%)
  adding: chrome.manifest (deflated 41%)
dylan~/scripts/peepshow$ ls
chrome  chrome.manifest  chrome.zip  icon.png  install.rdf
dylan~/scripts/peepshow$ mv chrome.zip chrome.xpi
dylan~/scripts/peepshow$ ## now I can install chrome.xpi
dylan~/scripts/peepshow$ ## but the menu item doesn't appear.

感谢您的帮助!

I'm trying to make some changes to an old Firefox addon of mine (available here). The .xpi package there works. But when I literally just unzip and rezip it, it will still install, but the context-menu-item the addon should insert isn't here. What in the world could I be doing wrong?

dylan~/scripts$ git clone [email protected]:nospampleasemam/peepshow
dylan~/scripts$ cd peepshow
dylan~/scripts/peepshow$ rm -rf *
dylan~/scripts/peepshow$ git checkout peepshow.xpi
dylan~/scripts/peepshow$ ## at this point I can install the addon and it works.
dylan~/scripts/peepshow$ unzip peepshow.xpi
Archive:  peepshow.xpi
   creating: chrome/
   creating: chrome/skin/
   creating: chrome/content/
 extracting: chrome/skin/returntoresults.css~  
 extracting: chrome/skin/returntoresults.css  
  inflating: chrome/skin/icon.jpg    
  inflating: chrome/content/loader.js  
  inflating: chrome/content/loader.js~  
  inflating: chrome/content/overlay.xul  
 extracting: chrome/content/resultscollector.js~  
  inflating: chrome/content/overlay.xul~  
  inflating: chrome.manifest         
  inflating: icon.png                
  inflating: install.rdf             
dylan~/scripts/peepshow$ rm peepshow.xpi 
dylan~/scripts/peepshow$ zip *
  adding: defaults/ (stored 0%)
  adding: defaults/preferences/ (stored 0%)
  adding: defaults/preferences/list.js~ (stored 0%)
  adding: defaults/preferences/list.js (stored 0%)
  adding: install.rdf (deflated 54%)
  adding: chrome.manifest (deflated 41%)
dylan~/scripts/peepshow$ ls
chrome  chrome.manifest  chrome.zip  icon.png  install.rdf
dylan~/scripts/peepshow$ mv chrome.zip chrome.xpi
dylan~/scripts/peepshow$ ## now I can install chrome.xpi
dylan~/scripts/peepshow$ ## but the menu item doesn't appear.

Thanks for any help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初见你 2024-10-16 10:50:58

您还需要压缩子目录:zip -r chrome.zip *。

You need to zip sub directories as well: zip -r chrome.zip *.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文