> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# デプロイパッケージスキーマ

> デプロイパッケージスキーマ

makepkg ツールの入力として使用されるマッピングファイルには、パッケージの内容を記述する 5 つの許可された要素があります: Package、Chunk、File、Recipe、Feature です。これらの要素は、パッケージ全体、パッケージの個別のストリーム可能なセグメント (チャンク)、およびそれらの各チャンク内のファイルを記述します。Feature を使用すると、ユーザーがインストールまたは削除するかどうかを選択できるチャンクのグループを作成でき、Recipe を使用すると、特定のインストールに対して有効になる Feature のセットを、ユーザーまたはユーザーのホームコンソールが所有するエンタイトルメントに結び付けることができます。

小さなマッピングファイルは、次のコード例のようになります。

```xml theme={null}
<Package>
  <Chunk Id="1000" Marker="Launch">
    <FileGroup DestinationPath="\" SourcePath="X:\bin" Include="*.*"/>
  </Chunk>
  <Chunk Id="1001">
    <FileGroup DestinationPath="\Data\Maps" SourcePath="Y:\Maps\Level1" Include="*.map"/>
    <FileGroup DestinationPath="\Data\Maps" SourcePath="Y:\Maps\Level2" Include="*.map"/>
    <FileGroup DestinationPath="\Data\Maps" SourcePath="Y:\Maps\Level3" Include="*.map"/>
    <FileGroup DestinationPath="\Data\Maps" SourcePath="W:\ExtraMaps" Include="*.map"/>
    <FileGroup DestinationPath="\Data\Textures" SourcePath="M:\MapTextures" Include="*.png"/>
    <FileGroup DestinationPath="\Data\Textures" SourcePath="W:\ExtraMapTextures" Include="*.png"/>
  </Chunk>
</Package>  
```

MicrosoftGame.config とそこから参照されるすべてのファイル (例: Logo、Splash Screen など) は、パッケージを生成する際に File Group に含める必要があります。GameOs.xvd はパッケージ生成中にパッケージに自動的に埋め込まれるため、マッピングファイルに含めるべきではありません。

<a id="ID4E2" />

## Intelligent Delivery の例

以下のマッピングファイルは、Intelligent Delivery を使用してシステムによってどのチャンクがインストールされるかを制御する方法を示しており、インストール時およびその後シェル内から、ユーザーが有効または無効にすることを選択できる *Feature* を定義します。各チャンクは *specifier* を持つことができ、これによりチャンクをデバイスの種類とコンソールの言語設定に基づいて選択的に配信できます。*Feature* を使用するパッケージは、既定の *Recipe* も指定する必要があり、オプションで追加の Recipe を指定できます。

