安装清单

  • 版本网址缩略名: Install_Manifests-840092-dup
  • 版本标题: 安装清单
  • 版本 id: 356803
  • 创建于:
  • 创建者: ethertank
  • 是否是当前版本?
  • 评论 -Error.Moved From en/Install_Manifests to Install_Manifests-840092-dup

修订内容

简介

安装清单是一个附加文件,具有Add-on的XUL程序(例如火狐或者雷鸟),用这个文件来确定即将要安装的add-on的安装信息。他包含了add-on的元数据验证、创建者信息、add-on的详细介绍页面地址、版本号、如何更新、兼容性、等等。

安装清单的格式是 RDF/XML.

这个文件名字必须为 install.rdf 并且必须放在 XPI 文件的根目录。

结构

安装清单的最基本结构如下:

<?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">
    <!-- properties -->
  </Description>
</RDF>

有些属性是是必须的,有些是可选的。有些属性只是简单的字符串啥啥啥的,有些属性会很复杂。

必要的属性

你的清单必须要包含下面的这些属性,不听话的话,你的add-on是不会安装成功滴。

id

id是一个这样子的东东:

  • GUID (Firefox 1.0)
  • {{ Fx_minversion_inline(1.5) }}是一个这样结构的字符串:
extensionname@example.org

后面的这个格式更容易生成和操作。火狐1.5已经检测你的id,确保它是属于第一种格式还是其他格式,并且让那些id格式乱七八糟的add-on不会被安装。

例如:

<em:id>extensionname@example.org</em:id>

<em:id>{daf44bf7-a45e-4450-979c-91cf07434c3d}</em:id>

版本

一个标志当前add-on版本的字符串。

对于火狐/雷鸟1.0来说,这个格式必须满足这里所说的要求: Extension Versioning, Update and Compatibility. 对于火狐/雷鸟1.5, 看这里:Toolkit version format.

示例:

<em:version>2.0</em:version>

<em:version>1.0.2</em:version>

<em:version>0.4.1.2005090112</em:version>

Firefox 1.5 / XULRunner 1.8 - add-ons that do not use a valid version format will not be installed. The version format is different from, although backwards-compatible with, 1.0's.

For addons hosted on addons.mozilla.org - Mozilla's update website may repackage your add-on and correct or reject malformed version strings.

类型

一个整数代表add-on的类型

2 扩展
4 主题
8 地区(译者注:多语言)
32 多个物品包
64 拼写检测字典

例如:

<em:type>2</em:type>

{{ Fx_minversion_inline(1.5) }} This property was added for Firefox 1.5, and is only required for add-on types other than Extensions and Themes.

{{ Fx_minversion_inline(3) }} Firefox 2 and previous supported a value of 16 to represent plug-ins. In Firefox 3 this has been removed.

targetApplication

An object specifying an application targeted by this add-on. This means that the add-on will work with the application identified by the id property (<em:id>) specified (for a comprehensive list of application IDs and valid min/maxVersions for them see Valid application versions for add-on developers), from the minimum version (<em:minVersion>) up to and including the maximum version (<em:maxVersion>). 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 Firefox an extension has been tested with.

id, minVersion, and maxVersion are all required.

Extensions compatible with Firefox 3.5 should specify a maxVersion of 3.5.*, so that they are automatically compatible with security and stability updates. For Firefox 3.0, a maxVersion of 3.0.* should be used. Extensions compatible only with Firefox or Thunderbird 2 should specify a maxVersion of 2.0.0.*.

The Install Manifest must specify at least one of these objects, and may specify more if the add-on targets multiple applications that support the Add-on Manager (e.g. Firefox and Thunderbird)

Examples

<em:targetApplication>
 <Description>
  <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!--Firefox-->
  <em:minVersion>1.5</em:minVersion>
  <em:maxVersion>3.0.*</em:maxVersion>
 </Description>
</em:targetApplication>

{{ Fx_minversion_inline(3) }} Gecko 1.9 based applications allow you to use the special targetApplication id toolkit@mozilla.org to say that the add-on is compatible with any toolkit app with a toolkit version matching the minVersion and maxVersion.

name

The name of the add-on; intended for display in the UI.

Examples

<em:name>My Extension</em:name>

Optional Property Reference

You may need to supply these properties, depending on the capabilities of your add-on.

bootstrap

{{ Fx_minversion_inline(4) }} A Boolean value that tells the application whether the extension is boot-strappable. At the moment this only works for add-ons with em:type="2". The default value is false. For more information, see Bootstrapped extensions.

unpack

{{ Fx_minversion_inline(4) }} A true or false value that tells the application whether the extension requires its files be unpacked into a directory in order to work or whether the extension can be loaded direct from the XPI. In versions before Gecko 2.0 all extensions were unpacked, in Gecko 2.0 and later the default is to not unpack. If an extension includes the following then it must request unpacking:

Examples

<Description about="urn:mozilla:install-manifest">
   <em:id>extension@mysite.com</em:id>
   <em:unpack>true</em:unpack>
   ...
</Description>

localized

{{ Fx_minversion_inline(3) }} Allows you to localize the add-on's name, description, contributors and other metadata. The localized description must specify at least one em:locale which indicates which locales to use this information for.

Examples

This declares a set of add-on metadata to be displayed when the application is running in the de-DE locale.

<em:localized>
  <Description>
    <em:locale>de-DE</em:locale>
    <em:name>Tab Sidebar</em:name>
    <em:description>Zeigt in einer Sidebar Vorschaubilder der Inhalte aller offenen Tabs an.</em:description>
  </Description>
</em:localized>

The following properties which are described elsewhere in this page can be included in the localized property:

  • name
  • description
  • creator
  • homepageURL
  • developer
  • translator
  • contributor

More documentation can be found at Localizing extension descriptions.

description

A short description of the add-on - intended for display in the user interface. This description should fit on one short line of text.

Examples

<em:description>Advanced foo tools.</em:description>

creator

The name of the creator/principal developer - intended for display in the user interface.

Examples

<em:creator>John Doe</em:creator>

or

<em:creator>CoolExtension Team</em:creator>

developer

{{ Fx_minversion_inline(2) }} The name(s) of co-developers. You may specify more than one of this value to specify multiple developers.

Examples

<em:developer>Jane Doe</em:developer>
<em:developer>Koos van der Merwe</em:developer>

translator

{{ Fx_minversion_inline(2) }} The name(s) of translators. You may specify more than one of this value to specify multiple translators.

Examples

<em:translator>Janez Novak</em:translator>
<em:translator>Kari Nordmann</em:translator>

contributor

The name(s) of additional contributors. You may specify more than one of this value to specify multiple contributors.

Examples

