Gecko SDK

  • Revision slug: Gecko_SDK
  • Revision title: Gecko SDK
  • Revision id: 30659
  • Created:
  • Creator: Duwei
  • Is current revision? No
  • Comment

Revision Content

Overview

The Gecko 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 SDK with XULRunner. 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.

Get the SDK

Updates

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 to get and distribute the newest Gecko components (gklayout.dll etc.), though.

Downloading

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.7 Gecko SDK if you want to use your component with Mozilla 1.6. This is important because binary compatibility is ensured only with future versions of the Gecko runtime. For this tutorial, we'll be using the 1.7 version of the Gecko SDK so that our component is binary compatible with Mozilla 1.7 (and any derived products such as Firefox 1.0 or Netscape 7.2).

Download Link Gecko 1.7 (Firefox 1.0) Gecko 1.8 (Firefox 1.5 and 2.0)
Windows Download Download
Mac N/A Download
Linux i686 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.

Building the SDK

To build the SDK, you should build XULRunner (the Gecko SDK is built as part of the XULRunner build process). See the Build Documentation for complete details.

The Gecko SDK is output under dist/sdk in your object dir. You can now copy this directory to wherever you want and remove the XULRunner tree.

Contents of the SDK

The SDK contains the following:

  • IDL files for frozen interfaces (under idl/)
  • Header files for frozen interfaces, XPCOM functions, and NSPR functions (under include/)
  • Import libraries or shared libraries (under lib/)
  • Static utility libraries (under lib/)
  • Various tools (under bin/)

For more information about safely linking XPCOM components using the XPCOM "glue" library, see XPCOM Glue.

Resources

  • static xpidl.exe (non-official) If you are looking for a static linked xpidl.exe, you can download here.
  • Mac Intel Gecko SDK The official Mac SDK is a ppc version. This is an Intel build.
{{ wiki.languages( { "zh-cn": "cn/Gecko_SDK", "fr": "fr/SDK_Gecko", "ja": "ja/Gecko_SDK" } ) }}

Revision Source

<p>
</p>
<h2 name="Overview"> Overview </h2>
<p>The Gecko SDK is a set of <a href="en/XPIDL">XPIDL</a> files, headers and tools to develop <a href="en/XPCOM">XPCOM</a> components which can then in turn e.g. be accessed from <a href="en/XUL">XUL</a> using <a href="en/JavaScript">JavaScript</a>.
</p><p>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.
</p><p>Do not confuse the Gecko SDK with <a href="en/XULRunner">XULRunner</a>. 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.
</p><p>The Gecko SDK contains all of the necessary tools and headers for making scriptable NPAPI plugins including the xpidl compiler/linker and the latest <code>npapi.h</code>.
</p>
<h2 name="Get_the_SDK"> Get the SDK </h2>
<h3 name="Updates"> Updates </h3>
<p>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 <b>do have to</b> to get and distribute the newest Gecko components (gklayout.dll etc.), though.
</p>
<h3 name="Downloading"> Downloading </h3>
<p>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.7 Gecko SDK if you want
to use your component with Mozilla 1.6.  This is important because binary
compatibility is ensured only with future versions of the Gecko runtime.  For
this tutorial, we'll be using the 1.7 version of the Gecko SDK so that our
component is binary compatible with Mozilla 1.7 (and any derived products
such as Firefox 1.0 or Netscape 7.2).
</p>
<table class="standard-table">
<tbody><tr>
<th>Download Link
</th><th>Gecko 1.7 (Firefox 1.0)
</th><th>Gecko 1.8 (Firefox 1.5 and 2.0)
</th></tr><tr>
<th>Windows
</th><td><a class="external" href="http://releases.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7/gecko-sdk-i586-pc-msvc-1.7.zip">Download</a>
</td><td><a class="external" href="http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.0.4/sdk/gecko-sdk-win32-msvc-1.8.0.4.zip">Download</a>
</td></tr><tr>
<th>Mac
</th><td>N/A
</td><td><a class="external" href="http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.0.4/sdk/gecko-sdk-mac-1.8.0.4.zip">Download</a>
</td></tr><tr>
<th>Linux i686
</th><td><a class="external" href="http://releases.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7/gecko-sdk-i686-pc-linux-gnu-1.7.tar.gz">Download</a>
</td><td><a class="external" href="http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.0.4/sdk/gecko-sdk-i686-pc-linux-gnu-1.8.0.4.tar.bz2">Download</a>
</td></tr></tbody></table>
<p>The SDK is not officially released for other platforms; if you need it, you will probably need to build it yourself.
</p><p>Unpack the SDK tarball to some suitable location.
</p>
<h3 name="Building_the_SDK"> Building the SDK </h3>
<p>To build the SDK, you should build <a href="en/XULRunner">XULRunner</a> (the Gecko SDK is built as part of the XULRunner build process). See the <a href="en/Build_Documentation">Build Documentation</a> for complete details.
</p><p>The Gecko SDK is output under <code>dist/sdk</code> in your object dir. You can now copy this directory to wherever you want and remove the XULRunner tree.
</p>
<h2 name="Contents_of_the_SDK"> Contents of the SDK </h2>
<p>The SDK contains the following:
</p>
<ul><li> IDL files for frozen interfaces (under <code>idl/</code>)
</li><li> Header files for frozen interfaces, XPCOM functions, and NSPR functions (under <code>include/</code>)
</li><li> Import libraries or shared libraries (under <code>lib/</code>)
</li><li> Static utility libraries (under <code>lib/</code>)
</li><li> Various tools (under <code>bin/</code>)
</li></ul>
<p>For more information about safely linking XPCOM components using the XPCOM "glue" library, see <a href="en/XPCOM_Glue">XPCOM Glue</a>.
</p>
<h2 name="Resources"> Resources </h2>
<ul><li> <a href="User:Andywang/xpidl">static xpidl.exe</a> (non-official) If you are looking for a static linked xpidl.exe, you can download here.
</li><li> <a class="external" href="http://www.oxymoronical.com/view/1114">Mac Intel Gecko SDK</a> The official Mac SDK is a ppc version. This is an Intel build.
</li></ul>
{{ wiki.languages( { "zh-cn": "cn/Gecko_SDK", "fr": "fr/SDK_Gecko", "ja": "ja/Gecko_SDK" } ) }}
Revert to this revision