To be clear: this has nothing to do with assembly language (nasm, masm and the like). This project is meant to assemble all parts of SharpSetup installer that I have been writing about before into one executable file that can be deployed to the client.

To create a fully functional installer you don't even have to touch the Assembler project. All required parts (bootstrapper, intermediate bootstrapper, configuration, SharpSetup.dll library, main Gui, translations, msi and cab files) will be packaged automatically. However, should you want to split files in your Package project among two or more cab files or add a library required at installer runtime you will need to add those files to a list of files packed into final executable. Note that when you add files to your installer (in .wxs file) there is no need to add it seperately in Assembler project.

The list of file that need to be packaged is maintained as links to files inside Assembler project. To add a new file you should right-click on the project node, click on Add -> Existing Item..., select the file you want to be added and click Add as Link button. In most cases you will be adding links to files that exist in either Debug or Release folder of your project. In those cases Visual Studio will save links using relative paths and SharpSetup build configuration will make sure that when you build Debug version of the solution then files from Debug directory are packaged and when you build Release version of the solution then files from Release directory are used.

For the file to be packaged you also need to specify ItemType (see Properties window). This can be either IncludeInCab in which case the file will simply be placed "as is" in the final executable (and in the extracted directory at installation time). This setting is suitable for all file types. On the other hand for .cab files you have the option (but not the obligation) to use a different type: IncludeInCabExtracted. When .cab file has this setting it is unpacked (extracted) and then individual files contained in it are packaged into final executable. This mechanism is used in case of translation files (Gui.translations.cab, SharpSetup.translations.cab). This makes adding each individual satellite assembly unnecessary and thus simplifies adding translations (yes, I know that it is already quite complex but version 1.2 of SharpSetup will bring considerable improvements in this area).

The result of building Assembler project is final executable file (for example Installer1.exe) that can be shipped to the client. Typically you will not build all projects every time but only the ones you are modifying at the moment (for the most time Gui and Package projects) with others disabled in build. This may lead to a situation when final executable (even if build recently) does not contain the most up to date components. Therefore my advice is that you set up an automated build process (for example using TFS Build or CruiseControl.NET) and publish only installers that result from this build.

Previous in series: FeatureTree control

This article concludes the series about basic SharpSetup concepts. You can find more information about SharpSetup on the documentation page and wiki.