2

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.
kayleeFrye_onDeck
  • 6,648
  • 5
  • 69
  • 80
  • 1
    Try looking at [this MSDN page](https://learn.microsoft.com/en-us/windows/uwp/app-resources/using-mrt-for-converted-desktop-apps-and-games#phase-3-building-resource-packs) – Peter Torr - MSFT Dec 01 '17 at 03:46
  • @PeterTorr-MSFT are you implying that the answer to #1 is true? Saying stuff like that in your comment will help the community more than just link-sharing. Tyvm! – kayleeFrye_onDeck Dec 01 '17 at 04:09
  • 1
    /f is used to specify a resource mapping file created by makepri. The block map is something else. If this helps then I can write a proper answer – Peter Torr - MSFT Dec 01 '17 at 04:12
  • @PeterTorr-MSFT It helped answer #1 for sure! I mistakenly inferred that you were implying they were the same thing from what I gleaned on the first pass of the documentation , but that's all PEBKAC, not on you , so thanks for clearing that up! :) I will have to take a deeper dive to find out what exactly a mapping file is. It would have been really nice to have some examples, but I understand that Documentation is rarely high on the priority list... I'm approaching this from the build-engineer standpoint instead of the developer, so I'm trying to understand the build tools/resources in-depth. – kayleeFrye_onDeck Dec 01 '17 at 07:54
  • Thanks again for the help, @PeterTorr-MSFT ! This definitely helps ^_^: https://learn.microsoft.com/en-us/windows/uwp/packaging/create-app-package-with-makeappx-tool#mapping-files – kayleeFrye_onDeck Dec 04 '17 at 17:14

1 Answers1

3

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"
lmcdo
  • 45
  • 8
Barry Wang
  • 1,459
  • 1
  • 8
  • 12
  • I don't think the official doc originally had that part (or at least that wording) when I wrote this question. You can see the comments in the question part when Peter Torr - MSFT mentions offering to clarify it if considered helpful. But thanks! This clarification to the documentation definitely helps, as does your answer pointing to the header for it in the documentation. – kayleeFrye_onDeck Dec 04 '17 at 17:12