windowsuwpdesktop-bridgemakeappx

What are mapping files for building against UWP / Centennial projects and how do I make them?


I'm trying to plow through some basic automation for building some UWP / Centennial projects, and I'm at the point where I need to take a test-signed AppX, unpack and real-sign it, then re-pack and real-sign the AppX itself. For example,

makeappx unpack /p "%CD%\UpgradeTestAppX_1.0.3.0_x64.appx" /d "%CD%\unpacked" /o /l

That works fine, as does running the signing tools to sign the contents inside "%CD%\unpacked"

The issue I'm running into is a documentation gap.

/f Specifies the mapping file.

/m Specifies the path to an input app manifest which will be used as the basis for generating the output app package or resource package's manifest. When you use this option, you must also use /f and include a [ResourceMetadata] section in the mapping file to specify the resource dimensions to be included in the generated manifest.

I've seen this "mapping file" mentioned several times, but I can't locate what precisely they mean. The term is too generic to me to infer what it is or how to make one. The best I can figure is that it might be referring to an

...App package block map (AppxBlockMap.xml)...

But then there's this:

<mapping file> File name that specifies the package source an destination

But that's not what seems to match to this other type of file that happens to have the word map in it, or at least a <mapping file> seems more generic to me than App package block map.

  1. Is the <mapping file> for MakeAppX's current documentation the same as an App package block map?
  2. Where can I reference an example or guide of this mapping file that helps me understand what all it can be leveraged for? If the mapping file is the AppxBlockMap.xml file, then I just want to know what all can be done with it for its intended purpose.

Solution

  • The official doc describes a mapping file here. If your makeappx command only use /f, you don't need to specify resource file, then your mapping file can be a text which is wrote like the following:

    [Files]
    "C:\MyApp\StartPage.html"               "default.html"
    "C:\Program Files (x86)\example.txt"    "misc\example.txt"
    "\\MyServer\path\icon.png"              "icon.png"
    "my app files\readme.txt"               "my app files\readme.txt"
    "CustomManifest.xml"                    "AppxManifest.xml"
    

    If you used /m command, then you must use /f and include a [ResourceMetadata] section like the following:

    [ResourceMetadata]
    "ResourceDimensions"                    "language-en-us"
    "ResourceId"                            "English"
    
    [Files]
    "images\en-us\logo.png"                 "en-us\logo.png"
    "en-us.pri"                             "resources.pri"