Theme Packaging

  • Revision slug: Theme_Packaging
  • Revision title: Theme Packaging
  • Revision id: 130987
  • Created:
  • Creator: Takakazu13
  • Is current revision? No
  • Comment /* Pre-requisites */

Revision Content

This document describes how to package themes for Firefox and Thunderbird.

Pre-requisites

Making a theme for Firefox or Thunderbird requires knowledge of Cascading Stylesheets (CSS), probably XBL, and some graphic design and aesthetic skill (...or maybe not). This document describes only how Themes are packaged in order to be shown in Firefox's Themes window. Bold textItalic textLink titlelink titleImage:Example.jpgMedia:Example.ogg

Insert formula here
Insert non-formatted text here--Takakazu13 23:27, 20 March 2007 (PDT)--Takakazu13 23:27, 20 March 2007 (PDT)


Bold textItalic text'Italic text'Italic text

Theme File Layout

Firefox/Thunderbird themes are packaged in a JAR file with the following structure:

theme.jar:
  install.rdf
  contents.rdf
  preview.png
  icon.png
  browser/files
  global/files
  mozapps/files
  communicator/files
  ...
     
  • You must have a top-level chrome.manifest (Firefox/Thunderbird 1.5) or contents.rdf file which registers the chrome for the theme (as before) and also an install.rdf manifest that specifies metadata that is displayed in the Themes window.
  • preview.png is a preview image which will show in the scrolling preview area in the Themes window. It can be any size.
  • icon.png is a 32x32 PNG (may contain alpha transparency) which will show up in the Themes list in the Themes window.

install.rdf

Your install.rdf manifest will look something like this:

<?xml version="1.0"?>

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#">

  <Description about="urn:mozilla:install-manifest">
    <em:type>4</em:type>
    more properties
  </Description>      
</RDF>

Required install.rdf Properties

Your install.rdf file must have the following properties. See the install.rdf Reference for more information:

  • em:id
  • em:version
  • em:type
  • em:targetApplication
  • em:name
  • em:internalName

Optional install.rdf Properties

  • em:description
  • em:creator
  • em:contributor
  • em:homepageURL
  • em:updateURL

Note that if your theme will be made available on the http://addons.mozilla.org website, it should not include an updateURL.

Sample install.rdf File

<?xml version="1.0"?>

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#">

  <Description about="urn:mozilla:install-manifest">
    <em:id>{18b64b56-d42f-428d-a88c-baa413bc413f}</em:id>
    <em:version>1.0</em:version>
    <em:type>4</em:type>

    <!-- Target Application this extension can install into, 
         with minimum and maximum supported versions. -->
    <em:targetApplication>
      <Description>
        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>0.8</em:minVersion>
        <em:maxVersion>0.9</em:maxVersion>
      </Description>
    </em:targetApplication>
    
    <!-- Front End MetaData -->
    <em:name>New Theme 1</em:name>
    <em:description>A test theme for Firefox</em:description>
    <em:creator>Ben Goodger</em:creator>
    <em:contributor>John Doe</em:contributor>
    <em:homepageURL>http://www.bengoodger.com/</em:homepageURL>

    <!-- Front End Integration Hooks (used by Theme Manager)-->
    <em:internalName>newtheme1</em:internalName>
  </Description>
</RDF>

The following are some common target application GUIDs that you can use in your targetApplication properties:

