First, background on why you might need to do this. Feel free to skip down to the technical details.
I’m working on the AddArt firefox extension with some folks at the Eyebeam labs. Our extension replaces advertisements with artwork. To do this, we piggyback on the functionality of the excellent Ad Block Plus extension. We benignly inject code into ABP so that when it blocks an advertisement our code kicks in and puts in art. Our code is useless without ABP, so we have to make sure that when folks install us, they also get ABP. We wanted to save folks time and give them a one click install of our extension and the extension we depend on.
The details:
I didn’t find the simple instructions provided on Multiple Item Packaging to be simple enough, so here’s the skinny.
Put the n xpi files that you want to package together in an empty directory.
Create a file called install.rdf with the following contents:
an <em:type>32</em:type>
an <em:targetApplication> that has a minVersion and a maxVersion that are valid for all of the xpi files you are installing.
an <em:id> element
zip them all and rename the .zip to .xpi
That is all.
It is not tricky unless you are overcomplicating it. Firefox or Thunderbird or whatever just uses the install.rdf to note that this is a multiple item install xpi file and then installs every package inside of the xpi.
Here’s what our install.rdf looks like. Feel free to sub out the appropriate min and max versions for your needs and change the id and name values. Otherwise you don’t need to actually do anything.
So cool!I'm proud to announce that we now have a simple interface for editing and translating lessons on wikiotics.org! This is some great work by Jim that lets us get on with the fun part, making and playing with lessons. If you have a minute, take a look at our example lesson (in English) and play around. The "edit" button at the top will le […]
SEE the leaks are valuable. Now we know not to drink crappy beer oh wait. Buried in Wikileaks' Afghanistan documents is a largely ignored 2007 warning that Pakistani spies were planning to poison booze intended for American soldiers using sulfuric acid. It sounds a little far-fetched. Until you hear the story of James Yeager, an American geologist who c […]
Ok, for the to-read bucket The best-tasting food is the kind that comes from your own efforts, because victory tastes oh-so-sweet. Conquer KFC-style fried chicken, smoky barbecue, wood-fired pizza, five-minute bread, and other DIY delicacies with these great food-focused projects. More » […]
How to package two firefox extensions at once
First, background on why you might need to do this. Feel free to skip down to the technical details.
I’m working on the AddArt firefox extension with some folks at the Eyebeam labs. Our extension replaces advertisements with artwork. To do this, we piggyback on the functionality of the excellent Ad Block Plus extension. We benignly inject code into ABP so that when it blocks an advertisement our code kicks in and puts in art. Our code is useless without ABP, so we have to make sure that when folks install us, they also get ABP. We wanted to save folks time and give them a one click install of our extension and the extension we depend on.
The details:
I didn’t find the simple instructions provided on Multiple Item Packaging to be simple enough, so here’s the skinny.
It is not tricky unless you are overcomplicating it. Firefox or Thunderbird or whatever just uses the install.rdf to note that this is a multiple item install xpi file and then installs every package inside of the xpi.
Here’s what our install.rdf looks like. Feel free to sub out the appropriate min and max versions for your needs and change the id and name values. Otherwise you don’t need to actually do anything.
<?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:#$hFzg+”
em:id=”{ec8030f7-c20a-464f-9b0e-13a3a9e97384}”
em:minVersion=”2.0″
em:maxVersion=”3.1″ />
<RDF:Description RDF:about=”urn:mozilla:install-manifest”
em:id=”blahblah@add-art.org”
em:name=”add-artpackage”>
<em:targetApplication RDF:resource=”rdf:#$hFzg+”/>
<em:type>32</em:type>
</RDF:Description>
</RDF:RDF>
But wait, there's more