MozillaZine

Changes to Extension Packaging

Talk about add-ons and extension development.
TheOneKEA

User avatar
 
Posts: 4864
Joined: October 16th, 2003, 5:47 am
Location: Somewhere in London, riding the Underground

Post Posted March 2nd, 2005, 6:52 am

As per bsmedberg's request in https://bugzilla.mozilla.org/show_bug.cgi?id=283352 , here's a thread explaining the creation of the new chrome manifest files and the removal of several properties from the install.rdf file.

Packaging Firefox Extensions wrote:Beginning with Firefox 1.1, extensions should specify all of their chrome packages in a single plaintext manifest file, chrome.manifest in the root of the extension. Get more information about this file format. If chrome.manifest is missing, the extension manager will generate one from the old em:file property and contents.rdf files.


Code: Select all
content mypackagename jar:chrome/myjarfile.jar!/content/
locale mypackagename en-US jar:chrome/myjarfile.jar!/locale/English/
locale mypackagename fr-FR jar:chrome/myjarfile.jar!/locale/French/
skin mypackagename classic/1.0 jar:chrome/myjarfile.jar!/skin/classic/

(comma removed from link by alanjstr 2006-02-28)
Proud user of teh Fox of Fire
Registered Linux User #289618

jgbishop
 
Posts: 455
Joined: November 16th, 2004, 1:45 pm
Location: North Carolina

Post Posted March 2nd, 2005, 8:33 am

The bug link should be: https://bugzilla.mozilla.org/show_bug.cgi?id=283352

Yours had a comma in it, which resulted in an invalid link.
Jonah Bishop - Born Geek

asqueella
 
Posts: 4019
Joined: November 16th, 2003, 3:05 am
Location: Russia, Moscow

Post Posted March 2nd, 2005, 8:48 am


TheOneKEA

User avatar
 
Posts: 4864
Joined: October 16th, 2003, 5:47 am
Location: Somewhere in London, riding the Underground

Post Posted March 2nd, 2005, 10:10 am

Ah, but did the creator of the other thread PM a staff member asking for teh sticky? ;)
Proud user of teh Fox of Fire
Registered Linux User #289618

TheOneKEA

User avatar
 
Posts: 4864
Joined: October 16th, 2003, 5:47 am
Location: Somewhere in London, riding the Underground

Post Posted March 2nd, 2005, 12:05 pm

EDIT:

Here's an example chrome.manifest file for TBP.

Code: Select all
content tabprefs jar:chrome/tabprefs.jar!/content/
locale tabprefs en-US jar:chrome/tabprefs.jar!/locale/en-US/
locale tabprefs cs-CZ jar:chrome/tabprefs.jar!/locale/cs-CZ/
locale tabprefs de-DE jar:chrome/tabprefs.jar!/locale/de-DE/
locale tabprefs el-GR jar:chrome/tabprefs.jar!/locale/el-GR/
locale tabprefs es-AR jar:chrome/tabprefs.jar!/locale/es-AR/
locale tabprefs es-ES jar:chrome/tabprefs.jar!/locale/es-ES/
locale tabprefs fi-FI jar:chrome/tabprefs.jar!/locale/fi-FI/
locale tabprefs fr-FR jar:chrome/tabprefs.jar!/locale/fr-FR/
locale tabprefs it-IT jar:chrome/tabprefs.jar!/locale/it-IT/
locale tabprefs ko-KR jar:chrome/tabprefs.jar!/locale/ko-KR/
locale tabprefs nl-NL jar:chrome/tabprefs.jar!/locale/nl-NL/
locale tabprefs pt-BR jar:chrome/tabprefs.jar!/locale/pt-BR/
locale tabprefs pt-PT jar:chrome/tabprefs.jar!/locale/pt-PT/
locale tabprefs ru-RU jar:chrome/tabprefs.jar!/locale/ru-RU/
locale tabprefs sl-SI jar:chrome/tabprefs.jar!/locale/sl-SI/
locale tabprefs sv-SE jar:chrome/tabprefs.jar!/locale/sv-SE/
locale tabprefs zh-CN jar:chrome/tabprefs.jar!/locale/zh-CN/
locale tabprefs zh-TW jar:chrome/tabprefs.jar!/locale/zh-TW/
skin tabprefs classic/1.0 jar:chrome/tabprefs.jar!/skin/classic/
Proud user of teh Fox of Fire
Registered Linux User #289618

