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

Added chrome-domain as a required property.
(Manifest file, first draft)
 
(Added chrome-domain as a required property.)
Line 18: Line 18:
Some properties are required, some are optional.<br>  
Some properties are required, some are optional.<br>  


Single value properties are defined using the paragraph tag (&lt;p&gt;), and multi-valued properties are defined using the ordered list tags (&lt;ol&gt;, &lt;li&gt;). The ''id'' attribute determines the property each value corresponds to, for single-valued properties. The ''class'' attribute is used for properties that can be repeated in the same manifest, like target applications.<br>
Single value properties are defined using the paragraph tag (&lt;p&gt;), and multi-valued properties are defined using the ordered list tags (&lt;ol&gt;, &lt;li&gt;). The ''id'' attribute determines the property each value corresponds to, for single-valued properties. The ''class'' attribute is used for properties that can be repeated in the same manifest, like target applications.<br>  


Property ordering is irrelevant. Any HTML content that doesn't correspond to properties in the spec will be ignored.<br>
Property ordering is irrelevant. Any HTML content that doesn't correspond to properties in the spec will be ignored.<br>  


== Required properties<br> ==
== Required properties<br> ==


Your manifest must specify these properties correctly otherwise your addon may not install.<br>
Your manifest must specify these properties correctly otherwise your addon may not install.<br>  


=== id<br> ===
=== id<br> ===


The add-on id, which is a:<br>
The add-on id, which is a:<br>  


*A string formatted like so: ''extensionname@organization.tld''. (Recommended)<br>
*A string formatted like so: ''extensionname@organization.tld''. (Recommended)<br>  
*A [https://developer.mozilla.org/en/Generating_GUIDs GUID].
*A [https://developer.mozilla.org/en/Generating_GUIDs GUID].


'''Example:'''<br>
'''Example:'''<br>  
<pre>&lt;p id="id"&gt;packaging-example@wiki.mozilla.org&lt;/p&gt;
<pre>&lt;p id="id"&gt;packaging-example@wiki.mozilla.org&lt;/p&gt;
</pre>
</pre>  
=== name<br> ===
=== name<br> ===


The name of the add-on; intended for display in the UI. It can be optionally localized as described below, but a default name should always be defined. The name cannot be empty.<br>
The name of the add-on; intended for display in the UI. It can be optionally localized as described below, but a default name should always be defined. The name cannot be empty.<br>  


'''Example:'''<br>
'''Example:'''<br>  
<pre>&lt;p id="name"&gt;Add-on Packaging Spec Example&lt;/p&gt;
<pre>&lt;p id="name"&gt;Add-on Packaging Spec Example&lt;/p&gt;
</pre>
</pre>  
=== version ===
=== version ===


A version string identifying the version of the addon being supplied. It must conform to the rules of the [https://developer.mozilla.org/en/Toolkit_version_format Toolkit version format].
A version string identifying the version of the addon being supplied. It must conform to the rules of the [https://developer.mozilla.org/en/Toolkit_version_format Toolkit version format].  


'''Example:'''<br>
'''Example:'''<br>  
<pre>&lt;p id="version"&gt;1.0&lt;/p&gt;
<pre>&lt;p id="version"&gt;1.0&lt;/p&gt;
</pre>
</pre>  
=== type<br> ===
=== type<br> ===


An integer value representing the type of add-on.<br>
An integer value representing the type of add-on.<br>  


*2 Extensions
*2 Extensions  
*4 Themes
*4 Themes  
*8 Locale
*8 Locale  
*32 [https://developer.mozilla.org/en/Multiple_Item_Packaging Multiple Item Package]<br>
*32 [https://developer.mozilla.org/en/Multiple_Item_Packaging Multiple Item Package]<br>
'''Example:'''<br>
<pre>&lt;p id="type"&gt;2&lt;/p&gt;
</pre>
=== chrome-domain<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="type"&gt;2&lt;/p&gt;
<pre>&lt;p id="chrome-domain"&gt;packagingspec&lt;/p&gt;
</pre>
</pre>
=== target-applications<br> ===
For the above example, the add-on would be registering itself for URLs starting with ''chrome://packagingspec'' and ''resource://packagingspec''.<br>
 
=== target-applications<br> ===


Specifies the applications targeted by this addon.<br>
Specifies the applications targeted by this addon.<br>  


The add-on will work with the application identified by the ''application-id'' property specified, from the minimum version ''min-version'' up to and including the maximum version ''max-version'' (for a comprehensive list of application IDs and valid min/max versions for them see [https://addons.mozilla.org/en-US/firefox/pages/appversions valid application versions]).<br>
The add-on will work with the application identified by the ''application-id'' property specified, from the minimum version ''min-version'' up to and including the maximum version ''max-version'' (for a comprehensive list of application IDs and valid min/max versions for them see [https://addons.mozilla.org/en-US/firefox/pages/appversions valid application versions]).<br>  


These version strings are formatted in the same fashion as the version property and will be compared to the application version; this allows the extension author to specify which versions of the application an add-on has been tested with.<br>
These version strings are formatted in the same fashion as the version property and will be compared to the application version; this allows the extension author to specify which versions of the application an add-on has been tested with.<br>  


The manifest must specify at least one target application.<br>
The manifest must specify at least one target application.<br>  


'''Example:'''<br>
'''Example:'''<br>  
<pre>&lt;ol id="target-applications"&gt;
<pre>&lt;ol id="target-applications"&gt;
   &lt;!-- Firefox. --&gt;
   &lt;!-- Firefox. --&gt;
Line 86: Line 95:
     &lt;p class="max-version"&gt;2.1.*&lt;/p&gt;
     &lt;p class="max-version"&gt;2.1.*&lt;/p&gt;
   &lt;/li&gt;       
   &lt;/li&gt;       
&lt;/ol&gt;</pre>
&lt;/ol&gt;</pre>  
Since it's possible to have multiple target applications, the properties are specified using ''class'' instead of ''id''.<br>
Since it's possible to have multiple target applications, the properties are specified using ''class'' instead of ''id''.<br>  


=== Example minimal manifest<br> ===
=== Example minimal manifest<br> ===


This is an example manifest that includes all required properties:<br>
This is an example manifest that includes all required properties:<br>  
<pre>&lt;?xml version="1.0"?&gt;
<pre>&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE html&gt;
&lt;!DOCTYPE html&gt;
Line 99: Line 108:
     &lt;p id="name"&gt;Add-on Packaging Spec Example&lt;/p&gt;
     &lt;p id="name"&gt;Add-on Packaging Spec Example&lt;/p&gt;
     &lt;p id="version"&gt;1.0&lt;/p&gt;
     &lt;p id="version"&gt;1.0&lt;/p&gt;
    &lt;p id="chrome-domain"&gt;packagingspec&lt;/p&gt;
     &lt;!-- Extension. --&gt;
     &lt;!-- Extension. --&gt;
     &lt;p id="type"&gt;2&lt;/p&gt;
     &lt;p id="type"&gt;2&lt;/p&gt;
Line 113: Line 123:
&lt;/html&gt;
&lt;/html&gt;


</pre>
</pre>  
== Optional properties<br> ==
== Optional properties<br> ==


(work in progress)<br>
(work in progress)<br>
canmove, Confirmed users
1,448

edits