--- title: テーマの梱包 slug: Theme_Packaging tags: - Add-ons - MDC Project - NeedsUpdate - Themes - Toolkit API translation_of: Mozilla/Thunderbird/Thunderbird_extensions/Theme_Packaging ---

 

このドキュメントは、Firefox と Thunderbird のための テーマ を梱包する方法について書かれています。

このページの情報は古くなっています。最新の情報に更新してください。

必須条件

Firefox や Thunderbird のテーマを作成するには、スタイルシート(CSS) および少しの XBL の知識、グラフィックデザインのスキルと美的感覚(無くても良いかもしれない) が必要です。このドキュメントは、テーマを Firefox のテーマウィンドウに表示するために、どのように梱包されているかについて書かれています。

テーマファイルのレイアウト

Firefox/Thunderbird のテーマは、以下の構造の JAR ファイルに梱包されています:

theme.jar:
  install.rdf
  contents.rdf
  preview.png
  icon.png
  browser/files
  global/files
  mozapps/files
  communicator/files
  ...

install.rdf

install.rdf マニフェストは以下のようになります:

<?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>

必須の install.rdf プロパティ

install.rdf には以下のプロパティが含まれていなければいけません。詳しくは install.rdf リファレンス をご覧ください:

任意の install.rdf プロパティ

あなたのテーマを http://addons.mozilla.org ウェブサイト上で利用可能にする場合は、updateURL を含めないように注意してください。

install.rdf ファイルのサンプル

<?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>

以下は targetApplication プロパティで使用する、共通のターゲットアプリケーションの GUID です:

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

Toolkit API のための公式リファレンス

{{page("/en-US/docs/Toolkit_API/Official_References")}}