Open jonwis opened 3 years ago
The description for .resw
templates says its for text and strings; does it support images or other binary resources like the old resource formats?
.resw are only for string-based types. If you want to index files, you drop them into the file system and instruct the resource compiler to pick them up by including them in the project. As an example, these files are included: https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/MrtCore/winui_desktop_packaged_app_cpp/winui_desktop_packaged_app_cpp%20(Package)/Images
By default files are included as paths relative to the app root. You can also embed them as binary content. I don't think we currently have a sample for that, we will look into adding one.
In terms of strongly typed binary resources, those are not supported. As far as MRT is concerned, binary resources are opaque blobs.
Thanks for the clarification.
Proposal: Migration tooling for folks who have existing .RC files
Teams and apps with existing investments in
.rc
style resources might want to migrate to MRT's.resw
style format instead. The WindowsAppSDK should provide tooling to convert their resource descriptions to the modern format, and prescriptive guidance for how to shift their resource-consuming code fromLoadResource
to the modern API surface.