<em:contributor>John Doe</em:contributor>

<em:contributor>John Doe</em:contributor>
<em:contributor>Jane Doe</em:contributor>
<em:contributor>Elvis Presley</em:contributor>

homepageURL

A link to the add-on's home page - intended for display in the user interface.

Examples

<em:homepageURL>http://www.foo.com/</em:homepageURL>

updateURL

A link to a custom Update Manifest file that specifies available updates to the add-on. The format is described below. If enabled, the add-on manager periodically checks with this Manifest file to determine if newer versions are available.

Note: It is strongly recommended that the updateURL be an HTTPS (secure) link. Non-secure update URLs can be hijacked by a malicious update.rdf file, enabling malware to infiltrate the user's computer. Alternatively, you could host your extension on AMO and leave out the updateURL completely. This provides secure updates automatically.

{{ Fx_minversion_inline(3) }} For security reasons, Gecko 1.9 applications require that if you specify an updateURL, it must be an https URL, or you must include an updateKey.

Your server must send this file as text/rdf, text/xml or application/xml+rdf or the update checker may not work.

The addon manager will substitute the following values into this URL in case you wish to generate the response RDF dynamically, such as using PHP or CGI:

%REQ_VERSION% The version of the request. Currently 1
%ITEM_ID% The id of the addon being updated
%ITEM_VERSION% The version of the addon being updated
%ITEM_MAXAPPVERSION% The maxVersion of the targetApplication object corresponding to the current application for the addon being updated.
%ITEM_STATUS% {{ Fx_minversion_inline(2) }} Comma separated list of the add-ons operating status in the application. Contains at the least either userEnabled or userDisabled plus any number of incompatible, blockslisted or needsDependencies.
%APP_ID% The id of the current application
%APP_VERSION% The version of the application to check for updates for
%CURRENT_APP_VERSION% {{ Fx_minversion_inline(3.5) }} The version of the current application
%APP_OS% {{ Fx_minversion_inline(1.5) }} The value of OS_TARGET from the Firefox build system, identifying the operating system being used.
%APP_ABI% {{ Fx_minversion_inline(1.5) }} The value of the TARGET_XPCOM_ABI value from the Firefox build system, identifying the compiler/architecture combination used to compile the current application.
%APP_LOCALE% {{ Fx_minversion_inline(3) }} The current application's locale.
%UPDATE_TYPE% {{ Fx_minversion_inline(4) }} UPDATE_TYPE_COMPATIBILITY(32), UPDATE_TYPE_NEWVERSION(64)
%COMPATIBILITY_MODE% {{ Fx_minversion_inline(10) }} related to default to compatible, values could be normal, ignore or strict.

Examples

<em:updateURL>http://www.foo.com/update.cgi?id=%ITEM_ID%&amp;version=%ITEM_VERSION%</em:updateURL>
<em:updateURL>http://www.foo.com/extension/windows.rdf</em:updateURL>

For add-ons hosted on addons.mozilla.org: You may not specify an updateURL property. By default, Mozilla applications using the Add-on Manager (such as Firefox and Thunderbird) will send update requests to addons.mozilla.org using the default web service. Every time you upload a new version of your add-on or change its compatibility parameters through the author interface, your update manifest will be generated automatically. Add-ons currently marked as experimental will not be updated due to security concerns.

Format of the Update Manifest: The Update Manifest is a RDF/XML datasource. For examples of an update manifest, see Extension Versioning, Update and Compatibility and Enabling Extension Updates (external).

updateKey

{{ Gecko_minversion_header(1.9) }} {{ Fx_minversion_header(3) }}

To ensure the security of update rdf data that is retrieved over plain http you must use a digital signature to verify the contents of the data. In order to do so you must include the public part of the cryptographic key in an updateKey entry in the install.rdf of the add-on. This can be generated using the McCoy tool. Any line breaks and whitespace as part of this entry are ignored.

<em:updateKey>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDK426erD/H3XtsjvaB5+PJqbhj
              Zc9EDI5OCJS8R3FIObJ9ZHJK1TXeaE7JWqt9WUmBWTEFvwS+FI9vWu8058N9CHhD
              NyeP6i4LuUYjTURnn7Yw/IgzyIJ2oKsYa32RuxAyteqAWqPT/J63wBixIeCxmysf
              awB/zH4KaPiY3vnrzQIDAQAB</em:updateKey>

optionsURL

The chrome:// URL of the extension's options dialog box. This is only useful to extensions. If this property is specified, when the extension is selected in the Extensions list, the Options button is enabled and will show this.

<em:optionsURL>chrome://myext/content/options.xul</em:optionsURL>

{{ gecko_minversion_note("7", "In Firefox 7 you can also simply include your options XUL as a file named options.xul, in the base directory of the add-on.") }}

{{ h3_gecko_minversion("optionsType", 7) }}

The type of user-interface used for displaying the options. Accepted values are:

1 Opens optionsURL in a dialog box
2 Options are displayed inside the Add-on Manager
3 Opens optionsURL in a new tab (if the application supports that), or a dialog box

optionsType defaults to 1 if there is an optionsURL included in install.rdf or 2 if there is no optionsURL and the file options.xul exists in the root of the add-on.

<em:optionsType>2</em:optionsType>

aboutURL

The chrome:// URL of the extension's about dialog box. This is only useful to extensions. If this property is specified, when the extension is selected in the Extensions list, the About... link in the extension's context menu will show this dialog, rather than the default.

{{ gecko_callout_heading("2.0") }}

The dialog receives the Addon object representing your add-on as a parameter.

Examples

<em:aboutURL>chrome://myext/content/about.xul</em:aboutURL>

iconURL

A chrome:// URL to an icon to display in the add-ons list. The icon will be displayed at 32x32 in Firefox 3.6 and lower. In Firefox 4.0 and later the icon can be up to 48x48 pixels in size. If this property is not specified, a default icon is used.

<em:iconURL>chrome://myext/skin/icon.png</em:iconURL>
Note: For the above example to work you will also have to add a skin package line to your chrome.manifest file. See Chrome Registration#skin. Alternatively you can place your icon in the directory specified in your content package line.

{{ gecko_minversion_note("1.9.2", "Starting in Gecko 1.9.2 (Firefox 3.6), you can also simply include your icon, named icon.png, in the base directory of the add-on. This allows your add-on's icon to be displayed even when the add-on is disabled, or if the manifest is missing an iconURL entry.") }}

{{ h3_gecko_minversion("icon64URL", "2.0") }}

A chrome:// URL to a 64x64 pixel icon to display in the add-on's details view . If this property is not specified, the smaller icon above will be used.

