New Extension API - Docs Updated!

Talk about add-ons and extension development.
Post Reply
User avatar
avih
Posts: 347
Joined: December 30th, 2002, 2:36 pm
Contact:

Post by avih »

i again seriously suggest that 0.9 will be able to accept both old-style extensions and new-api ones.
Tried SmoothWheel already?
jedbro
Posts: 1899
Joined: November 10th, 2002, 12:35 pm
Location: Mexico / Boulder Co.
Contact:

Post by jedbro »

alanjstr wrote:
bengoodger wrote:I'm going to remove the UI that we have now for extensions and themes (in Options)...


Am I reading that right? You're changing the way themes are installed, too?

Still need to hear from you about GUID.


I beleive he did. Quoted below..

If your looking for a windows version M$'s <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=94551F58-484F-4A8C-BB39-ADB270833AFC&displaylang=en">GUIDGen</a> is pretty good. And yes, it is basically garanteed that you will not be able to generate an already used GUID.




bengoodger wrote:
alanjstr wrote:Keep in mind that things are subject to change. We will need a way to distribute GUID so that it is indeed unique.


GUIDs are pretty much randomly generated numbers that are so large that they are almost guaranteed to be globally unique (much more so than author-selected names), providing you use one of the tools mentioned (GUIDGen, uuidgen, botbot uuid, or a random generator that one writes oneself (pretty easy to do in JavaScript)).
jedbro
Posts: 1899
Joined: November 10th, 2002, 12:35 pm
Location: Mexico / Boulder Co.
Contact:

Post by jedbro »

bengoodger wrote:........Sigh. I understand what you're trying to do, and you should be able to do it. You have however uncovered one of our stupider APIs. I don't know that I can make this work by .9 but I'll look at it for 1.0. Make sure a bug is filed on me.

Done <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=242757">Bug #242757</a>.
Thanks Ben.
elliptic
Posts: 9
Joined: May 3rd, 2004, 11:46 am
Contact:

Post by elliptic »

bengoodger wrote:You can of course create any other dirs you want in the .xpi file and use data there - the entire XPI is expanded into the extensions dir.


Ah, okay, I didn't realize that. Appreciate the reply, Ben.
kjordan
Posts: 2
Joined: May 7th, 2004, 8:27 pm

Post by kjordan »

In what context is extension.rdf parsed? Would chrome DTD imports (for example, chrome://global/locale/brand.dtd) be correctly parsed, or would this somehow be considered something of a security issue?
User avatar
mozbugbox
Posts: 13
Joined: May 9th, 2004, 8:09 am

Post by mozbugbox »

Does that mean the components can be put into users profile now? I think currently, the components can only be installed system wide.

http://bugzilla.mozilla.org/show_bug.cgi?id=45701

If extensions can only be put into profile, and components can only be installed system wide, how can an extension with component be installed by users other than the root? There are extensions with components (.so or .dll) out there.
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

avih wrote:i again seriously suggest that 0.9 will be able to accept both old-style extensions and new-api ones.

Why bother with a transition period before 1.0? We need to get the extensions working under the new system, a transition will double the code required, increase chance of conflicts and bugs and reduce the incentive to convert extensions and themes before 0.9. I suspect that the rate they are fixed at will be much faster than the 0.7 -> 0.8 theme fixing, simply because there'll be a lot more people depending on it, and Ben is providing adequate documentation of the changes required.
User avatar
alanjstr
Moderator
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here
Contact:

Post by alanjstr »

mozbugbox wrote:Does that mean the components can be put into users profile now? I think currently, the components can only be installed system wide.

http://bugzilla.mozilla.org/show_bug.cgi?id=45701

If extensions can only be put into profile, and components can only be installed system wide, how can an extension with component be installed by users other than the root? There are extensions with components (.so or .dll) out there.


Extensions can be installed system-wide via command line.
Former UMO Admin, Former MozillaZine General Mod
I am rarely on mozillaZine, so please do not send me a private message.
My Old Firefox config files
User avatar
mozbugbox
Posts: 13
Joined: May 9th, 2004, 8:09 am

Post by mozbugbox »

alanjstr wrote:Extensions can be installed system-wide via command line.


I was talking about mix for .jar and component files in a installer package. As shown in the new extension structure, you can have both a chrome and a components directory. So what happened to an installer if it has both a components and a chrome? How does the new install handle this?

It's not how I install it (i.e. using command line), it about how the new installer handles it.
User avatar
bengoodger
Posts: 318
Joined: November 4th, 2002, 4:24 pm
Location: Campbell, CA
Contact:

Re: New Extension API

Post by bengoodger »

OK folks

I hope to have all of the new code available for use by the end of this week. Just need a couple of code reviews. The only thing that won't work right away is profile components.

Closer to the milestone release date i am going to turn off the UI in Preferences for Extensions and Themes (Themes are impacted too - they don't need repackaging but also need to provide a manifest for the new manager UI).

Later this week when the code finally becomes available in the nightly builds I will update my documentation to reflect the current state of the API (there have been some changes since last time I posted) - I will also post some workarounds for common problems or information about how certain coding patterns in your extensions will have to change.

This is a heads up that the old UI will be removed before 0.9 and that you will need to update and repackage if you want your items to show up.
TheOneKEA
Posts: 4864
Joined: October 16th, 2003, 5:47 am
Location: Somewhere in London, riding the Underground

Post by TheOneKEA »

So when the new manager goes active, no further extensions can be installed, and if the nightly is used to overwrite an existing profile, existing extensions will break too?
Proud user of teh Fox of Fire
Registered Linux User #289618
User avatar
alanjstr
Moderator
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here
Contact:

Re: New Extension API

Post by alanjstr »

bengoodger wrote:Themes are impacted too - they don't need repackaging but also need to provide a manifest for the new manager UI


As what, a theme.rdf?
Former UMO Admin, Former MozillaZine General Mod
I am rarely on mozillaZine, so please do not send me a private message.
My Old Firefox config files
User avatar
bengoodger
Posts: 318
Joined: November 4th, 2002, 4:24 pm
Location: Campbell, CA
Contact:

Post by bengoodger »

TheOneKEA wrote:So when the new manager goes active, no further extensions can be installed, and if the nightly is used to overwrite an existing profile, existing extensions will break too?


You will still be able to install old-style extensions, they just won't show up in a list anywhere. The first time 0.9 runs, it will also disable all your old-style extensions to prevent UI bustage like what happened last time.
Greg K Nicholson
Posts: 1328
Joined: September 28th, 2003, 8:58 am
Contact:

Post by Greg K Nicholson »

Here's a crazy idea: could the old extension UI be provided as an (new-style) extension? So we old-timers can still see legacy extensions?

(I'm thoroughly enjoying the irony of this suggestion)
TheOneKEA
Posts: 4864
Joined: October 16th, 2003, 5:47 am
Location: Somewhere in London, riding the Underground

Post by TheOneKEA »

bengoodger wrote:
TheOneKEA wrote:So when the new manager goes active, no further extensions can be installed, and if the nightly is used to overwrite an existing profile, existing extensions will break too?


You will still be able to install old-style extensions, they just won't show up in a list anywhere. The first time 0.9 runs, it will also disable all your old-style extensions to prevent UI bustage like what happened last time.


So how will they be reenabled then? Via the new UI?
Proud user of teh Fox of Fire
Registered Linux User #289618
Post Reply