xpidl
内容表格
1. 1. 编译 xpidl
2. 2. 使用 xpidl
3. 3. 资源
4. 4. 原始文档信息
xpidl 是一个基于 XPIDL 接口描述文件, 用于生成 XPCOM 接口信息的工具. 它会自动生成:
* C++ 头文件 (.h), 该头文件中包含了一个带注释的 C++ 接口的完整声明.
* Java 接口文件 (.java)
* XPConnect typelib 文件 (.xpt), 这个文件中定义了通过 XPConnect 动态调用 XPCOM 对象的运行时刻类型信息.
* HTML 格式的文档 (.html)
编译 xpidl
xpidl 的实现是基于 Gnome 工程中的 libIDL idl 编译器. libIDL 编译器依赖的 glib 库也来自于 gnome 工程. xpidl 编译器现在是 Mozilla 整个编译过程中必须包含的一分子, 我们用它来生成 XPCOM 组件的头文件. 如何得到 libIDL 和 glib 请看 Build Documentation.
Unix: 如果你仅仅想编译 xpidl 本身, 你只需要编译很少一部分目录. 在获取 mozilla 源码后, 执行 'configure', 然后以下面的命令就可以在 dist/bin 目录下编译出 xpidl:
make -C config
make -C nsprpub
make -C xpcom/typelib
使用 xpidl
xpidl build page 有关于如何添加一个 XPIDL 文件到 Mozilla 的编译过程的说明. xpidl 也可以在 Unix 和 Windows 下以命令行的形式执行:
Usage: ./xpidl -m mode [-w] [-v] [-t version number]
[-I path] [-o basename | -e filename.ext] filename.idl
-a emit annotations to typelib
-w turn on warnings (recommended)
-v verbose mode (NYI)
-t create a typelib of a specific version number
-I add entry to start of include path for ``#include "nsIThing.idl"
-o use basename (e.g. ``/tmp/nsIThing) for output
-e use explicit output filename
-m specify output mode:
header Generate C++ header (.h)
typelib Generate XPConnect typelib (.xpt)
doc Generate HTML documentation (.html)
java Generate Java interface (.java)
如上所说,我到底该怎么在我的系统中装入这个XPIDL,要不然gecko sdk没办法装入,我只是想装个mplayer plugin而已,就碰到这么多要装,头大死了,
我没法进入下一步啊?
我安装如下:
[root@localhost home]# cd mplayerplug-in-3.55
[root@localhost mplayerplug-in-3.55]# ./configure --with-gecko-sdk=/home/gecko-sdk
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
Using new (v1.7+) gecko-sdk
checking for xpidl... no
configure: error: xpidl compiler not found