Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

Converting the Z sample application to use WiX v3.0 and Votive

Converting the Z sample application to use WiX v3.0 and Votive

  • Comments 3

A little while back, I posted a set of instructions for converting the setup project for the Q  podcast sample application that is a part of the Windows Media Center SDK for Windows Vista to use WiX v3.0 and the Votive add-in for Visual Studio 2005.

I decided to use those instructions to create updated setup files for the Z sample application as well.  The following sets of steps will allow you to use WiX v3.0 and Votive to build an installer for the Z sample application that is included in the Windows Media Center SDK for Windows Vista.

Building an MSI for Z by calling WiX tools directly

The following steps can be used to build an MSI for the Z 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):

  1. Install Windows Vista Home Premium or Ultimate Edition
  2. Install Visual C# 2005 Express Edition or Visual Studio 2005 standard or higher
  3. Install the Windows Media Center SDK for Windows Vista
  4. Install the latest version of WiX 3.0 from http://sourceforge.net/project/showfiles.php?group_id=105970&package_id=168888. You need to install the ProjectAggregator2 MSI and then the WiX 3.0 MSI
  5. Download this zip file with updated Z setup files and extract the contents to the Z project directory. The Z project will be installed to %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Z if you installed the Windows Media Center SDK to the default location
  6. Right-click on the shortcut for Visual Studio 2005 or Visual C# 2005 Express Edition, choose Run as administrator and click Continue to launch Visual Studio with elevated privileges
  7. Open Z.sln - it will be installed to %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Z if you installed the Windows Media Center SDK to the default location
  8. Right-click on the Z project in the Solution Explorer and choose Properties
  9. Select the Build Events tab
  10. Add a new entry to the Post-build event command line text box that says "$(ProjectDir)\SetupWiXv3\build_z.bat" $(ConfigurationName)
  11. Click on the File menu and choose Save All
  12. Click on the Build menu and choose Rebuild Solution to build the Z binaries and then run build_z.bat

The above steps will produce an MSI named Z_Sample_Application.msi in %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Z\bin\release (or \bin\debug\ for the Debug version of the Z application).

Building an MSI for Z using Votive

The following steps can be used to build an MSI for the Z sample application directly from Visual Studio 2005 using the Votive WiX add-in.  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.

  1. Install Windows Vista Home Premium or Ultimate Edition
  2. Install Visual Studio 2005 standard or higher
  3. Install the Windows Media Center SDK for Windows Vista
  4. Install the latest version of WiX 3.0 from http://sourceforge.net/project/showfiles.php?group_id=105970&package_id=168888. You need to install the ProjectAggregator2 MSI and then the WiX 3.0 MSI
  5. Download this zip file with updated Z setup files and extract the contents to the Z project directory. The Z project will be installed to %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Z if you installed the Windows Media Center SDK to the default location
  6. Right-click on the shortcut for Visual Studio 2005, choose Run as administrator and click Continue to launch Visual Studio with elevated privileges
  7. Open ZWiXv3.sln - it will be installed to %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Z if you installed the Windows Media Center SDK to the default location
  8. In the Visual Studio Build menu, choose Batch Build...
  9. Select the configurations you want to build and click the Rebuild button to build them

The above steps will produce an MSI named Z_Sample_Application.msi in %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Z\ZWiXv3\bin\release (or \bin\debug\ for the Debug version of the Z application).

Hopefully, the sample WiX v3.0 files for both Q and Z will be included in a future version of the Windows Media Center SDK.

  • I previoulsly posted an introduction to a new open source Media Center Markup Language (MCML) user interface

  • In the past, I've posted examples (such as this and this ) demonstrating how to create installers for

  • In the past, I've posted examples (such as this and this ) demonstrating how to create installers

Page 1 of 1 (3 items)
Leave a Comment
  • Please add 8 and 7 and type the answer here:
  • Post