I am working on writing an XPCOM component. I have my idl file, it is very simple, containing only the following:
#include "nsISupports.idl"
[scriptable, uuid(4ead-ba5c-49c9-beb2=64209c7699a)]
interface nsIPageSummary : nsISupports
{
boolean saveSummary(in nsIDOMDocument document,
out unsigned long numLinks,
out unsigned long numImages);
};
I downloaded the xulrunner sdk and am trying to generate my headers via the following command, from the directory containing the above file (nsIPageSummary.idl):
~/xulrunner-sdk/sdk/bin/header.py --cachedir=~/xulrunner-sdk/idl/ -o nsIPageSummary.h nsIPageSummary.idl
When this runs, I get the following message:
$ ~/xulrunner-sdk/sdk/bin/header.py --cachedir=~/xulrunner-sdk/idl -o nsIPageSummary.h nsIPageSummary.idl
Traceback (most recent call last):
File "~/xulrunner/xulrunner-sdk/sdk/bin/header.py", line 497, in <module>
idl.resolve(options.incdirs, p)
File "~/xulrunner/xulrunner-sdk/sdk/bin/xpidl.py", line 285, in resolve
p.resolve(self)
File "~/xulrunner-sdk/sdk/bin/xpidl.py", line 255, in resolve
raise IDLError("File '%s' not found" % self.filename, self.location)
xpidl.IDLError: error: File 'nsISupports.idl' not found, nsIPageSummary.idl line 1:0
#include "nsISupports.idl"
I have verified that the files exist in the above folder. I am using the MDN link (https://developer.mozilla.org/en-US/docs/XPIDL/pyxpidl) as a guide but it isn't helping much. How do I use these tools?
You should define ~/xulrunner-sdk/idl/
as your include path:
~/xulrunner-sdk/sdk/bin/header.py -I ~/xulrunner-sdk/idl/ ...
The cache directory on the other hand should really be some temporary directory as the documentation suggests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With