<em:icon64URL>chrome://myext/skin/icon64.png</em:icon64URL>
Note: For the above example to work you will also have to add a skin package line to your chrome.manifest file. See Chrome Registration#skin. Alternatively you can place your icon in the directory specified in your content package line.

{{ h3_gecko_minversion("targetPlatform", "1.8") }}

A string specifying a platform that the add-on supports. It contains either the value of OS_TARGET alone or combined with TARGET_XPCOM_ABI, separated by an underscore (_).

You can specify multiple targetPlatform properties per manifest. If any value matches the application's build parameters, it will be installed; if not, the user will get an appropriate error message.

Examples

<em:targetPlatform>WINNT_x86-msvc</em:targetPlatform>

<em:targetPlatform>Linux</em:targetPlatform>

<em:targetPlatform>Darwin_ppc-gcc3</em:targetPlatform>

<em:targetPlatform>SunOS_sparc-sunc</em:targetPlatform>

Usually, you would use only the OS part for themes or for extensions that are not fully cross-platform. For extensions including binary (compiled) components, you should never use the OS alone, but include the ABI (s) that you compiled the components with. If you want to include multiple versions of the components, you should also use Platform-specific Subdirectories.

Notes

  • In the same manifest file, you could even mix values with and without ABI. If a value for the application's OS is encountered that requires any specific ABI, the ABI is considered important for that OS and the application will refuse to install the add-on if it does not find a matching OS/ABI combination. This means that if all of the above examples would occur in one manifest, the add-on will install on any Linux build of the application, regardless of its ABI, but not on a Windows Cygwin build.
  • There may be builds of Firefox and Thunderbird which do not "know" their ABI (most likely ports to rare platforms, or non-official builds). These builds will refuse to install any addon that requires a specific ABI for their platform.

This property was added for Firefox/Thunderbird 1.5. Previous versions of these applications will ignore the restrictions and install the add-on regardless of the platform.

{{ h3_gecko_minversion("strictCompatibility", "10.0") }}

A Boolean value indicating if the add-on should be enabled when the version of the application is greater than its max version. By default, the value of this property is false meaning that the compatibility checking will not be performed against the max version.

<em:strictCompatibility>true</em:strictCompatibility>

Usually, there is no need to restrict the compatibility: not all new releases will break your extension and, if it is hosted on AMO, you'll get notice several weeks in advance if a potential risk has been detected. Moreover, an extension being disabled, even for a short period, leads to a bad experience for the user. About the only time you should need to set this if your add-on does things that are likely to be broken by Firefox updates. You do not need to set this flag if your add-on has a binary component, since add-ons with binary components are always subject to strict compatibility checking (because binary components need to be rebuilt for every major application release anyway).

Note: If you want to restore the old behavior of strict compatibility checking of all add-ons, regardless of the value of this setting in their manifests, you can set the extensions.strictCompatibility preference to true.

{{ gecko_callout_heading("11.0") }}

Starting in Gecko 11.0 {{ geckoRelease("11.0") }}, applications such as Firefox will assume add-ons that have not been updated in a very long time are no longer compatible by default.

Obsolete Property Reference

These properties were required in older versions of the Add-on Manager, but have been replaced with newer and better mechanisms.

file

Firefox 1.0 This property pointed to a chrome .jar file that contains chrome packages that require registration with the Chrome Registry.

The <em:file> property has a complex object value. The uri of the value is urn:mozilla:extension:file:jarFile.jar where jarFile.jar is the name of the jar file that contains the chrome package's files. This could also be the name of a directory that contains the chrome package's files, un-jarred (e.g. urn:mozilla:extension:file:directory). In either case, the referenced chrome package file(s) must be placed in the chrome subdirectory of the XPI's top level.

This object has a package property (with a path within the jar file or directory that leads to the location where the contents.rdf file responsible for registering that package is located), a locale property (ditto, but to register the locale) and a skin property (ditto, but to register the theme material).

In extensions for Firefox 1.5, this property is no longer necessary: the chrome.manifest at the top level of the XPI is used to locate chrome to register. If there is no chrome.manifest, this property is still read by the Add-on Manager and a chrome.manifest is generated from old-style contents.rdf.

Examples

<em:file>
 <Description about="urn:mozilla:extension:file:myext.jar">
  <em:package>content/myext/</em:package>
  <em:locale>locale/en-US/myext/</em:locale>
  <em:skin>skin/classic/myext/<em:skin>
 </Description>
</em:file>

An Install Manifest may specify multiple file properties, one for each jar file or subdirectory that contains chrome to register.

hidden

Firefox 1.0 - 3.5 A boolean value that when true makes the add-on not show up in the add-ons list, provided the add-on is installed in a {{ Anch("restricted access area") }} (so it does not work for add-ons installed in the profile). This is for bundling integration hooks to larger applications where having an entry in the Extensions list does not make sense.

Note: This property is no longer supported under Gecko 1.9.2 (Firefox 3.6) or later, to prevent extensions from being installed in such a way that the user might not be able to tell they're installed.

Examples

<em:hidden>true</em:hidden>

requires

Firefox 2.0 - 3.6.x. Other versions will ignore the restrictions and install the add-on regardless of the requirements.

See Replacement for install.rdf property "requires" discussion for rationale behind removing this feature and the suggested workaround.

<em:requires> has a similar syntax to the <em:targetApplication> tag (i.e. you must specify <em:id>, <em:minVersion>, <em:maxVersion> when using it). If the add-on specified by the <em:id> tag is not installed or has an incompatible version, the extension manager will disable your extension and show the message "Requires additional items". You can add as many <em:requires> tags as you like. Your extension will be disabled if any of the specified requirements fail. It is not possible to add dependencies that are specific to a <em:targetApplication>. See Extension Dependencies for more details.

Glossary

restricted access area

A restricted access area is an install location that could be restricted on a restricted-access account, regardless of whether or not the location is restricted with the current user privileges (see {{ Source("toolkit/mozapps/extensions/public/nsIExtensionManager.idl#80", "nsIInstallLocation::restricted") }}). Currently, the ($APPDIR)/extensions folder and the registry install location under HKEY_LOCAL_MACHINE (see Adding Extensions using the Windows Registry for details) are restricted.

The ($PROFILE)/extensions and HKEY_CURRENT_USER install locations, on the other hand, are not restricted.

修订版来源

<h2 id=".E7.AE.80.E4.BB.8B">简介</h2>
<p>安装清单是一个附加文件,具有Add-on的XUL程序(例如火狐或者雷鸟),用这个文件来确定即将要安装的add-on的安装信息。他包含了add-on的元数据验证、创建者信息、add-on的详细介绍页面地址、版本号、如何更新、兼容性、等等。</p>
<p>安装清单的格式是 RDF/XML.</p>
<p>这个文件名字必须为 <code>install.rdf</code> 并且必须放在 XPI 文件的根目录。</p>
<h2 id=".E7.BB.93.E6.9E.84">结构</h2>
<p>安装清单的最基本结构如下:</p>
<div style="overflow:hidden">
  <pre class="brush:xml;auto-links:false">