jedbro

User avatar
 
Posts: 1899
Joined: November 10th, 2002, 12:35 pm
Location: Mexico / Boulder Co.

Post Posted March 2nd, 2005, 2:25 pm

TheOneKEA, have you tested this on a new nightly? (Just asking before I do the same for my extensions).
Cheers
-Jed

Ihoss

User avatar
 
Posts: 376
Joined: July 4th, 2004, 11:11 am

Post Posted March 2nd, 2005, 2:31 pm

so you don't need the install.rdf file anymore?

TheOneKEA

User avatar
 
Posts: 4864
Joined: October 16th, 2003, 5:47 am
Location: Somewhere in London, riding the Underground

Post Posted March 2nd, 2005, 2:34 pm

No. The 20050228 build that daihard made refuses to start, so I can't test any of my new XUL/JS. At best, it will probably be the end of the week before I get a working 1.2.9 build out the door.

Ihoss wrote:so you don't need the install.rdf file anymore?


You still need install.rdf; the <em:file> predicate has been obsoleted however, replaced with the new manifest files.
Proud user of teh Fox of Fire
Registered Linux User #289618

mcm_ham

User avatar
 
Posts: 1747
Joined: June 16th, 2004, 6:09 am
Location: Christchurch, New Zealand

Post Posted March 2nd, 2005, 4:00 pm

asqueella wrote:additionally, this has been posted already :)

It doesn't matter much if it's been posted twice, we're just spreading the word. TheOneKEA I have now PM'd a couple of moderators to make one of our posts a sticky.

Ihoss

User avatar
 
Posts: 376
Joined: July 4th, 2004, 11:11 am

Post Posted March 2nd, 2005, 4:03 pm

hmm, now they have changed the installation procedure 3 times! (js, rdf and now manifest)

mcm_ham

User avatar
 
Posts: 1747
Joined: June 16th, 2004, 6:09 am
Location: Christchurch, New Zealand

Post Posted March 2nd, 2005, 4:03 pm

jedbro wrote:TheOneKEA, have you tested this on a new nightly? (Just asking before I do the same for my extensions).
Cheers
-Jed

You'll find that with the latest build that it creates the chrome.manifest file automatically from the old <em:file> tags in install.rdf and from the chrome.rdf file anyway. Specifying your own just gives you more control.

Ihoss wrote:hmm, now they have changed the installation procedure 3 times! (js, rdf and now manifest)

It's because of Bug #278534. I think the number of bugs the new scheme fixes was worth it. Especially Bug #246209 chrome.rdf should use relative jar locations.

Moonwolf

User avatar
 
Posts: 531
Joined: December 7th, 2003, 2:50 pm
Location: Hertfordshire, England

Post Posted March 2nd, 2005, 5:03 pm

jedbro wrote:have you tested this on a new nightly?

Tested the latest version of EMbuttons on today's build (with all contents.rdf files removed) and it worked like a dream first time.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1
Thunderbird 1.0 (20041206)
EMbuttons: Buttons & options for the Extension Manager. Easy Get Mail Button is here too.

bsmedberg
 
Posts: 9
Joined: June 25th, 2004, 6:55 am
Location: Washington, DC

Post Posted March 3rd, 2005, 7:25 am

Just to clarify, I put in a decent amount of backwards-compatibility code so that if you want to keep using <em:file> and contents.rdf, you can; the old 1.0 format will still work for the forseeable future. The new format is a lot simpler, and I hope easier for extension authors to understand and harder to screw up ;)

DerManoMann
 
Posts: 101
Joined: March 31st, 2004, 5:39 pm
Location: New Zealand

Post Posted March 3rd, 2005, 3:43 pm

What about extensions that work fine the way they are at the moment.

Can we keet the <em:file> section in install.rdf to be backwards compatible and still add chrome.manifest (perhaps with more than install.rdf covers)?

mcm_ham

User avatar
 
Posts: 1747
Joined: June 16th, 2004, 6:09 am
Location: Christchurch, New Zealand

Post Posted March 3rd, 2005, 3:57 pm

Yes, that is what Bug #283352 solved.

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 1 guest