Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS with no warranties, and confer no rights. Additionally, views expressed herein are my own and not those of my employer, Microsoft.
I previously posted an example of how to use WiX to build an MSI-based installer for a Windows Media Center application. In that example, I created an installer for the Q podcast and video blog client sample application that is included in the Windows Media Center SDK for Windows Vista, and I used WiX v2.0.
Since then, I have been asked by a few customers about how to create an equivalent installer using WiX v3.0. I decided to try converting the sample installer files for the Q sample application that are installed by the Windows Media Center SDK to WiX v3.0 format to determine what work would be required. There are several changes required to get everything working correctly in WiX v3.0, so I am going to post an updated set of setup files, scripts and instructions to demonstrate how to create an MSI-based installer for a Windows Media Center application using WiX v3.0.
One of the biggest additions in WiX v3.0 is MSBuild integration for the Votive Visual Studio add-in for WiX. This means you can create a Visual Studio project (named a .wixproj), add it to the solution with the Q sample application, and directly build an MSI for your applications after building the binary files that make up your application. You can also use MSBuild command lines to build your binaries and MSI directly without using the Visual Studio UI.
Votive (like all Visual Studio add-ins) is only supported on Visual Studio 2005 standard edition and higher, so I am going to post 2 separate sets of instructions - one that is similar to the instructions in the Windows Media Center SDK and uses a batch file to build the MSI using WiX tools (so that you can build an MSI using Visual C# 2005 Express Edition if desired); and the other that uses Votive to create a .wixproj and build the MSI using MSBuild within the Visual Studio IDE.
Building an MSI for Q by calling WiX tools directly
The following steps can be used to build an MSI for the Q sample application from Visual C# 2005 Express Edition or Visual Studio 2005 by adding a post-build step that executes a batch file that will call the WiX compiler (candle.exe) and linker (light.exe):
The above steps will produce an MSI named Q_Podcast_Client.msi in %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q\bin\release (or \bin\debug\ for the Debug version of the Q application).
Building an MSI for Q using Votive
The following steps can be used to build an MSI for the Q sample application directly from Visual Studio 2005 using the Votive WiX add-in:
The above steps will produce an MSI named Q_Podcast_Client.msi in %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q\QWiXv3\bin\release (or \bin\debug\ for the Debug version of the Q application).
How to add a .wixproj to an existing Windows Media Center application solution
If you would like to add a .wixproj to your own Visual Studio 2005 solution, you can use steps similar to the following. These are the steps I used to create the project files used in the steps above:
The above steps will produce an MSI in %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q\<your WiX project name>\bin\release (or \bin\debug\ for the Debug version of the Q application).
Changes made to Q setup to convert the setup files from WiX v2.0 to v3.0
If you are interested, the following is a summary of the changes that I made to convert the WiX setup files for the Q sample application from v2.0 format to v3.0 format:
<update date="1/23/2007"> Removed Visual C# Express from the list of possible Visual Studio versions in the steps for using Votive to build the Q installer. The Visual Studio 2005 Express Editions do not support installing add-ins, so Votive (like all Visual Studio add-ins) requires Visual Studio 2005 Standard Edition or higher. </update>
Recently, I posted a set of instructions for creating an MSI-based installer for a Windows Media Center
A little while back, I posted a set of instructions for converting the setup project for the Q podcast
I previoulsly posted an introduction to a new open source Media Center Markup Language (MCML) user interface
As described in this blog post , a set of custom actions was added to the WiX toolset last year to make
The March 2007 edition of MSDN Magazine contains an in-depth article describing how to use WiX v2.0 and
Recently, I was helping a friend test an installer for a Windows Vista Media Center application and ran
I haven't been keeping up with the Media Center Sandbox forums as well as I would like to lately, and
In the past, I've posted examples (such as this and this ) demonstrating how to create installers for