Search code examples
windows-store-appswindows-8.1

What does generating an app bundle in Windows 8.1 do?


Windows 8.1 introduced a new feature in the packaging section of the manifest called "Generate app bundle". It says that "Consider generating an app bundle if your app contains language-specific resources, a variety of image scales, or resources that apply to specific versions of DirectX. If you don't generate one, your app will run just fine, but users will have to download a larger app. For more information about app bundles, see App Packaging."

But users can change their language or run the app on a variety of different monitors at any time without reinstalling the app. So how does this feature work, what is it doing?


Solution

  • Basically, the App Package is split up into modular chunks. Each library that you use is split up into its component dll's. The language resources are also split up into a different chunk for each language.

    This does a few things. For instance, let's say you have two games, BlackJack and Spades. Both of them use the same base engine, with the same images and base game logic. All of these are included in your 'BaseCardGame' library. In the bundle, it will keep a log of the BaseCardGame library and include it in the bundle. Now, let's say you have a user who downloads both of these apps (as you hope they would). The bundle says "I need the BaseCardGame library with XXXXX signature." Your system says "I already have that, so bundle me up the rest of the stuff that I don't have." So your users only have to download that package once.

    The same thing is true for the language resources. If they have only added to their system French and Italian, then it's unlikely they're going to need the Ukrainian language information. So, they don't have to download that. Note: It does not have to be the language they have currently set, only the languages they have added to their system. If they then add a new language, the system will go and get the language packages for the apps that have them.

    This is all at a high level, but describes the basics of the bundling system. Channel 9 has quite a few good videos on it.