1
votes

First af all, I'm newbie in Firefox SDK, so any small hint can be a great help for me. To modify a FF SDK extension, I unziped the .xpi file and changed one line of a js file and then ziped it again(as .xpi).But it does't work any more.Actually I followed the instruction explained here except there were no jar file in the directory structure of this addon, so I changed .js files directly. The directory structure of the package is as bellow:

/data
/doc
/lib
/node_modules
bootstrap.js
index.js
install.rdf
package.json

Even I tried to unzip and then zip the file again without doing any modification, but It didn't helped to see if it works or not, but it didn't work again. Is there any trick I miss? How should I repackage it?

1
A simple hint can help me more than a vote down ;), At least it can get me back on the right track . - Alex
Newbies dont deserve vote downs but guidance. Hope someone helps you out man im not sdk guy otherwise i would. - Noitidart
How do you sign repacked extension? blog.mozilla.org/addons/2015/02/10/… - Basilevs
I didn't signed it, I just want to test it in my local FF. Is it necessary to do that? Actually I want to know if I can pack it by just zipping the files extracted from an already created .xpi file (the one that I changed some of its js files)? Should I use Jpm to pack it again ? - Alex
It should works, there is no magic behind the XPI, it's just a zip. Be sure that you're actually zip back in the same structure – I mean, you don't have to zip the folder that contains all those files, you have to zip the file as one archive; that's one of the common mistakes I would say. If the XPI works before, it has to work also if you unzip and zip back without changes. Just double check the archive structure, it could be that you have a parent folder you don't expect. - ZER0

1 Answers

1
votes

I found the answer to my question. The directory structure were the same, but as the code is using add-on SDK, xpi should be produced by jpm. So I modified desired js codes and then I used jpm to produce xpi and it works well now.;)