Converting the Z sample application to use WiX v3.0 and Votive
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):
- Install Windows Vista Home Premium or Ultimate Edition
- Install Visual C# 2005 Express Edition or Visual Studio 2005 standard or higher
- Install the Windows Media Center SDK for Windows Vista
- Install the latest version of WiX 3.0 from https://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
- 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
- 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
- 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
- Right-click on the Z project in the Solution Explorer and choose Properties
- Select the Build Events tab
- Add a new entry to the Post-build event command line text box that says "$(ProjectDir)\SetupWiXv3\build_z.bat" $(ConfigurationName)
- Click on the File menu and choose Save All
- 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.
- Install Windows Vista Home Premium or Ultimate Edition
- Install Visual Studio 2005 standard or higher
- Install the Windows Media Center SDK for Windows Vista
- Install the latest version of WiX 3.0 from https://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
- 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
- Right-click on the shortcut for Visual Studio 2005, choose Run as administrator and click Continue to launch Visual Studio with elevated privileges
- 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
- In the Visual Studio Build menu, choose Batch Build...
- 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.
Comments
Anonymous
February 20, 2007
I previoulsly posted an introduction to a new open source Media Center Markup Language (MCML) user interfaceAnonymous
July 25, 2007
In the past, I've posted examples (such as this and this ) demonstrating how to create installers forAnonymous
July 25, 2007
In the past, I've posted examples (such as this and this ) demonstrating how to create installers