&lt;?xml version="1.0"?&gt;

&lt;RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#"&gt;
  &lt;Description about="urn:mozilla:install-manifest"&gt;
    &lt;!-- properties --&gt;
  &lt;/Description&gt;
&lt;/RDF&gt;
</pre>
</div>
<p>有些属性是是必须的,有些是可选的。有些属性只是简单的字符串啥啥啥的,有些属性会很复杂。</p>
<h2 id=".E5.BF.85.E8.A6.81.E7.9A.84.E5.B1.9E.E6.80.A7">必要的属性</h2>
<p>你的清单必须要包含下面的这些属性,不听话的话,你的add-on是不会安装成功滴。</p>
<h3 id="id">id</h3>
<p>id是一个这样子的东东:</p>
<ul>
  <li><a href="/en-US/docs/Generating_GUIDs" title="Generating_GUIDs">GUID</a> (Firefox 1.0)</li>
  <li>{{ Fx_minversion_inline(1.5) }}是一个这样结构的字符串:</li>
</ul>
<pre>
<code class="plain">extensionname@example.org</code></pre>
<p>后面的这个格式更容易生成和操作。火狐1.5已经检测你的id,确保它是属于第一种格式还是其他格式,并且让那些id格式乱七八糟的add-on不会被安装。</p>
<p>例如:</p>
<pre class="brush:xml;auto-links:false">
&lt;em:id&gt;extensionname@example.org&lt;/em:id&gt;

&lt;em:id&gt;{daf44bf7-a45e-4450-979c-91cf07434c3d}&lt;/em:id&gt;</pre>
<h3 id=".E7.89.88.E6.9C.AC">版本</h3>
<p>一个标志当前add-on版本的字符串。</p>
<p>对于火狐/雷鸟1.0来说,这个格式必须满足这里所说的要求: <a href="/en-US/docs/Extension_Versioning,_Update_and_Compatibility" title="Extension_Versioning,_Update_and_Compatibility">Extension Versioning, Update and Compatibility</a>. 对于火狐/雷鸟1.5, 看这里:<a href="/en-US/docs/Toolkit_version_format" title="Toolkit_version_format">Toolkit version format</a>.</p>
<p>示例:</p>
<pre class="brush:xml">
&lt;em:version&gt;2.0&lt;/em:version&gt;

&lt;em:version&gt;1.0.2&lt;/em:version&gt;

&lt;em:version&gt;0.4.1.2005090112&lt;/em:version&gt;</pre>
<p><strong>Firefox 1.5 / XULRunner 1.8</strong> - add-ons that do not use a valid version format will not be installed. The version format is different from, although backwards-compatible with, 1.0's.</p>
<p><strong>For addons hosted on addons.mozilla.org</strong> - Mozilla's update website may repackage your add-on and correct or reject malformed version strings.</p>
<h3 id=".E7.B1.BB.E5.9E.8B">类型</h3>
<p>一个整数代表add-on的类型</p>
<table>
  <tbody>
    <tr>
      <td>2</td>
      <td>扩展</td>
    </tr>
    <tr>
      <td>4</td>
      <td>主题</td>
    </tr>
    <tr>
      <td>8</td>
      <td>地区(译者注:多语言)</td>
    </tr>
    <tr>
      <td>32</td>
      <td><a href="/en-US/docs/Multiple_Item_Packaging" title="Multiple_Item_Packaging">多个物品包</a></td>
    </tr>
    <tr>
      <td>64</td>
      <td>拼写检测字典</td>
    </tr>
  </tbody>
</table>
<p>例如:</p>
<pre class="brush:xml">
&lt;em:type&gt;2&lt;/em:type&gt;</pre>
<p>{{ Fx_minversion_inline(1.5) }} This property was added for Firefox 1.5, and is only required for add-on types other than Extensions and Themes.</p>
<p>{{ Fx_minversion_inline(3) }} Firefox 2 and previous supported a value of 16 to represent plug-ins. In Firefox 3 this has been removed.</p>
<h3 id="targetApplication">targetApplication</h3>
<p>An object specifying an application targeted by this add-on. This means that the add-on will work with the application identified by the id property (<code>&lt;em:id&gt;</code>) specified (for a comprehensive list of application IDs and valid min/maxVersions for them see <a class="link-https" href="https://addons.mozilla.org/en-US/firefox/pages/appversions">Valid application versions for add-on developers</a>), from the minimum version (<code>&lt;em:minVersion&gt;</code>) up to and including the maximum version (<code>&lt;em:maxVersion&gt;</code>). These version strings are formatted in the same fashion as the <a href="#version"><code>version</code> property</a> and will be compared to the application version; this allows the extension author to specify which versions of Firefox an extension has been tested with.</p>
<p><code>id</code>, <code>minVersion</code>, and <code>maxVersion</code> are all required.</p>
<div class="note">
  Extensions compatible with Firefox 3.5 should specify a <code>maxVersion</code> of<code> 3.5.*</code>, so that they are automatically compatible with security and stability updates. For Firefox 3.0, a <code>maxVersion</code> of<code> 3.0.*</code> should be used. Extensions compatible only with Firefox or Thunderbird 2 should specify a <code>maxVersion</code> of <code>2.0.0.*</code>.</div>
<p>The Install Manifest must specify at least one of these objects, and may specify more if the add-on targets multiple applications that support the Add-on Manager (e.g. Firefox and Thunderbird)</p>
<p><strong>Examples</strong></p>
<pre class="brush:xml">
&lt;em:targetApplication&gt;
 &lt;Description&gt;
  &lt;em:id&gt;{ec8030f7-c20a-464f-9b0e-13a3a9e97384}&lt;/em:id&gt; &lt;!--Firefox--&gt;
  &lt;em:minVersion&gt;1.5&lt;/em:minVersion&gt;
  &lt;em:maxVersion&gt;3.0.*&lt;/em:maxVersion&gt;
 &lt;/Description&gt;
