RobMensching.com /Blog
when setup isn't just xcopy

Posted by
Rob Mensching
Wednesday, July 22, 2009 9:32 AM

Under
wix

6 Comments

Burn packages, payloads and containers.

shipping containersIn my previous blog post where I introduced some of the features of Burn the question whether Burn would work as a single self extracting executable was asked a few times. The answer is, "Of course!" but there is actually more to it than that.

I debated listing "containers" as a feature in the previous blog post. Looking at the comments, it's pretty clear I should have. The "container" concept is still under some design tweaks but it is shaping up to be quite a powerful concept (and it addresses the question many asked).

So let me walk you through the list of primitives that Burn will process and how they stack together.

Packages

A package is a unit of change (install, repair, patch, uninstall) for the bootstrapper. Packages are members of a chain that the bootstrapper manages. There must be at least one package or the bootstrapper has no work to do. Each package has an implicit payload that is the entry point for the change (for example, an .MSI file or .EXE file). Additional payloads and containers may be referenced by a package.

Payloads

A payload is a file that contains data required by a package. The bootstrapper treats payloads as opaque blobs therefore there are no bootstrap related requirements for payloads. Payloads may be found as loose files outside the bootstrapper or combined with zero or more payloads in a container.

Containers

Containers are a way of combining one or more payloads into a single file. Usually containers are used compress the contained payloads to make the total distribution size smaller. Sometimes containers are used simply to minimize the number of files that must be distributed with the bootstrapper. The bootstrapper controls the format of the containers and is responsible for extracting payloads out of the containers during the cache phase.

The ideal container file format will optionally compress various file types well, support digital signatures and scale to very large file sizes while containing many payloads.

Attached container

An attached container is found at a specified offset in the bootstrapper itself. The container is called attached instead of embedded because it is found at the end of the bootstrapper, after all of the executable code and resources. There can be only one attached container. When the bootstrapper is signed the attached container is included in that signature.

It is expected many small products (< 300 MB when compressed) will distribute a single file bootstrapper where all of the product’s payloads are compressed into the attached container.

Detached containers

A detached container exists as a file outside the bootstrapper. The bootstrapper manifest can reference any number of detached containers. Detached containers are highly recommended when the combined size of the bootstrapper plus attached container would exceed 300 MB. Larger executable files experience poor start up performance on Windows leading to a less than ideal user experience.

Detached containers can also be used to optimize download scenarios because the bootstrapper will only request the containers referenced by packages being cached. For example, a very small bootstrapper would provide the optimal download + start up user experience then provide a custom user interface while the minimal number of detached containers are downloaded from the Internet.

Also note that if there are very few payloads and they are already compressed, it may be optimal to forego the use of detached containers completely. Containers do add overhead because they must first be downloaded before the payloads are extracted which requires more disk space and file I/O than simply caching the payloads directly.

Summary

The goal in Burn is to provide enough flexibility to meet everyone's needs. The WiX toolset will ship the tools necessary to create and bundle these primitives together. Ultimately, the decision how to organize your content into packages, payloads and containers is up to you.

I know there are many other questions about Burn. I'll get to them as soon.

 


6 Comments

Comment by
Christopher Painter
Wednesday, July 22, 2009 7:39 PM

Just a thought... it might be useful to just use terminology that already exists in the industry. People are going to understand compressed and uncompressed before they understand attached and detatched IMO. Also SMS has terms that are probably similar.

Comment by
Rob Mensching
Thursday, July 23, 2009 10:12 AM

@Christopher, we try to reuse words when there is no confusion about the words. When there are no existing computer words that apply then I tend to look to the real world and apply terms from there. The shipping industry is very akin to setup so I borrowed words from their world namely "containers" (wrappers around stuff) that carry "payload" (the stuff you care about). Hopefully, the word "package" is a setup term everyone is used to. :)

After that the words "compressed"/"uncompressed" and "attached"/"detached" are adjectives to describe something. You can have compressed payloads and uncompressed containers. We don't allow attached payloads but you can have detached payloads.

Hopefully, the authoring language for these things is simple enough that it is clear what each term means. More importantly, hopefully the defaults can hide most if not all of the complexity.

Comment by
Neil Sleightholm
Thursday, July 23, 2009 11:16 AM

First off Burn sounds like it is going to solve a lot of the issues I have with distributions.

I have a scenario that I think is covered by the above but just wanted to check: Install an application they requires .Net 3.5 - if it is shipped on a CD then the .Net3.5 install is on the CD, if it is a download then it should prompt to download if .Net3.5 if it is not already installed.

Comment by
Rob Mensching
Thursday, July 23, 2009 5:42 PM

@Neil, yeah, falling back from a local location to a download is in the list of features we want to do. It isn't in yet but it is oft requested and I don't think it will be too difficult to add.

Note that any prompting would be up to the UX DLL to handle but Burn will be able to detect if the .NET Framework is already installed and inform the UX DLL.

Comment by
Christopher Painter
Thursday, July 23, 2009 8:58 PM

I'm sorry, I didn't track that last statement. You don't allow attached payloads but above it also says payloads can be combined into to a container and containers can be attached.

I'm sure I'm just getting lost in the abstract and the actual implementation will make sense. Right?

Comment by
Rob Mensching
Friday, July 24, 2009 1:22 AM

@Christopher, to be very exact it says, "there can be one attached container" and (essentially) "containers may contain one or more payloads". So it is not possible to have an attached payload but you can have one or more payloads in a container that is attached.

And, yes, I think it will make sense when you use it. The limit of a single attached container is just a coding simplification. It probably won't matter at all in the end.

And, if it is still confusing, we'll fix it. :)

Leave a Comment

(optional)