New in Windows 8.1 store apps: a way to separate your app from your resources
July 21, 2013 Leave a comment
One of the biggest complaints about the Windows 8 Windows store app approach to dealing with localization (separate translations for each language you decide to support), was the inability to decouple the various localizations from the main app.
As I’ve talked about in previous blog posts, the satellite DLL approach to Windows desktop apps, is an excellent one that can be used successfully with a lot of manual work (and can be automated quite easily when targeting Vista and above platforms). But in Windows 8 store apps, there was no real analogy to this.
Windows 8.1 introduces a new type of package, a resource package. MSDN describes it well here, I’ll provide a brief summary:
A resource package is a subset of your app that is used to provide language, scale, and DirectX features. When you deploy an app to a machine, the decision is made whether you need one or all of the resource packages. The app package itself can be deployed to a user’s machine with none of the resource packages, one of them, or all of them, depending on the particular needs of that machine. This is great for 2 reasons: it potentially increases download speed and reduces disk space.
An app bundle manifest (.appxbundlemanifest) is what describes your app’s package and all its resource packages.
The great thing about this new system, is that Visual Studio 2013 automatically handles this for you (separates the resources into separate resource packages).
There is also a package API that allows you to get information about packages, and a sample has been prepared by Microsoft and is found here:
as well as another great sample that shows you how this resource package approach could be used in a game:
If you’re ok with targeting Windows 8.1 for a future Windows Store app (see previous blog posts on pros and cons of targeting Windows 8 vs Windows 8.1), this is an excellent new system that I believe will be a great boon for developers.