Add Assets to resources.pri + Support Qualified Names in Appxmanifest#320
Add Assets to resources.pri + Support Qualified Names in Appxmanifest#320chiaramooney wants to merge 8 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances MSIX packaging by properly including all asset variants in the resources.pri file and fixing asset discovery when qualified MRT names (e.g., "Logo.scale-100.png") are specified in the manifest. This enables proper display of unplated icons in the Windows taskbar and ensures all scaled/themed variants are bundled even when the manifest references a specific qualified asset.
Changes:
- Modified PRI generation to enumerate and index all image assets in the Assets folder instead of just .pri files
- Added support for parsing qualified MRT asset names to extract the base name (e.g., "Logo.scale-100" → "Logo")
- Updated asset file discovery to find all variants of a given asset family regardless of which specific qualified name is referenced in the manifest
Build Metrics ReportBinary Sizes
Test Results✅ 260 passed, 6 skipped out of 266 tests in 62.4s (+5 tests, +4.7s vs. baseline) CLI Startup Time31ms median (x64, |
| ".svg" | ||
| }; | ||
|
|
||
| private static async Task<HashSet<string>> GetManifestReferencedFilePathsAsync(FileInfo manifestPath, CancellationToken cancellationToken) |
There was a problem hiding this comment.
Could we reuse the ManifestService.ExtractAssetRefrencesFromManifest function here somehow instead or doing this work - they do a similar job, no?
Closes #298
Description
Usage Example
No commands change.
Type of Change
Checklist
Screenshots / Demo
PRI XAML Example:
Before this change the pri XAML was very simply. Its main entry was just
<ResourceMap name="electron-gallery" version="1.0" primary="true">.Additional Notes
AI Description
This update adds support for including unplated assets in the generated
resources.prifile when an app is displayed in the Taskbar, ensuring that all assets from theappxmanifestare referenced. Additionally, it improves the asset packaging process by ensuring that all scaled variants of specified assets are included. Code for asset path extraction has been refactored for better efficiency. No changes to commands or flags were made.