Easy Binary Components (again)
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!