我已經使用桌面應用程序轉換器將我的Win32應用程序轉換爲.appx
。修復由Destop App生成的AppX清單中的縮放圖像轉換器
轉換器無法正確轉換應用程序圖標。圖標透明度丟失。雖然我已經向Microsoft報告過這個錯誤,但同時我想嘗試手動轉換圖標。無論如何,我想手動生成.appx
(使用makeappx
)。所以我需要創建AppxManifest.xml
。
問題是由Desktop App Converter生成的AppxManifest.xml
無效。所有圖像路徑指向不存在的文件:
<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">
有像Assets
文件夾AppStoreLogo.png
(等)沒有文件,有喜歡的文件:
AppStoreLogo.scale-100.png
AppStoreLogo.scale-125.png
AppStoreLogo.scale-150.png
AppStoreLogo.scale-200.png
AppStoreLogo.scale-400.png
所以makeappx
未能產生.appx
使用生成的清單。
雖然我明顯可以通過將路徑指向圖像的scale-100
變體來修復清單,但我覺得這不是正確的方法。
當然,縮放圖像是有原因的。
我可以看到這些圖像和規模相關的元素:
有在列出所有的尺度明顯的
<Resources>
元素。還有
resources.*.pri
文件,其中引用縮放圖像。resources.pri resources.scale-100.pri resources.scale-125.pri resources.scale-150.pri resources.scale-200.pri
但我不明白這一切都在一起。 我應該在清單中使用哪些路徑來維護縮放的圖像?
由馬丁方式,OSS我們有一個程序,讓您訪問我們的頂級商業的免費許可版,如果你有興趣。 http://www.advancedinstaller.com/free-license.html –
Makeappx可以使用/ l開關忽略每個文件上的.scale ...內容。然後你可以用makeappx來構建。 – chris84948