Search code examples
mozillaxpcom

Using xpidl command to create .h


I have built Firefox from the source code, and I am trying to create a component. I try running xpidl on my .idl file from terminal

$ xpidl -m header -w -v- I $XPIDL_INC \ > -o nsIPageSummary nsIPageSummary.idl

but I get -bash: xpidl: command not found

I've tried changing the path PATH=$PATH:/usr/src/mozilla/xpcom/typelib/xpidl, but to no avail. I am probably just completely misunderstanding how to use the xpidl command. But is all you need the Fire fox source code it having been built? And is there a certain directory that you need to be in to use the command?


Solution

  • Which version of Firefox do you use?

    Starting in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6), xpidl has been replaced with pyxpidl in the Gecko SDK. pyxpidl has been used for some time now, but now this older tool has been fully retired.

    https://developer.mozilla.org/en-US/docs/XPIDL/xpidl

    https://developer.mozilla.org/en-US/docs/XPIDL/pyxpidl