User:Jorge.villalobos/AddonPackaging/Manifest: Difference between revisions

Jump to navigation Jump to search
Added optional chrome properties
(Added visualization section.)
(Added optional chrome properties)
Line 62: Line 62:
<pre>&lt;p id="type"&gt;2&lt;/p&gt;
<pre>&lt;p id="type"&gt;2&lt;/p&gt;
</pre>  
</pre>  
=== chrome-domain<br>  ===
=== chrome-domains<br>  ===


The chrome domain determines how chrome and resource URLs are resolved for the add-on.<br>  
The chrome domain determines how chrome and resource URLs are resolved for the add-on.<br>  


'''Example:'''<br>  
'''Example:'''<br>  
<pre>&lt;p id="chrome-domain"&gt;packagingspec&lt;/p&gt;
<pre>&lt;p id="chrome-domains"&gt;packagingspec&lt;/p&gt;
</pre>  
</pre>  
For the above example, the add-on would be registering itself for URLs starting with ''chrome://packagingspec'' and ''resource://packagingspec''.<br>  
For the above example, the add-on would be registering itself for URLs starting with ''chrome://packagingspec'' and ''resource://packagingspec''.<br>  
See the expanded version of chrome-domains below.<br>


=== target-applications<br>  ===
=== target-applications<br>  ===
Line 222: Line 224:
=== target-platforms  ===
=== target-platforms  ===


A string specifying a platform that the addon supports. It contains either the value of OS_TARGET alone or combined with TARGET_XPCOM_ABI, separated by an underscore (_). If any value matches the application's build parameters, it will be installed; if not, the user will get an appropriate error message.  
A set of strings specifying the platforms that the add-on supports. It contains either the value of OS_TARGET alone or combined with TARGET_XPCOM_ABI, separated by an underscore (_). If any value matches the application's build parameters, it will be installed; if not, the user will get an appropriate error message.  


There's more information in the [https://developer.mozilla.org/en/Install_Manifests#targetPlatform previous manifest format] documentation.  
There's more information in the [https://developer.mozilla.org/en/Install_Manifests#targetPlatform previous manifest format] documentation.  
Line 246: Line 248:
   &lt;/li&gt;
   &lt;/li&gt;
&lt;/ol&gt;</pre>  
&lt;/ol&gt;</pre>  
== Optional chrome properties<br> ==
=== overlays ===
A list of XUL overlays the add-on applies.<br>
'''Examples:'''
<pre>&lt;ol id="overlays"&gt;
  &lt;li&gt;
    &lt;p class="source"&gt;chrome://packagingspec/content/overlay.xul&lt;/p&gt;
    &lt;p class="target"&gt;chrome://browser/content/browser.xul&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;</pre><pre>&lt;ol id="overlays"&gt;
  &lt;li&gt;
    &lt;p class="source"&gt;chrome://packagingspec/content/overlay.xul&lt;/p&gt;
    &lt;p class="target"&gt;chrome://browser/content/browser.xul&lt;/p&gt;
    &lt;p class="flags"&gt;appversion&lt;=3.7 os=WINNT&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;
</pre>
See the [https://developer.mozilla.org/en/Chrome_Registration#Manifest_Flags manifest flags] section at MDC for more information on the supported flags. They can be applied to any c<br>
=== styles ===
A list of XUL style overlays the add-on applies.
'''Examples:'''
<pre>&lt;ol id="styles"&gt;
  &lt;li&gt;
    &lt;p class="source"&gt;chrome://packagingspec/skin/toolbar.css&lt;/p&gt;
    &lt;p class="target"&gt;chrome://global/content/customizeToolbar.xul&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;</pre>
=== overrides ===
A list of XUL window overrides the add-on applies.
'''Examples:'''<br>
<pre>&lt;ol id="overrides"&gt;
  &lt;li&gt;
    &lt;p class="source"&gt;chrome://packagingspec/content/newCustomizeToolbar.xul&lt;/p&gt;
    &lt;p class="target"&gt;chrome://global/content/customizeToolbar.xul&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;</pre>
=== chrome-domains (Expanded)<br> ===
An expanded version of chrome-domain (ADD&nbsp;LINK), that can include multiple domains, as well as specific locations for content, skin, locale and resource packages.<br>
'''Examples:'''<br>
<pre>&lt;ol id="chrome-domains"&gt;
  &lt;li&gt;
    &lt;p class="domain"&gt;packagingspec&lt;/p&gt;
    &lt;ol class="content"&gt;
      &lt;li&gt;
        &lt;p class="location"&gt;chrome/packagingspec/content/&lt;/p&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
    &lt;ol class="skin"&gt;
      &lt;li&gt;
        &lt;p class="location"&gt;chrome/packagingspec/skin/&lt;/p&gt;
        &lt;p class="skin-name"&gt;classic/1.0&lt;/p&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
    &lt;ol class="locale"&gt;
      &lt;li&gt;
        &lt;p class="location"&gt;chrome/packagingspec/locale/en-US/&lt;/p&gt;
        &lt;p class="locale-name"&gt;en-US&lt;/p&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
    &lt;ol class="resources"&gt;
      &lt;li&gt;
        &lt;p class="location"&gt;modules/&lt;/p&gt;
        &lt;!-- &lt;p class="disabled"&gt;true&lt;/p&gt; --&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
&lt;/ol&gt;
</pre>
The ''disabled'' property for ''resources'' is necessary for add-ons that don't want to publish their presence to websites. It can be included without having to specify a location for resource files. If ''content'', ''skin'' or ''locale'' are included, ''location'' is required, and ''locale-name'' is also required for ''locale'' items. The ''skin-name'' property is optional.<br>
= Visualizing manifests  =
= Visualizing manifests  =


Line 252: Line 334:
   &lt;link rel="stylesheet" type="text/css" href="manifest.css" /&gt;
   &lt;link rel="stylesheet" type="text/css" href="manifest.css" /&gt;
&lt;/head&gt;
&lt;/head&gt;
</pre>
</pre>  
Here's an example of what can be done with some CSS: [http://xulforge.com/addonpackaging/manifest.html Styled Manifest]. Perhaps there should be an official stylesheet in a known location, to facilitate developer work.<br>
Here's an example of what can be done with some CSS: [http://xulforge.com/addonpackaging/manifest.html Styled Manifest]. Perhaps there should be an official stylesheet in a known location, to facilitate developer work.<br>  


More can be done by adding HTML nodes to the document, which will be ignored during parsing and can help make the document more human-readable. However, this practice is discouraged because it can add too much unnecessary information to the manifest.
More can be done by adding HTML nodes to the document, which will be ignored during parsing and can help make the document more human-readable. However, this practice is discouraged because it can add too much unnecessary information to the manifest.
canmove, Confirmed users
1,448

edits

Navigation menu