The mapping file used as input for the makepkg tool has three allowed elements used to describe the contents of a package, Package, Chunk, and File. These elements describe the overall package, individual streamable segments of a package (chunks), and the files in each of those chunks.
A small mapping file could look something like this:
<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>
<Chunk Id="1073741823">
<FileGroup DestinationPath="\" SourcePath=".\" Include="Update.AlignmentChunk"/>
</Chunk>
</Package>
The MakePkg.exe packaging tool expands the last chunk in a title’s layout to meet alignment requirements. Content updates to any chunk will therefore typically cause the last chunk to change its size, and the system will redownload it. For large last chunks, this will mean a large content update download, even if the chunk’s contents haven’t changed. To minimize download size, exclusive resource apps must include a special alignment chunk referring to a one-byte file at the end of their layout XML file:
<Chunk Id="1073741823">
<FileGroup DestinationPath="\" SourcePath=".\" Include="Update.AlignmentChunk"/>
</Chunk>
Exclusive resource apps that are missing the alignment chunk and one-byte file requirement will log a warning, which will cause a certification failure if not corrected prior to submission.
The following mapping file demonstrates how to use Intelligent Delivery to control which chunks are installed by the system. Each chunk can have a specifier so that chunks are selectively delivered based on the device type and language settings of the console. For more information, see Intelligent Delivery.
<Package>
<!--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 AppXManifest.xml-->
<Chunk Id="4000" Languages="fr">
<FileGroup DestinationPath="\Localized\Fr" SourcePath="Z:\Localized\fr" Include="*.dat"/>
</Chunk>
<!--Chunk 5000 will be installed on Xbox One Scorpio consoles-->
<Chunk Id="5000" Devices="Xbox-Scorpio">
<FileGroup DestinationPath="\Scorpio" SourcePath="Z:\Scorpio" Include="*.dat"/>
</Chunk>
<!--Chunk 6000 is not installed by default, but can be triggered by calling AddTransferSpecifiersAsync-->
<Chunk Id="6000" OnDemand="true">
<FileGroup DestinationPath="\MapEditor" SourcePath="Z:\MapEditor" Include="*.dat"/>
</Chunk>
<!--Chunk 7000 is installed by default, but can be removed by the user in the shell or by the app using RemoveTransferSpecifiersAsync-->
<Chunk Id="7000" OnDemand="true" Default="true">
<FileGroup DestinationPath="\RemovableContent" SourcePath="Z:\RemovableContent" Include="*.dat"/>
</Chunk>
<!--Chunk 8000 contains content which only supports single player experience in game. User can choose to uninstall this from the shell, or title can remove using RemoveSpecifiersAsync-->
<Chunk Id="8000" ContentTypes="SinglePlayer">
<FileGroup DestinationPath="\SinglePlayerCampaign" SourcePath="Z:\SinglePlayerCampaign" Include="*.dat"/>
</Chunk>
<!--Chunk 9000 contains content which only supports multiplayer experience in game. User can choose to uninstall this from the shell, or title can remove using RemoveSpecifiersAsync-->
<Chunk Id="9000" ContentTypes="MultiPlayer">
<FileGroup DestinationPath="\MultiPlayer" SourcePath="Z:\MultiPlayer" Include="*.dat"/>
</Chunk>
</Package>
Chunk
Defines a chunk, a collection of files that should be installed as a group.
FileGroup
Defines a rule by which files will be added to a chunk, a collection of files that should be installed as a group.
Package
Specifies a package, a collection of chunks that make up a complete installion of a title.