> ## 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 工具輸入的對應檔案，有五個允許的元素可描述套件的內容：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*。每個區塊都可以有一個*指定元*，以便根據主機的裝置類型和語言設定選擇性地傳遞區塊。任何使用 *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](/zh-TW/build/core-features/common/packaging/deployment/deployment-element-chunk)
描述應以群組方式安裝的檔案集合。

[FileGroup](/zh-TW/build/core-features/common/packaging/deployment/deployment-element-filegroup)
描述將檔案新增至*區塊*的規則。

[Package](/zh-TW/build/core-features/common/packaging/deployment/deployment-element-package)
描述構成遊戲完整安裝的區塊集合。

<a id="ID4EDF" />

## 另請參閱

[建立套件 (makepkg.exe)](/zh-TW/build/core-features/common/packaging/deployment/makepkg)


## Related topics

- [部署包架构](/zh-CN/build/core-features/common/packaging/deployment/atoc-deployment-schema.md)
- [面向 XBOX 开发的 Visual Studio 属性](/zh-CN/tools/tools-console/visualstudio/durango-property-pages.md)
- [使用 GDKX 建置並執行你的第一個主機遊戲](/zh-TW/home/build-first-title/first-console-title-walkthrough.md)
- [GDK 名詞與縮寫詞彙表](/zh-TW/home/glossary.md)
- [脚本创作工具](/zh-CN/tools/tools-console/wdp/script-authoring-tool.md)
