Extension Packaging

  • 리비전 슬러그: Extension_Packaging
  • 리비전 제목: Extension Packaging
  • 리비전 아이디: 191024
  • 제작일시:
  • 만든이: CN
  • 현재 리비전인가요? 아니오
  • 댓글 /* Official References for [[Toolkit API]] */ 틀로 바꿈

리비전 내용

Extensions are a form of Installable Bundle which can be downloaded and installed by a user, or provided pre-packaged with an application or by an external program. Extensions use a directory structure which can provide chrome, components, and other files to extend the functionality of a XUL program.

Every extension must provide an install.rdf file which contains metadata about the extension, such as its unique ID, version, author, and compatibility information.

After the extension files and install.rdf have been prepared, there are several ways to prepare an extension for installation: ZIP the extension directory into a user-installable XPI (xpinstall) file, unpack the extension directly into the user's application or profile directory, or register the extension in the Windows registry.

Making an Extension XPI

An XPI (XPInstall) file is simply a ZIP file containing the extension files, with the install.rdf file at the root of the ZIP. Users can download and install XPI files off an website or from a local file, by opening it or dragging it into the Extension Manager window.

The MIME type recognized by Firefox for XPI files is application/x-xpinstall. Since most HTTP servers are not configured to return this MIME type for the .xpi extension by default, you will probably need to configure your HTTP server. In the Apache HTTP Server, this can be done by adding the following directive to the configuration file or .htaccess:

AddType application/x-xpinstall .xpi

Install Extension Files Directly

If you know the location of the application (if you are installing an extension as part of the application installer, for example), you can install the extension files directly to <appdir>/extensions/<extensionID>. The extension will be found automatically by the extension manager the next time the application is launched.

When using this method you must verify that the file system permissions for the directories and files for the extension are set properly. Otherwise, the Extension Manager may not function properly with the extension or the extension itself may not work properly.

Register an Extension Location Using the Windows Registry

External installers (such as the Java runtime) may wish to install application integration points as extension even if the application is not yet installed. This can be accomplished on Windows using the registry.

Multi-Item Extension XPIs

In some cases a single XPI file may wish to install multiple extensions/themes. A special kind of extension XPI called the Multiple Item Package explains how to create this kind of package. (Firefox 1.5/XULRunner 1.8 required.)

Official References for Toolkit API

{{template.Toolkit_API_Official_References()}}

{{ wiki.languages( { "fr": "fr/Empaqueter_une_extension", "it": "it/Impacchettare_l\'Estensione" } ) }}

리비전 소스

<p>Extensions are a form of <a href="ko/Bundles">Installable Bundle</a> which can be downloaded and installed by a user, or provided pre-packaged with an application or by an external program. Extensions use a <a href="ko/Bundles">directory structure</a> which can provide chrome, components, and other files to extend the functionality of a XUL program.
</p><p>Every extension must provide an <a href="ko/Install.rdf">install.rdf</a> file which contains metadata about the extension, such as its unique ID, version, author, and compatibility information.
</p><p>After the extension files and install.rdf have been prepared, there are several ways to prepare an extension for installation: ZIP the extension directory into a user-installable <a href="ko/XPI">XPI</a> (xpinstall) file, unpack the extension directly into the user's application or profile directory, or register the extension in the Windows registry.
</p>
<h3 name="Making_an_Extension_XPI"> Making an Extension XPI </h3>
<p>An <a href="ko/XPI">XPI</a> (XPInstall) file is simply a ZIP file containing the extension files, with the <a href="ko/Install.rdf">install.rdf</a> file at the root of the ZIP. Users can download and install XPI files off an website or from a local file, by opening it or dragging it into the Extension Manager window.
</p><p>The MIME type recognized by Firefox for XPI files is <i>application/x-xpinstall</i>. Since most HTTP servers are not configured to return this MIME type for the .xpi extension by default, you will probably need to configure your HTTP server. In the Apache HTTP Server, this can be done by adding the following directive to the configuration file or .htaccess:
</p>
<pre class="eval">AddType application/x-xpinstall .xpi
</pre>
<h3 name="Install_Extension_Files_Directly"> Install Extension Files Directly </h3>
<p>If you know the location of the application (if you are installing an extension as part of the application installer, for example), you can install the extension files directly to &lt;appdir&gt;/extensions/&lt;extensionID&gt;. The extension will be found automatically by the extension manager the next time the application is launched.
</p><p>When using this method you must verify that the file system permissions for the directories and files for the extension are set properly. Otherwise, the Extension Manager may not function properly with the extension or the extension itself may not work properly.
</p>
<h3 name="Register_an_Extension_Location_Using_the_Windows_Registry"> Register an Extension Location Using the Windows Registry </h3>
<p>External installers (such as the Java runtime) may wish to install application integration points as extension even if the application is not yet installed. This can be accomplished on Windows <a href="ko/Adding_Extensions_using_the_Windows_Registry">using the registry</a>.
</p>
<h3 name="Multi-Item_Extension_XPIs"> Multi-Item Extension XPIs </h3>
<p>In some cases a single XPI file may wish to install multiple extensions/themes. A special kind of extension XPI called the <a href="ko/Multiple_Item_Packaging">Multiple Item Package</a> explains how to create this kind of package. (Firefox 1.5/XULRunner 1.8 required.)
</p>
<h3 name="Official_References_for_Toolkit_API"> Official References for <a href="ko/Toolkit_API">Toolkit API</a> </h3>
<p>{{template.Toolkit_API_Official_References()}}
</p>{{ wiki.languages( { "fr": "fr/Empaqueter_une_extension", "it": "it/Impacchettare_l\'Estensione" } ) }}
Revert to this revision