author dtownsend@oxymoronical.com
Tue, 29 Jan 2008 18:00:45 -0800
changeset 10979 6e65d9a3ce0fe82b0205f096b7725a91da479bb0
parent 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
Bug 406807: Remove unneccesary parts of xpinstall. r=bsmedberg, sr=dveditz, a=damons

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <title>Embedding distribution information</title>
<p>This is the Embedding distribution of <a
 href="http://www.mozilla.org/">Mozilla</a>. It     serves as a reference 
and smoketest distribution to demonstrate a typical     subset of Mozilla 
needed to embed it into another application. The     distribution contains 
sample applications for testing and development purposes.</p>
<p>Please note the phrase<i> typical subset</i>! If you want to use a different
     subset then see the <a href="#cust">customizing the embedding distribution</a>
     section below.</p>
<h2>Where can I find more information about embedding? </h2>
<p>Mozilla.org - <a href="http://www.mozilla.org/">http://www.mozilla.org/</a>.</p>
<p>The Embedding project page - <a
     This page should serve as your main point of information for learning 
how to     embed Mozilla in your own applications.</p>
<p>The Embedding Frequently Asked Questions (FAQ) page - <a
<p>The Embedding newsgroup - <a
<p>The Embedding QA page - <a
<p>Instructions for building Mozilla (including Embedding) - <a
<p>Instructions for fetching Mozilla source code (including Embedding) - <a
<h2>Contents </h2>
<p>The distribution contains, libraries, resources and chrome. All of this
     is a subset of Mozilla, repackaged for embedding. The layout follows 
the     usual Mozilla directory, i.e. </p>
        <li>./ - Test applications, launch scripts and core libraries (xpcom, 
nspr         etc.)</li>
        <li>./components/ - XPCOM components (network, graphics, layout,
content,          etc.).</li>
        <li>./chrome/ - chrome files. In embedding most of the chrome has 
been         re-packaged into a single embed.jar file to make it more manageable.</li>
        <li>./res/ - miscellaneous rendering and parser files.</li>
        <li>./defaults/ - default preference settings</li>
<p>A simple browser application built using the GTK+ Browser Widget.</p>
<h4>GTK+ Browser Widget</h4>
<p>A GTK+ widget for embedding Mozilla into GTK+/GNOME applications such as
<a href="http://galeon.sourceforge.net/">Galeon</a>.     More information 
about the widget may be found here <a
<p>A complete browser application written in MFC and the Gecko embedding APIs.
    This application demonstrates and exercises the functionality necessary 
to     put together a fully featured browser using Gecko.</p>
<h4>Mozilla ActiveX Control</h4>
<p>An ActiveX browser control built with the embedding APIs. You may use the
    control to embed a browser inside applications     written in VB, Delphi
etc. More information about the control including     installation instructions
may be found at <a href="http://www.iol.ie/%7Elocka/mozilla/mozilla.htm">http://www.iol.ie/~locka/mozilla/mozilla.htm</a>.
<h3>Macintosh </h3>
<p>PPEmbed is built as part of the standard Mac embedding build. Work on <a
 href="http://www.mozilla.org/ports/fizzilla/Mach.html">Fizilla     Mach</a> 
may also yield a Mac embedding distribution in the future. </p>
<h2>Installation and Usage </h2>
        <li>Untar the embedding distribution into an empty directory of your
        <li>From the command-line, cd into the directory and type       
 './run-mozilla.sh ./TestGtkEmbed'</li>
<h3>Windows </h3>
        <li>Unzip the embedding distribution into an empty directory of your
        <li>Double-click on mfcembed.exe</li>
<h2><a name="cust">Customizing the embedding distribution</a></h2>
<p>The embedding distribution is produced by first building the full Mozilla
     source and cherry picking files and chrome into a separate embedding 
directory.     Basically the steps are:</p>
        <li>Build Mozilla as usual</li>
        <li>cd mozilla/embedding/config</li>

<p><strong>Note:</strong> When using an objdir, cd into
&lt;objdir&gt;/embedding/config instead, and run make there.</p>

<p>The embedding distribution will appear in mozilla/dist/Embed.</p>
<p>The build process works by reading a file called basebrowser-win (or  
  basebrowser-unix, basebrowser-mac-macho etc.) and copying the listed files 
from     mozilla/dist/bin into mozilla/dist/Embed. It then reads a file called 
embed-jar.mn     and repackages the specified chrome files and directories 
into a single     embed.jar.<br>
<p>This process can be customized in one of two ways:<br>
   <li>Edit basebrowser-foo (where foo = win, unix etc.) and remove/add the 
items you require</li>
   <li>Create a new file called client-foo and add the items you require. 
This file is detected by the build process and will be run <i>after</i> the
contents of basebrowser-foo have been copied.</li>
 The latter is the best probably approach to take since the embedder can
maintain these files without modifying ones in Mozilla<i></i>. The client-foo
file      allows embedders to specify files to be added or removed from the
default      embedding distribution. A minus sign in front of a filename
deletes that      file.       
<p>For example if you wanted a distribution containing extra character converters, 
but not the ActiveX control and not XMLExtras you might define a     client-win 
like this:</p>