Firefox      {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
Thunderbird  {3550f703-e582-4d05-9a08-453d09bdfdc6}
Sunbird      {718e30fb-e89b-41dd-9da7-e25a45638b28}

Official References for Toolkit API

{{wiki.template(':en/Toolkit_API/Official_References')}}

{{ wiki.languages( { "es": "es/Empaquetar_un_Tema", "fr": "fr/Empaqueter_un_th\u00e8me", "ja": "ja/Theme_Packaging", "pt": "pt/Compress\u00e3o_de_Temas" } ) }}

Revision Source

<p>
</p><p>This document describes how to package <a href="en/Themes">themes</a> for Firefox and Thunderbird.
</p>
<h3 name="Pre-requisites"> Pre-requisites </h3>
<p>Making a theme for Firefox or Thunderbird requires knowledge of Cascading Stylesheets (<a href="en/CSS">CSS</a>), probably <a href="en/XBL">XBL</a>, and some graphic design and aesthetic skill (...or maybe not). This document describes only how Themes are packaged in order to be shown in Firefox's Themes window.
<b>Bold text</b><i>Italic text</i><a href="en/Link_title">Link title</a><a class="external" href="http://www.example.com">link title</a><img alt="Image:Example.jpg" src="File:en/Media_Gallery/Example.jpg"><a href="File:en/Media_Gallery/Example.ogg">Media:Example.ogg</a></p><pre class="script" function="math.formula">Insert formula here</pre><span class="plain">Insert non-formatted text here</span>--<a href="User:Takakazu13">Takakazu13</a> 23:27, 20 March 2007 (PDT)--<a href="User:Takakazu13">Takakazu13</a> 23:27, 20 March 2007 (PDT)
<p></p>
<hr>
<p><b>Bold text</b><i>Italic text'<b>Italic text'</b>Italic text</i>
</p>
<h3 name="Theme_File_Layout"> Theme File Layout </h3>
<p>Firefox/Thunderbird themes are packaged in a JAR file with the following structure:
</p>
<pre class="eval">theme.jar:
  install.rdf
  contents.rdf
  preview.png
  icon.png
  browser/<i>files</i>
  global/<i>files</i>
  mozapps/<i>files</i>
  communicator/<i>files</i>
  ...
     
</pre>
<ul><li> You must have a top-level <a href="en/Chrome.manifest">chrome.manifest</a> (Firefox/Thunderbird 1.5) or contents.rdf file which registers the chrome for the theme (as before) and also an <a href="en/Install.rdf">install.rdf</a> manifest that specifies metadata that is displayed in the Themes window.
</li><li> preview.png is a preview image which will show in the scrolling preview area in the Themes window. It can be any size.
</li><li> icon.png is a 32x32 PNG (may contain alpha transparency) which will show up in the Themes list in the Themes window.
</li></ul>
<h3 name="install.rdf"> install.rdf </h3>
<p>Your <a href="en/Install.rdf">install.rdf</a> manifest will look something like this:
</p>
<pre class="eval">&lt;?xml version="1.0"?&gt;

&lt;RDF xmlns="<span class="plain">http://www.w3.org/1999/02/22-rdf-syntax-ns#</span>"
     xmlns:em="<span class="plain">http://www.mozilla.org/2004/em-rdf#</span>"&gt;

  &lt;Description about="urn:mozilla:install-manifest"&gt;
    &lt;em:type&gt;4&lt;/em:type&gt;
    <i>more properties</i>
  &lt;/Description&gt;      
&lt;/RDF&gt;
</pre>
<h4 name="Required_install.rdf_Properties"> Required install.rdf Properties </h4>
<p>Your install.rdf file must have the following properties. See the <a href="en/Install.rdf">install.rdf Reference</a> for more information:
</p>
<ul><li> em:id
</li><li> em:version
</li><li> em:type
</li><li> em:targetApplication
</li><li> em:name
</li><li> em:internalName
</li></ul>
<h4 name="Optional_install.rdf_Properties"> Optional install.rdf Properties </h4>
<ul><li> em:description
</li><li> em:creator
</li><li> em:contributor
</li><li> em:homepageURL
</li><li> em:updateURL
</li></ul>
<p>Note that if your theme will be made available on the http://addons.mozilla.org website, it should not include an updateURL.
</p>
<h4 name="Sample_install.rdf_File"> Sample install.rdf File </h4>
<pre class="eval">&lt;?xml version="1.0"?&gt;

&lt;RDF xmlns="<span class="plain">http://www.w3.org/1999/02/22-rdf-syntax-ns#</span>"
     xmlns:em="<span class="plain">http://www.mozilla.org/2004/em-rdf#</span>"&gt;

  &lt;Description about="urn:mozilla:install-manifest"&gt;
    &lt;em:id&gt;{18b64b56-d42f-428d-a88c-baa413bc413f}&lt;/em:id&gt;
    &lt;em:version&gt;1.0&lt;/em:version&gt;
    &lt;em:type&gt;4&lt;/em:type&gt;

    &lt;!-- Target Application this extension can install into, 
         with minimum and maximum supported versions. --&gt;
    &lt;em:targetApplication&gt;
      &lt;Description&gt;
        &lt;em:id&gt;{ec8030f7-c20a-464f-9b0e-13a3a9e97384}&lt;/em:id&gt;
        &lt;em:minVersion&gt;0.8&lt;/em:minVersion&gt;
        &lt;em:maxVersion&gt;0.9&lt;/em:maxVersion&gt;
      &lt;/Description&gt;
    &lt;/em:targetApplication&gt;
    
    &lt;!-- Front End MetaData --&gt;
    &lt;em:name&gt;New Theme 1&lt;/em:name&gt;
    &lt;em:description&gt;A test theme for Firefox&lt;/em:description&gt;
    &lt;em:creator&gt;Ben Goodger&lt;/em:creator&gt;
    &lt;em:contributor&gt;John Doe&lt;/em:contributor&gt;
    &lt;em:homepageURL&gt;<span class="plain">http://www.bengoodger.com/</span>&lt;/em:homepageURL&gt;

    &lt;!-- Front End Integration Hooks (used by Theme Manager)--&gt;
    &lt;em:internalName&gt;newtheme1&lt;/em:internalName&gt;
  &lt;/Description&gt;
&lt;/RDF&gt;
</pre>
<p>The following are some common target application GUIDs that you can use in your targetApplication properties:
</p>
<pre class="eval">Firefox      {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
Thunderbird  {3550f703-e582-4d05-9a08-453d09bdfdc6}
Sunbird      {718e30fb-e89b-41dd-9da7-e25a45638b28}
</pre>
<h3 name="Official_References_for_Toolkit_API"> Official References for <a href="en/Toolkit_API">Toolkit API</a> </h3>
<p>{{wiki.template(':en/Toolkit_API/Official_References')}}
</p>{{ wiki.languages( { "es": "es/Empaquetar_un_Tema", "fr": "fr/Empaqueter_un_th\u00e8me", "ja": "ja/Theme_Packaging", "pt": "pt/Compress\u00e3o_de_Temas" } ) }}
Revert to this revision