gpt4 book ai didi

uwp - 修复由 Desktop App Converter 生成的 AppX list 中的缩放图像

转载 作者:行者123 更新时间:2023-12-04 07:39:11 25 4
gpt4 key购买 nike

我使用 Desktop App Converter 将我的 Win32 应用程序转换为 .appx .

转换器无法正确转换应用程序图标。图标透明度丢失。虽然我已将此(错误?)报告给 Microsoft,但同时我想尝试手动转换图标。我想生成 .appx最后手动(使用 makeappx )。所以我需要创建 AppxManifest.xml .

问题是 AppxManifest.xml由 Desktop App Converter 生成的无效。所有图像路径都指向不存在的文件:

<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10">
...
<Properties>
...
<Logo>Assets\AppStoreLogo.png</Logo>
</Properties>
<Resources>
<Resource Language="en-us" />
<Resource uap:Scale="100" />
<Resource uap:Scale="125" />
<Resource uap:Scale="150" />
<Resource uap:Scale="200" />
<Resource uap:Scale="400" />
</Resources>
...
<Applications>
<Application Id="WinSCP" Executable="WinSCP.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="WinSCP" Description="WinSCP" BackgroundColor="transparent" Square150x150Logo="Assets\AppMedTile.png" Square44x44Logo="Assets\AppList.png">
<uap:DefaultTile Wide310x150Logo="Assets\AppWideTile.png" Square310x310Logo="Assets\AppLargeTile.png" Square71x71Logo="Assets\AppSmallTile.png">

没有像 AppStoreLogo.png 这样的文件(等)在 Assets文件夹,有如下文件:
AppStoreLogo.scale-100.png
AppStoreLogo.scale-125.png
AppStoreLogo.scale-150.png
AppStoreLogo.scale-200.png
AppStoreLogo.scale-400.png

所以 makeappx无法生成 .appx使用生成的 list 。

虽然我显然可以通过将路径指向 scale-100 来修复 list 图像的变体,我觉得这不是正确的方法。

当然,缩放图像是有原因的。

我可以看到这些图像和缩放相关元素:
  • <Resources> list 中列出所有比例的元素。
  • 还有resources.*.pri文件,它引用缩放的图像。
    resources.pri
    resources.scale-100.pri
    resources.scale-125.pri
    resources.scale-150.pri
    resources.scale-200.pri

  • 但我不明白这一切是如何结合在一起的。 我应该在 list 中使用哪些路径来维护缩放的图像?

    最佳答案

    所有图标都由一个 .PRI 文件组合在一起,该文件必须存在于包中并为这些 Assets 生成。您可以尝试使用 makepri 将 .PRI 文件转储为 XML 格式并查看其内容。

    关于uwp - 修复由 Desktop App Converter 生成的 AppX list 中的缩放图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42162466/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com