&lt;/em:targetApplication&gt;</pre>
<p>{{ Fx_minversion_inline(3) }} Gecko 1.9 based applications allow you to use the special <code>targetApplication </code>id <code class="plain">toolkit@mozilla.org</code> to say that the add-on is compatible with any toolkit app with a toolkit version matching the <code>minVersion</code> and <code>maxVersion</code>.</p>
<h3 id="name">name</h3>
<p>The name of the add-on; intended for display in the UI.</p>
<p><strong>Examples </strong></p>
<pre class="brush:xml">
&lt;em:name&gt;My Extension&lt;/em:name&gt;</pre>
<h2 id="Optional_Property_Reference">Optional Property Reference</h2>
<p>You may need to supply these properties, depending on the capabilities of your add-on.</p>
<h3 id="bootstrap">bootstrap</h3>
<p>{{ Fx_minversion_inline(4) }} A Boolean value that tells the application whether the extension is boot-strappable. At the moment this only works for add-ons with em:type="2". The default value is <code>false</code>. For more information, see <a href="/en-US/docs/Extensions/Bootstrapped_extensions" title="Extensions/Bootstrapped extensions">Bootstrapped extensions</a>.</p>
<h3 id="unpack">unpack</h3>
<p>{{ Fx_minversion_inline(4) }} A true or false value that tells the application whether the extension requires its files be unpacked into a directory in order to work or whether the extension can be loaded direct from the XPI. In versions before Gecko 2.0 all extensions were unpacked, in Gecko 2.0 and later the default is to not unpack. If an extension includes the following then it must request unpacking:</p>
<ul>
  <li>Binary <a href="/en-US/docs/XPCOM" title="XPCOM">XPCOM</a> components</li>
  <li><a href="/en-US/docs/Shipping_a_plugin_as_a_Toolkit_bundle" title="Shipping a plugin as a Toolkit bundle">Plugins</a></li>
  <li><a href="/en-US/docs/Creating_MozSearch_plugins" title="Creating MozSearch plugins">Search plugins</a></li>
  <li>DLLs loaded with <a href="/en-US/docs/Mozilla/js-ctypes" title="js-ctypes">ctypes</a></li>
  <li>Dictionaries</li>
  <li>Window icons</li>
</ul>
<p><strong>Examples</strong></p>
<pre class="brush:xml">
&lt;Description about="urn:mozilla:install-manifest"&gt;
   &lt;em:id&gt;extension@mysite.com&lt;/em:id&gt;
   &lt;em:unpack&gt;true&lt;/em:unpack&gt;
   ...
&lt;/Description&gt;</pre>
<h3 id="localized">localized</h3>
<p>{{ Fx_minversion_inline(3) }} Allows you to localize the add-on's name, description, contributors and other metadata. The localized description must specify at least one <code>em:locale</code> which indicates which locales to use this information for.</p>
<p><strong>Examples</strong></p>
<p>This declares a set of add-on metadata to be displayed when the application is running in the de-DE locale.</p>
<pre class="brush:xml">
&lt;em:localized&gt;
  &lt;Description&gt;
    &lt;em:locale&gt;de-DE&lt;/em:locale&gt;
    &lt;em:name&gt;Tab Sidebar&lt;/em:name&gt;
    &lt;em:description&gt;Zeigt in einer Sidebar Vorschaubilder der Inhalte aller offenen Tabs an.&lt;/em:description&gt;
  &lt;/Description&gt;
&lt;/em:localized&gt;</pre>
<p>The following properties which are described elsewhere in this page can be included in the localized property:</p>
<ul>
  <li>name</li>
  <li>description</li>
  <li>creator</li>
  <li>homepageURL</li>
  <li>developer</li>
  <li>translator</li>
  <li>contributor</li>
</ul>
<p>More documentation can be found at <a href="/en-US/docs/Localizing_extension_descriptions" title="Localizing_extension_descriptions">Localizing extension descriptions</a>.</p>
<h3 id="description">description</h3>
<p>A short description of the add-on - intended for display in the user interface. This description should fit on one short line of text.</p>
<p><strong>Examples</strong></p>
<pre class="brush:xml">
&lt;em:description&gt;Advanced foo tools.&lt;/em:description&gt;</pre>
<h3 id="creator">creator</h3>
<p>The name of the creator/principal developer - intended for display in the user interface.</p>
<p><strong>Examples</strong></p>
<pre class="brush:xml">
&lt;em:creator&gt;John Doe&lt;/em:creator&gt;</pre>
<p>or</p>
<pre class="brush:xml">
&lt;em:creator&gt;CoolExtension Team&lt;/em:creator&gt;</pre>
<h3 id="developer">developer</h3>
<p>{{ Fx_minversion_inline(2) }} The name(s) of co-developers. You may specify more than one of this value to specify multiple developers.</p>
<p><strong>Examples</strong></p>
<pre class="brush:xml">
&lt;em:developer&gt;Jane Doe&lt;/em:developer&gt;
&lt;em:developer&gt;Koos van der Merwe&lt;/em:developer&gt;
</pre>
<h3 id="translator">translator</h3>
<p>{{ Fx_minversion_inline(2) }} The name(s) of translators. You may specify more than one of this value to specify multiple translators.</p>
<p><strong>Examples</strong></p>
<pre class="brush:xml">
&lt;em:translator&gt;Janez Novak&lt;/em:translator&gt;
&lt;em:translator&gt;Kari Nordmann&lt;/em:translator&gt;
</pre>
<h3 id="contributor">contributor</h3>
<p>The name(s) of additional contributors. You may specify more than one of this value to specify multiple contributors.</p>
<p><strong>Examples</strong></p>
<pre class="brush:xml">
&lt;em:contributor&gt;John Doe&lt;/em:contributor&gt;

&lt;em:contributor&gt;John Doe&lt;/em:contributor&gt;
&lt;em:contributor&gt;Jane Doe&lt;/em:contributor&gt;
&lt;em:contributor&gt;Elvis Presley&lt;/em:contributor&gt;
</pre>
<h3 id="homepageURL">homepageURL</h3>
<p>A link to the add-on's home page - intended for display in the user interface.</p>
<p><strong>Examples</strong></p>
<pre class="brush:xml;auto-links:false">
&lt;em:homepageURL&gt;http://www.foo.com/&lt;/em:homepageURL&gt;
</pre>
<h3 id="updateURL">updateURL</h3>
<p>A link to a custom Update Manifest file that specifies available updates to the add-on. The format is described below. If enabled, the add-on manager periodically checks with this Manifest file to determine if newer versions are available.</p>
<div class="note">
  <strong>Note:</strong> It is strongly recommended that the <code>updateURL</code> be an HTTPS (secure) link. Non-secure update URLs can be hijacked by a malicious <code>update.rdf</code> file, enabling malware to infiltrate the user's computer. <strong>Alternatively, you could host your extension on </strong><a class="external" href="http://addons.mozilla.org"><strong>AMO</strong></a><strong> and leave out the <code>updateURL</code> completely.</strong> This provides secure updates automatically.</div>