```xml theme={null}
<Package>
    <!-- Features bring down Chunks with the associated Tags.
         Users can override install defaults to deselect features they don't want,
         and can add/remove features from within the shell after install as well. -->
    <Features>
        <Feature Id="CampaignFeature" DisplayName="MyGame Campaign Name" Image="CampaignLogo.png" Tags="CampaignTag" />
        <Feature Id="MultiPlayerFeature" DisplayName="MyGame Multiplayer Name" Image="MPLogo.png" Tags="MPTag" />
        <Feature Id="PremiumFeature" Image="PremiumLogo.png" Tags="PremiumTag" />
    </Features>
    <!-- Recipes declare which Features are included for a given install.
         Recipes are additive, and persist for the life of an install,
         They are never removed, though users can choose to add/remove individual Features -->
    <Recipes>
        <!-- default Recipe is always active -->
        <Recipe Id="default" IncludedFeatures="CampaignFeature;MPFeature"/>
        <!-- PremiumProduct Recipe is active, causing PremiumFeature to be installed if user owns 9PXXXXXXXXXX -->
        <Recipe Id="PremiumProduct" IncludedFeatures="PremiumFeature">
            <StoreId>9PXXXXXXXXXX</StoreId>
        </Recipe>
    </Recipes>
    <Chunk Id="1000" Marker="Launch">
        <FileGroup DestinationPath="\" SourcePath="X:\bin" Include="*.*"/>
        <FileGroup DestinationPath="\Maps" SourcePath=".\Maps" Include="map.idx"/>
    </Chunk>
    <Chunk Id="2000">
        <FileGroup DestinationPath="\Maps" SourcePath=".\Maps" Include="*.map"/>
    </Chunk>
    <Chunk Id="3000">
        <FileGroup DestinationPath="\Maps" SourcePath="Z:\Extras" Include="*.map"/>
        <FileGroup DestinationPath="\Pics" SourcePath=".\Images" Include="*.png"/>
        <FileGroup DestinationPath="\Pics" SourcePath="Z:\Extras" Include="*.png"/>
    </Chunk>
    <!--Chunk 4000 will be installed if the best language fit for the console language is French-->
    <!--Make sure that any language specifiers used here are also in your MicrosoftGame.config-->
    <Chunk Id="4000" Languages="fr">
        <FileGroup DestinationPath="\Localized\Fr" SourcePath="Z:\Localized\fr" Include="*.dat"/>
    </Chunk>
    <!--Chunk 5000 will be installed on Anaconda consoles-->
    <Chunk Id="5000" Devices="Xbox-Anaconda">
        <FileGroup DestinationPath="\Anaconda" SourcePath="Z:\Anaconda" Include="*.dat"/>
    </Chunk>
    <!--Chunk 6000 contains the Campaign mode content-->
    <Chunk Id="6000" Tags="CampaignTag">
        <FileGroup DestinationPath="\Campaign" SourcePath="Z:\Campaign" Include="*.dat"/>
    </Chunk>
    <!--Chunk 6100 contains the Campaign mode content specific to French language-->
    <Chunk Id="6100" Tags="CampaignTag" Languages="fr">
        <FileGroup DestinationPath="\Campaign\fr" SourcePath="Z:\Campaign\fr" Include="*.dat"/>
    </Chunk>
    <!--Chunk 6200 contains the Campaign mode content specific to English language-->
    <Chunk Id="6200" Tags="CampaignTag" Languages="en">
        <FileGroup DestinationPath="\Campaign\en" SourcePath="Z:\Campaign\en" Include="*.dat"/>
    </Chunk>
    <!--Chunk 7000 contains the Multiplayer mode content-->
    <Chunk Id="7000" Tags="MPTag">
        <FileGroup DestinationPath="\Multiplayer" SourcePath="Z:\Multiplayer" Include="*.dat"/>
    </Chunk>
    <!--Chunk 7100 contains the Multiplayer mode content specific to French language-->
    <Chunk Id="7100" Tags="MPTag" Languages="fr">
        <FileGroup DestinationPath="\Multiplayer\fr" SourcePath="Z:\Multiplayer\fr" Include="*.dat"/>
    </Chunk>
    <!--Chunk 7200 contains the Multiplayer mode content specific to English language-->
    <Chunk Id="7200" Tags="MPTag" Languages="en">
        <FileGroup DestinationPath="\Multiplayer\en" SourcePath="Z:\Multiplayer\en" Include="*.dat"/>
    </Chunk>
    <!--Chunk 8000 contains the premium content which is triggered for download by the PremiumProduct
        Recipe if user owns ProductID 9PXXXXXXXXXX-->
    <Chunk Id="8000" Tags="PremiumTag">
        <FileGroup DestinationPath="\Premium" SourcePath="Z:\premium" Include="*.dat"/>
    </Chunk>
</Package>
```

<a id="ID4EXE" />

## このセクションの内容

[Chunk](/build/core-features/common/packaging/deployment/deployment-element-chunk)
グループとしてインストールされるべきファイルのコレクションを記述します。

[FileGroup](/build/core-features/common/packaging/deployment/deployment-element-filegroup)
ファイルが *chunk* に追加されるルールを記述します。

[Package](/build/core-features/common/packaging/deployment/deployment-element-package)
タイトルの完全なインストールを構成するチャンクのコレクションを記述します。

<a id="ID4EDF" />

## 関連項目

[Make package (makepkg.exe)](/build/core-features/common/packaging/deployment/makepkg)
