Vincent Lam’s Weblog

On Open Source

Lab: Creating a Binary C++ XPCOM Component

Finally got the Creating a Binary C++ XPCOM Component lab working. here is the steps and trick i used.

1. have a firefox debug build ready.

2. create firstxpcom, firstxpcom/public, and firstxpcom/src folder in the mozilla/extensions folder

3. generate a UUID with the “uuidgen” command, create IFirstXpcom.id with the UUID generated.

4. create three Makefile.in (copy and paste the exact code from the wiki)

5. create the “install.rdf” file

6. run “../build/autoconf/make-makefile extensions/firstxpcom” in the object directory, to create the make object folder/file

7. copy “FirstXpcom.cpp” from the wiki to the firstxpcom/src folder.

8. run make at the objdir of firstxpcom, firstxpcom/public and firstxpcom/src

*That should do the trick. Now, to test.

9. install the javascript shell extension, if there is a security problem installing. read this “hints”

10. Run your debug build of firefox and follow the rest of the lab.

Advertisements

November 15, 2007 Posted by | open source | Leave a comment