On 11/10/06, Bob Spencer <[EMAIL PROTECTED]> wrote:
System info: Firefox 1.5+, Linux (FC4), gecko_sdk 1.8
I have a questions about building and packaging (xpi) an extension that uses
C++ XPCOM objects. Namely, does the C++ code get compiled and distributed as a
shared library (.so) or what gets packaged into the .xpi file?
Yes, your package structure is correct. (See
http://developer.mozilla.org/en/docs/Bundles )
The component may not be getting registered because it has
dependencies that can't be resolved on your other system, because you
have a different version of Firefox on your other machine (e.g.
version earlier than the SDK's version), or because on your other
system a component with a different ABI is expected... Which builds of
Firefox have you tested your component with?
See also:
http://groups-beta.google.com/group/mozilla.dev.tech.xpcom/browse_thread/thread/16f62869a99f3295/70e6465b6a2e90b5?lnk=st&q=xpcom+component+dependencies+group%3Amozilla.dev.*&rnum=1#70e6465b6a2e90b5
Nickolay
I have successfully built a simple firefox extension in linux. It has a single C++ XPCOM
component. I am able to load firefox and see my extensions working, including the calls
to native code. I can package it up as an .xpi and install it successfully on both of my
systems. But it only works correctly on the system it was built on. When I run Firefox
on the 2nd system the extension loads (I see my debug "alerts" and XUL widgets
appear), but when the XPCOM component gets loaded I get this error:
TypeError: Components.classes['@foo.com/pm;1'] has no properties
I assume this is because my native library is not correctly packaged or
registered.
My .xpi looks like this:
chrome.manifest
install.rdf
chrome /
pm.jar
defaults /
preferences /
defaults.js
components /
pm.so
IPMObj.xpt
Any tips appreciated. I've walked through the extension tutorial and can't see
any reference to how the native components should be packaged.
Thanks,
Bob
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom