windows - 用于针对 UWP/Centennial 项目进行构建的映射文件是什么?如何制作它们?

标签 windows uwp desktop-bridge makeappx

我正在尝试通过一些基本的自动化来构建一些 UWP/Centennial 项目,现在我需要进行测试签名的 AppX,解压并对其进行真实签名,然后重新打包并对 AppX 本身进行真实签名。例如,

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

这工作得很好,就像运行签名工具来签署 "%CD%\unpacked" 中的内容一样。

我遇到的问题是文档差距。

/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.

我多次看到这个“映射文件”,但我无法准确定位它们的含义。这个术语对我来说太笼统,无法推断它是什么或如何制作它。我能想到的最好的情况是它可能指的是

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

但是还有这个:

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

但这似乎与恰好包含单词映射的其他类型的文件不匹配,或者至少是 <mapping file>对我来说似乎比 App package block map 更通用.

  1. <mapping file>对于 MakeAppX的当前文档与 App package block map 相同?
  2. 在哪里可以引用此映射文件的示例或指南来帮助我了解它的用途?如果映射文件是AppxBlockMap.xml文件,那么我只想知道可以用它来实现其预期目的做什么。

最佳答案

官方文档描述了一个映射文件here 。 如果你的makeappx命令只使用/f,你不需要指定资源文件,那么你的映射文件可以是如下文本:

[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"

如果您使用/m 命令,则必须使用/f 并包含 [ResourceMetadata] 部分,如下所示:

[ResourceMetadata]
"ResourceDimensions"                    "language-en-us"
"ResourceId"                            "English"

[Files]
"images\en-us\logo.png"                 "en-us\logo.png"
"en-us.pri"                             "resources.pri"

关于windows - 用于针对 UWP/Centennial 项目进行构建的映射文件是什么?如何制作它们?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47586254/

相关文章:

c# - 通过 UWP startupTask 扩展检测启动

winapi - 我需要安装 Windows 10 SDK 的哪一部分才能获取 MakeAppx.exe?

php - 如何将 php 变量传递到 Windows 批处理文件

windows - Visual Studio 2015 Update 1 - 调试时没有 IIS Express 响应

xaml - 如何从 GridView 中获取选定的项目

c# - UWP 应用中的 WCF 发现

javascript - Windows UWP 的Confirm()方法

powershell - 如何在 Powershell 中指定复杂的发布者名称?

c# - 大多数窗口左上角的那个图标

windows - 如何在 C++ 中以编程方式更改光标图标