The Gecko SDK, also known as the XULRunner SDK, is a set of XPIDL files, headers and tools to develop XPCOM components which can then in turn e.g. be accessed from XUL using JavaScript.
Note that in order to develop such components, you do not need the full sources of e.g. Firefox, since you do not access parts of the front end from within a component. Furthermore, since a component contains basic functionality, it is intended to run with every product of the Mozilla platform. Therefore it makes no sense to use a particular product to build general functionality. That's the reason why the Gecko SDK was devised.
Do not confuse the Gecko/XULRunner SDK with XULRunner itself. The Gecko SDK is a collection of header files and tools used to develop general XPCOM components which add functionality to the existing platform, whereas XULRunner is a framework which can be used to run standalone or embedded applications based on the Mozilla framework.
The Gecko SDK contains all of the necessary tools and headers for making scriptable NPAPI plugins including the xpidl compiler/linker and the latest npapi.h.
There is no need to download or rebuild the Gecko SDK corresponding to security updates of Mozilla (e.g., Mozilla 1.7.3) since the headers and glue libs in the Gecko SDK are usually not changed as a result of security updates. You do have to get and distribute the newest Gecko components (gklayout.dll etc.), though.
When downloading the Gecko SDK, it is important to choose the version that corresponds to the earliest version of Mozilla that you wish to target. In other words, you shouldn't download the 1.9 Gecko SDK if you want to use your component with Firefox 1.5. This is important because binary compatibility is ensured only with future versions of the Gecko runtime.
| Download Link | Gecko 1.8 (Firefox 1.5 and 2.0) | Gecko 1.9 (Firefox 3.0) | Gecko 1.9.1 (Firefox 3.5) | Gecko 1.9.2 (Firefox 3.6) |
|---|---|---|---|---|
| Windows | Download | Download | Download | Download |
| Mac ppc | Download | Download | Download | Download |
| Mac i386 | N/A | Download | Download | Download |
| Linux i686 | Download | Download | Download | Download |
The SDK is not officially released for other platforms; if you need it, you will probably need to build it yourself.
Unpack the SDK tarball to some suitable location.
If you need to use the xpidl utility to compile IDL files on OS X, it's likely that you will receive a strange error when running the tool that looks something along the lines of this:
dyld: Library not loaded: /opt/local/lib/libintl.3.dylib Referenced from: /Users/varmaa/xulrunner-sdk/bin/./xpidl Reason: image not found Trace/BPT trap
Unfortunately, this is caused by a problem with the SDK build process which cannot currently be resolved (see Bugzilla bug #430274). To get around it, you'll need to first install MacPorts as outlined in the Mac OS X Build Prerequisites and install libidl with it. On 64-bit versions of Mac OS X, you'll need to install libidl with the +universal flag.
Once that's done, you should perform the following command:
ln -s /opt/local/lib/libintl.8.dylib /opt/local/lib/libintl.3.dylib
This should fix the problem.
To build the SDK, you should build XULRunner (the Gecko SDK is built as part of the XULRunner build process, which is why it's sometimes called the XULRunner SDK). See the Build Documentation for complete details. After the XULRunner build is complete running make sdk from your object directory will create a package of the sdk in dist.
The SDK contains the following:
idl/)include/)lib/)lib/)bin/)For more information about safely linking XPCOM components using the XPCOM "glue" library, see XPCOM Glue.
It's possible to use the Mozilla Build System with the SDK. This can be done by downloading the source code for Firefox and using the --with-libxul-sdk option to configure.
Page last modified 03:29, 27 Mar 2010 by Sheppy