New Extension Wizard

Talk about add-ons and extension development.
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

New Extension Wizard

Post by Ted Mielczarek »

http://ted.mielczarek.org/code/mozilla/extensionwiz/

Please try it out and let me know what you think. I get tired of copying one of my old extensions every time I want to make a new extension, so I created this tool. It's something of a successor to my old install.rdf generator.

I have some ideas that I plan on implementing, such as options to generate skeleton code for common features, like toolbar buttons, sidebars, options dialogs, preferences.

What would be useful to you?

-Ted
ericjung
Posts: 846
Joined: August 4th, 2003, 9:32 am

Post by ericjung »

OH MY GOD THIS IS INCREDIBLE!

Ted, I love you.

One question: what is "Extension ID"? I thought it would be <em:id/> in install.rdf, but I can't enter a GUID, e.g., 5872365e-67d1-4afd-9480-fd293bebd20d

Much love on Valentines Day,
grimholtz
User avatar
cyberrus
Posts: 144
Joined: October 15th, 2004, 5:42 pm
Location: Wroclaw, Poland

Post by cyberrus »

jeez! half work done...
User avatar
Schrade
Posts: 1187
Joined: March 17th, 2004, 12:24 am

Post by Schrade »

Wow, nice! Can you do one for themes too? There is this one but it's out of date: http://www.tecknik.net/themer/
"Linux is for those who hate Windows, BSD is for those who love Unix." -Some Guy
Try my themes: QuBranch and QuTrunk
Fix Firefox's Resized image scrolling speed: <b>Bug 163975</b>
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Post by Ted Mielczarek »

:) Happy Valentine's Day!

grimholtz: it is em:id, but since this only supports Firefox 1.5, it only accepts email-like IDs, which are nicer for everyone. Use like grimholtz@yourdomain.com or whatever.

cyberrus: That's the whole point! I want extension development to be about the fun parts, like figuring out cool things, not about the boring boilerplate code.

Schrade: I probably could, but I've never made a theme, having no artistic ability. If someone can point me at an extensive list of things that should go into one, then I might do it.

I have updated the tool with a few more options. You can now ask it to generate a pref panel, select an icon for your extension, and generate a custom about dialog.

Feedback welcome!


-Ted
User avatar
RaiseMachine
Posts: 1764
Joined: December 6th, 2004, 6:05 pm
Location: England

Post by RaiseMachine »

Nice work Ted!

I say go for it with regards to your initial ideas, more skeleton code done the better imho.
"Doesn't the idea of making nature against the law seem to you a bit... unnatural ?" - Bill Hicks
"Money is the Schrodinger's Cat of economics." - Robert Anton Wilson
"It's not a bug, it's two features having a fight in the pub car-park." - Me
User avatar
Philip Chee
Posts: 6475
Joined: March 1st, 2005, 3:03 pm
Contact:

Post by Philip Chee »

Ted Mielczarek wrote:grimholtz: it is em:id, but since this only supports Firefox 1.5, it only accepts email-like IDs, which are nicer for everyone. Use like grimholtz@yourdomain.com or whatever.
I thought that email like IDs are optional and that UUIDs are still accepted.
Still needs some work for seamonkey extensions.
skin/ should be skin/classic/.

Phil
User avatar
Pike
Posts: 2293
Joined: August 10th, 2003, 12:12 pm
Location: UK
Contact:

Post by Pike »

Very nifty.

p.s. If the "Extension Short Name" field contains any uppercase characters, you get the not very helpful: "Short Name must be a string of alphabetic characters."
Bloodeye
Posts: 582
Joined: July 12th, 2004, 7:20 pm

Post by Bloodeye »

How about a client-side version?

Actually, I had thought about creating something similar for myself. An extension that would gather user input thru a wizard, and then generate a "new extension" with a flat layout within the current profile. Then if I wanted to test\try something I could be coding it rather quickly.
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Post by Ted Mielczarek »

Phil: Yes, they're still supported, but I'm not encouraging their use for new extensions. ;-) I'll put in support for them if people really want them. I wasn't really intending to support seamonkey either, then I'd have to deal with all the pre-1.5 extension crap.
Any particular reason skin/ should be skin/classic?

Pike: https://bugzilla.mozilla.org/show_bug.cgi?id=132183 :) I guess I should put "lowercase" in that error message?
User avatar
Philip Chee
Posts: 6475
Joined: March 1st, 2005, 3:03 pm
Contact:

Post by Philip Chee »

Ted Mielczarek wrote:Phil: Yes, they're still supported, but I'm not encouraging their use for new extensions. ;-) I'll put in support for them if people really want them.
Not really, but you should put a note on the format
Ted Mielczarek wrote: I wasn't really intending to support seamonkey either, then I'd have to deal with all the pre-1.5 extension crap.
Heh, I was just pulling your leg.
Ted Mielczarek wrote:Any particular reason skin/ should be skin/classic?
So that it's easier to add skin/modern or skin/winstripe or skin/fusion later on?

Also your .ZIP is one level too deep. the content/defaults/locale/skin directories and other files should be in the root of the XPI/ZIP, not under extname.ZIP/extname/*

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

Post by asqueella »

So that it's easier to add skin/modern or skin/winstripe or skin/fusion later on?

Very few extensions come with several themes in the XPI. Usually the themes "support" some extensions by providing alternative skins for them.
User avatar
Pike
Posts: 2293
Joined: August 10th, 2003, 12:12 pm
Location: UK
Contact:

Post by Pike »

Ted Mielczarek wrote:Pike: https://bugzilla.mozilla.org/show_bug.cgi?id=132183 :) I guess I should put "lowercase" in that error message?

Yeah, I wanted to see whether uppercase was handled, it'd definitely be more newbie friendly if you mentioned the lowercase thing (or just fixed it automatically).
supernova_00
Posts: 4832
Joined: June 24th, 2004, 8:03 pm
Location: Maryland, USA

Post by supernova_00 »

Thanks Ted! great job
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Post by Ted Mielczarek »

Phil: I zip it that way so you can just unzip it somewhere and it will create a project directory for you. Most open source software is archived like that (usually in .tar.gz though) and it's pretty convenient.

I've got some more additions that I'll get to sometime today, and I'll do a little cleanup based on your suggestions here as well.

Definitely on my plate next are adding a toolbar button and context menu item.
Post Reply