Easy Binary Components (again) 2008.04.24 04:20

Puzzle pieces
Puzzle pieces ©Clarissa Ines

I've updated the binary XPCOM component starter kit to version 0.2. Thanks to Mossop and Benjamin for helping me understand the Gecko SDK a bit better. There is no longer a requirement to copy mozilla-config.h (mistyped as 'mozilla-build.h' in my last post, heh). To build a binary component you simply:

Then restart Firefox (which you hopefully already have configured to point to your extension), and the new component will be automatically loaded. You can test by opening the error console and executing this line:

Components.classes["@mydomain.com/XPCOMSample/MyComponent;1"].name

If you get the name back, it's working! If you get an undefined property error then something is wrong. Let me know if it's something I can fix in the kit.

I hope this makes it easier for other people get started writing binary components. I particularly like that it doesn't require having full mozilla source/objdir trees, that should make it easier to integrate a new component into an already-existing extension.

Happy hacking!

Matthew Gertner said on 2008.4.25 10:12:
This is awesome, Dan! Now if someone will make templates for VS.NET, XCode, etc. we'll be a lot closer to what I described here: http://browsing.justdiscourse.com/2008/04/16/the-future-of-firefox-extensions-make-them-more-like-web-apps/ (in the first half of the post).
Dan said on 2008.5.5 3:33:
Thanks, Matt!

I am not much of an IDE guy, but this should make it much easier for someone to adapt this to those environments.

Unfortunately it doesn't solve the underlying problem of all the different technologies and languages that (as you said in your post) one must know to get started writing an extension.
( v 0