<p>{{ Fx_minversion_inline(3) }} For security reasons, Gecko 1.9 applications <strong>require</strong> that if you specify an <code>updateURL</code>, it must be an https URL, or you must include an <code><a href="#updateKey">updateKey</a></code>.</p>
<p>Your server must send this file as <code>text/rdf</code>, <code>text/xml</code> or <code>application/xml+rdf</code> or the update checker may not work.</p>
<p>The addon manager will substitute the following values into this URL in case you wish to generate the response RDF dynamically, such as using PHP or CGI:</p>
<table border="1" cellpadding="3" cellspacing="2">
  <tbody>
    <tr>
      <td><code>%REQ_VERSION%</code></td>
      <td>The version of the request. Currently 1</td>
    </tr>
    <tr>
      <td><code>%ITEM_ID%</code></td>
      <td>The <code>id</code> of the addon being updated</td>
    </tr>
    <tr>
      <td><code>%ITEM_VERSION%</code></td>
      <td>The <code>version</code> of the addon being updated</td>
    </tr>
    <tr>
      <td><code>%ITEM_MAXAPPVERSION%</code></td>
      <td>The <code>maxVersion</code> of the <code>targetApplication</code> object corresponding to the current application for the addon being updated.</td>
    </tr>
    <tr>
      <td><code>%ITEM_STATUS%</code></td>
      <td>{{ Fx_minversion_inline(2) }} Comma separated list of the add-ons operating status in the application. Contains at the least either <code>userEnabled</code> or <code>userDisabled</code> plus any number of <code>incompatible</code>, <code>blockslisted</code> or <code>needsDependencies</code>.</td>
    </tr>
    <tr>
      <td><code>%APP_ID%</code></td>
      <td>The <code>id</code> of the current application</td>
    </tr>
    <tr>
      <td><code>%APP_VERSION%</code></td>
      <td>The <code>version</code> of the application to check for updates for</td>
    </tr>
    <tr>
      <td><code>%CURRENT_APP_VERSION%</code></td>
      <td>{{ Fx_minversion_inline(3.5) }} The <code>version</code> of the current application</td>
    </tr>
    <tr>
      <td><code>%APP_OS%</code></td>
      <td>{{ Fx_minversion_inline(1.5) }} The value of <code><a href="/en-US/docs/OS_TARGET" title="OS_TARGET">OS_TARGET</a></code> from the Firefox build system, identifying the operating system being used.</td>
    </tr>
    <tr>
      <td><code>%APP_ABI%</code></td>
      <td>{{ Fx_minversion_inline(1.5) }} The value of the <code><a href="/en-US/docs/XPCOM_ABI" title="XPCOM_ABI">TARGET_XPCOM_ABI</a></code> value from the Firefox build system, identifying the compiler/architecture combination used to compile the current application.</td>
    </tr>
    <tr>
      <td><code>%APP_LOCALE%</code></td>
      <td>{{ Fx_minversion_inline(3) }} The current application's locale.</td>
    </tr>
    <tr>
      <td><code>%UPDATE_TYPE%</code></td>
      <td>{{ Fx_minversion_inline(4) }} <code>UPDATE_TYPE_COMPATIBILITY(32)</code>, <code>UPDATE_TYPE_NEWVERSION(64)</code></td>
    </tr>
    <tr>
      <td><code>%COMPATIBILITY_MODE%</code></td>
      <td>{{ Fx_minversion_inline(10) }} related to <a href="/en-US/docs/Firefox/Updating_add-ons_for_Firefox_10#Compatible_by_default" title="https://developer.mozilla.org/en-US/docs/Firefox/Updating_add-ons_for_Firefox_10#Compatible_by_default">default to compatible</a>, values could be <code>normal</code>, <code>ignore</code> or <code>strict</code>.</td>
    </tr>
  </tbody>
</table>
<p><strong>Examples</strong></p>
<pre class="brush:xml;auto-links:false">
&lt;em:updateURL&gt;http://www.foo.com/update.cgi?id=%ITEM_ID%&amp;amp;version=%ITEM_VERSION%&lt;/em:updateURL&gt;
&lt;em:updateURL&gt;http://www.foo.com/extension/windows.rdf&lt;/em:updateURL&gt;
</pre>
<p><strong>For add-ons hosted on addons.mozilla.org:</strong> You may not specify an <code>updateURL</code> property. By default, Mozilla applications using the Add-on Manager (such as Firefox and Thunderbird) will send update requests to <code>addons.mozilla.org</code> using the default web service. Every time you upload a new version of your add-on or change its compatibility parameters through the author interface, your update manifest will be generated automatically. Add-ons currently marked as <a class="link-https" href="https://addons.mozilla.org/firefox/pages/experimentalAddons">experimental</a> will not be updated due to security concerns.</p>
<p><strong>Format of the Update Manifest:</strong> The Update Manifest is a RDF/XML datasource. For examples of an update manifest, see <a href="/en-US/docs/Extension_Versioning,_Update_and_Compatibility#Update_RDF_Format" title="Extension_Versioning,_Update_and_Compatibility#Update_RDF_Format">Extension Versioning, Update and Compatibility</a> and <a href="/en-US/docs/Enabling_Extension_Updates_(external)" title="Enabling_Extension_Updates_(external)">Enabling Extension Updates (external)</a>.</p>
<h3 id="updateKey">updateKey</h3>
<div>
  {{ Gecko_minversion_header(1.9) }} {{ Fx_minversion_header(3) }}</div>
<p>To ensure the security of update rdf data that is retrieved over plain http you must use a digital signature to verify the contents of the data. In order to do so you must include the public part of the cryptographic key in an updateKey entry in the install.rdf of the add-on. This can be generated using the <a href="/en-US/docs/McCoy" title="McCoy">McCoy</a> tool. Any line breaks and whitespace as part of this entry are ignored.</p>
<pre class="brush:xml">
&lt;em:updateKey&gt;MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDK426erD/H3XtsjvaB5+PJqbhj
              Zc9EDI5OCJS8R3FIObJ9ZHJK1TXeaE7JWqt9WUmBWTEFvwS+FI9vWu8058N9CHhD
              NyeP6i4LuUYjTURnn7Yw/IgzyIJ2oKsYa32RuxAyteqAWqPT/J63wBixIeCxmysf
              awB/zH4KaPiY3vnrzQIDAQAB&lt;/em:updateKey&gt;
</pre>
<h3 id="optionsURL">optionsURL</h3>
<p>The <code>chrome://</code> URL of the extension's options dialog box. This is only useful to extensions. If this property is specified, when the extension is selected in the Extensions list, the Options button is enabled and will show this.</p>
<pre class="brush:xml">
&lt;em:optionsURL&gt;chrome://myext/content/options.xul&lt;/em:optionsURL&gt;</pre>
<p>{{ gecko_minversion_note("7", "In Firefox 7 you can also simply include your options XUL as a file named <code>options.xul</code>, in the base directory of the add-on.") }}</p>
<p>{{ h3_gecko_minversion("optionsType", 7) }}</p>
<p>The type of user-interface used for displaying the options. Accepted values are:</p>
<table border="0" cellpadding="1" cellspacing="1" style="table-layout: fixed;">
  <tbody>
    <tr>
      <td>1</td>
      <td>Opens optionsURL in a dialog box</td>
    </tr>
    <tr>
      <td>2</td>
      <td><a href="/en-US/docs/Extensions/Inline_Options" title="Extensions/Inline Options">Options are displayed inside the Add-on Manager</a></td>
    </tr>
    <tr>
      <td>3</td>
      <td>Opens optionsURL in a new tab (if the application supports that), or a dialog box</td>
    </tr>
  </tbody>
</table>
<p>optionsType defaults to 1 if there is an optionsURL included in install.rdf or 2 if there is no optionsURL and the file <code>options.xul</code> exists in the root of the add-on.</p>
<pre class="brush:xml">
&lt;em:optionsType&gt;2&lt;/em:optionsType&gt;
</pre>
<h3 id="aboutURL">aboutURL</h3>
<p>The<code> chrome://</code> URL of the extension's about dialog box. This is only useful to extensions. If this property is specified, when the extension is selected in the Extensions list, the About... link in the extension's context menu will show this dialog, rather than the default.</p>
<div class="geckoVersionNote">
  <p>{{ gecko_callout_heading("2.0") }}</p>
  <p>The dialog receives the <code>Addon</code> object representing your add-on as a parameter.</p>
</div>
<p><strong>Examples</strong></p>
<pre class="brush:xml">
&lt;em:aboutURL&gt;<a class="external" href="chrome://myext/content/about.xul" rel="freelink">chrome://myext/content/about.xul</a>&lt;/em:aboutURL&gt;
</pre>
<h3 id="iconURL">iconURL</h3>
<p>A <code>chrome://</code> URL to an icon to display in the add-ons list. The icon will be displayed at 32x32 in Firefox 3.6 and lower. In Firefox 4.0 and later the icon can be up to 48x48 pixels in size. If this property is not specified, a default icon is used.</p>
<pre class="brush:xml">
&lt;em:iconURL&gt;<a class="external" href="chrome://myext/skin/icon.png" rel="freelink">chrome://myext/skin/icon.png</a>&lt;/em:iconURL&gt;
</pre>
<div class="note">
  <strong>Note:</strong> For the above example to work you will also have to add a <code>skin package</code> line to your <code>chrome.manifest</code> file. See <a href="/en-US/docs/Chrome_Registration#skin" title="Chrome_Registration#skin">Chrome Registration#skin</a>. Alternatively you can place your icon in the directory specified in your <code>content package</code> line.</div>
<p>{{ gecko_minversion_note("1.9.2", "Starting in Gecko 1.9.2 (Firefox 3.6), you can also simply include your icon, named <code>icon.png</code>, in the base directory of the add-on. This allows your add-on's icon to be displayed even when the add-on is disabled, or if the manifest is missing an <code>iconURL</code>&nbsp;entry.") }}</p>
<p>{{ h3_gecko_minversion("icon64URL", "2.0") }}</p>
<p>A <code>chrome://</code> URL to a 64x64 pixel icon to display in the add-on's details view . If this property is not specified, the smaller icon above will be used.</p>
<pre class="brush:xml">
&lt;em:icon64URL&gt;<a class="external" href="chrome://myext/skin/icon64.png" rel="freelink">chrome://myext/skin/icon64.png</a>&lt;/em:icon64URL&gt;
</pre>
<div class="note">
  <strong>Note:</strong> For the above example to work you will also have to add a <code>skin package</code> line to your <code>chrome.manifest</code> file. See <a href="/en-US/docs/Chrome_Registration#skin" title="Chrome_Registration#skin">Chrome Registration#skin</a>. Alternatively you can place your icon in the directory specified in your <code>content package</code> line.</div>
<p>{{ h3_gecko_minversion("targetPlatform", "1.8") }}</p>
<p>A string specifying a platform that the add-on supports. It contains either the value of <code><a href="/en-US/docs/OS_TARGET" title="OS_TARGET">OS_TARGET</a></code> alone or combined with <code><a href="/en-US/docs/XPCOM_ABI" title="XPCOM_ABI">TARGET_XPCOM_ABI</a></code>, separated by an underscore (_).</p>
<p>You can specify multiple <code>targetPlatform</code> properties per manifest. If any value matches the application's build parameters, it will be installed; if not, the user will get an appropriate error message.</p>
<p><strong>Examples</strong></p>
<pre class="brush:xml">
&lt;em:targetPlatform&gt;WINNT_x86-msvc&lt;/em:targetPlatform&gt;

&lt;em:targetPlatform&gt;Linux&lt;/em:targetPlatform&gt;

&lt;em:targetPlatform&gt;Darwin_ppc-gcc3&lt;/em:targetPlatform&gt;

&lt;em:targetPlatform&gt;SunOS_sparc-sunc&lt;/em:targetPlatform&gt;</pre>
<p>Usually, you would use only the OS part for themes or for extensions that are not fully cross-platform. For extensions including binary (compiled) components, you should never use the OS alone, but include the <a href="/en-US/docs/XPCOM_ABI" title="XPCOM_ABI">ABI (s)</a> that you compiled the components with. If you want to include multiple versions of the components, you should also use <a href="/en-US/docs/Bundles#Platform-specific_Subdirectories" title="Bundles#Platform-specific_Subdirectories">Platform-specific Subdirectories</a>.</p>
<p><strong>Notes</strong></p>
<ul>
  <li>In the same manifest file, you could even mix values with and without ABI. If a value for the application's OS is encountered that requires any specific ABI, the ABI is considered important for that OS and the application will refuse to install the add-on if it does not find a matching OS/ABI combination. This means that if all of the above examples would occur in one manifest, the add-on will install on any Linux build of the application, regardless of its ABI, but not on a Windows Cygwin build.</li>
  <li>There may be builds of Firefox and Thunderbird which do not "know" their ABI (most likely ports to rare platforms, or non-official builds). These builds will refuse to install any addon that requires a specific ABI for their platform.</li>
</ul>
<p>This property was added for Firefox/Thunderbird 1.5. Previous versions of these applications will ignore the restrictions and install the add-on regardless of the platform.</p>
<p>{{ h3_gecko_minversion("strictCompatibility", "10.0") }}</p>
<p>A Boolean value indicating if the add-on should be enabled when the version of the application is greater than its max version. By default, the value of this property is <code>false</code> meaning that the compatibility checking will not be performed against the max version.</p>
<pre class="brush:xml">
&lt;em:strictCompatibility&gt;true&lt;/em:strictCompatibility&gt;</pre>
<p>Usually, there is no need to restrict the compatibility: not all new releases will break your extension and, if it is hosted on AMO, you'll get notice several weeks in advance if a potential risk has been detected. Moreover, an extension being disabled, even for a short period, leads to a bad experience for the user. About the only time you should need to set this if your add-on does things that are likely to be broken by Firefox updates. You <strong>do not</strong> need to set this flag if your add-on has a binary component, since add-ons with binary components are always subject to strict compatibility checking (because binary components need to be rebuilt for every major application release anyway).</p>
<div class="note">
  <strong>Note:</strong> If you want to restore the old behavior of strict compatibility checking of all add-ons, regardless of the value of this setting in their manifests, you can set the <code>extensions.strictCompatibility</code> preference to <code>true</code>.</div>
<div class="geckoVersionNote" style="undefined">
  <p class="note">{{ gecko_callout_heading("11.0") }}</p>
  <p class="note">Starting in Gecko 11.0 {{ geckoRelease("11.0") }}, applications such as Firefox will assume add-ons that have not been updated in a very long time are no longer compatible by default.</p>
</div>
<h2 id="Obsolete_Property_Reference">Obsolete Property Reference</h2>
<p>These properties were required in older versions of the Add-on Manager, but have been replaced with newer and better mechanisms.</p>
<h3 id="file">file</h3>
<p><strong>Firefox 1.0</strong> This property pointed to a chrome <code>.jar</code> file that contains chrome packages that require registration with the Chrome Registry.</p>
<p>The <code>&lt;em:file&gt;</code> property has a complex object value. The uri of the value is <code>urn:mozilla:extension:file:jarFile.jar</code> where <code>jarFile.jar</code> is the name of the jar file that contains the chrome package's files. This could also be the name of a directory that contains the chrome package's files, un-jarred (e.g. <code>urn:mozilla:extension:file:directory</code>). In either case, the referenced chrome package file(s) must be placed in the <code>chrome</code> subdirectory of the XPI's top level.</p>
<p>This object has a <code>package</code> property (with a path within the jar file or directory that leads to the location where the <code>contents.rdf</code> file responsible for registering that package is located), a <code>locale</code> property (ditto, but to register the locale) and a <code>skin</code> property (ditto, but to register the theme material).</p>
<p>In extensions for Firefox 1.5, this property is no longer necessary: the <code><a href="/en-US/docs/Chrome_Registration" title="Chrome_Registration">chrome.manifest</a></code> at the top level of the XPI is used to locate chrome to register. If there is no chrome.manifest, this property is still read by the Add-on Manager and a chrome.manifest is generated from old-style contents.rdf.</p>
<p><strong>Examples</strong></p>
<pre class="brush:xml">
&lt;em:file&gt;
 &lt;Description about="urn:mozilla:extension:file:myext.jar"&gt;
  &lt;em:package&gt;content/myext/&lt;/em:package&gt;
  &lt;em:locale&gt;locale/en-US/myext/&lt;/em:locale&gt;
  &lt;em:skin&gt;skin/classic/myext/&lt;em:skin&gt;
 &lt;/Description&gt;
&lt;/em:file&gt;
</pre>
<p>An Install Manifest may specify multiple <code>file</code> properties, one for each jar file or subdirectory that contains chrome to register.</p>
<h3 id="hidden">hidden</h3>
<p><strong>Firefox 1.0</strong><strong> - 3.5</strong> A boolean value that when <code>true</code> makes the add-on not show up in the add-ons list, provided the add-on is installed in a {{ Anch("restricted access area") }} (so it does not work for add-ons installed in the profile). This is for bundling integration hooks to larger applications where having an entry in the Extensions list does not make sense.</p>
<div class="note">
  <strong>Note:</strong> This property is no longer supported under Gecko 1.9.2 (Firefox 3.6)&nbsp;or later, to prevent extensions from being installed in such a way that the user might not be able to tell they're installed.</div>
<p><strong>Examples</strong></p>
<pre class="brush:xml">
&lt;em:hidden&gt;true&lt;/em:hidden&gt;
</pre>
<h3 id="requires">requires</h3>
<p><strong>Firefox 2.0 - 3.6.x</strong>. Other versions will ignore the restrictions and install the add-on regardless of the requirements.</p>
<p>See <a class="link-https" href="https://groups.google.com/forum/#!topic/mozilla.dev.platform/u9QT2ZucV-c" title="https://groups.google.com/forum/#!topic/mozilla.dev.platform/u9QT2ZucV-c">Replacement for install.rdf property "requires"</a> discussion for rationale behind removing this feature and the suggested workaround.</p>
<p><code>&lt;em:requires</code>&gt; has a similar syntax to the <code>&lt;em:targetApplication&gt;</code> tag (i.e. you must specify <code>&lt;em:id&gt;</code>, <code>&lt;em:minVersion&gt;</code>, <code>&lt;em:maxVersion&gt;</code> when using it). If the add-on specified by the <code>&lt;em:id&gt;</code> tag is not installed or has an incompatible version, the extension manager will disable your extension and show the message "Requires additional items". You can add as many <code>&lt;em:requires&gt;</code> tags as you like. Your extension will be disabled if any of the specified requirements fail. It is not possible to add dependencies that are specific to a <code>&lt;em:targetApplication&gt;</code>. See <a href="https://wiki.mozilla.org/Extension_Dependencies" title="https://wiki.mozilla.org/Extension_Dependencies">Extension Dependencies</a> for more details.</p>
<h2 id="Glossary">Glossary</h2>
<h2 id="restricted_access_area">restricted access area</h2>
<p>A <em>restricted access area</em> is an install location that could be restricted on a restricted-access account, regardless of whether or not the location is restricted with the current user privileges (see {{ Source("toolkit/mozapps/extensions/public/nsIExtensionManager.idl#80", "nsIInstallLocation::restricted") }}). Currently, the <code>($APPDIR)/extensions</code> folder and the registry install location under <code>HKEY_LOCAL_MACHINE</code> (see <a href="/en-US/docs/Adding_Extensions_using_the_Windows_Registry" title="Adding_Extensions_using_the_Windows_Registry">Adding Extensions using the Windows Registry</a> for details) are restricted.</p>
<p>The <code>($PROFILE)/extensions</code> and <code>HKEY_CURRENT_USER</code> install locations, on the other hand, are not restricted.</p>
恢复到这个版本