Team Foundation Build Recipes
Navigation
Main Page
Browse Recipes
Add New
Request a Recipe
Login/Logout
Create Account
All Pages
Categories
File Management
Your Profile
Administration
Quick Search
Advanced Search »
Back
History
WiX MSI Setup Package
===Description=== Nothing special needs to be done to build a WiX v3 project in Team Build. All you need to do is: * Install a recent version of WiX on your build server * Install the same version of WiX on your development machine(s) * Add a *.wixproj project to your solution, and get Team Build to build it. In WiX v3, the project file format was changed to be an MSBuild script (*.wixproj). That means that it functions exactly like a *.csproj or *.vbproj project in VS2005+. This recipe shows you how you can make your WiX script more generic using preprocessor variables and not have to hardcode or guess file paths. It works for Visual Studio (Ctrl-Shift-B) builds, Desktop Builds and Team Builds. Reference: [http://www.resumesplanet.com|professional resume service],[http://shirtsdress.com|shirts dress] ===Where do I get WiX from?=== I suggest downloading one of the recent weekly releases from here: [http://wix.sourceforge.net/releases/] This is because the 'official' releases [http://wix.sourceforge.net/downloadv3.html|here] are quite stale and you miss out on important bugfixes. [http://www.checkstdsymptoms.com|std symptoms] ===Special Preprocessor Variables for file paths=== If you include the WiX v3 project in your application's solution file, you can make use of these special preprocessor variables. Most people start off by using relative paths in their *.wxs scripts to get to the binaries that MSBuild has just built. The downside of this is that depending on how you call MSBuild, the output path can be quite different. For example, if your application outputs MyApplication.exe it might go to any number of these locations: * \bin\Debug\MyApplication.exe * \obj\Debug\MyApplication.exe * \obj\Release\MyApplication.exe * or even ..\Binaries\Release\MyApplication.exe if you use Team Build If you add a ''Project Reference'' from your WiX (Votive) project to the other projects, WiX makes available extra preprocessor variables for these projects. You can then do things like this: @@ <!-- For a project with the project name MyApplicationProject --> <File Id="MyApplication" Name="$(var.MyApplicationProject.TargetFileName)" Source="$(var.MyApplicationProject.TargetPath)" DiskId="1" /> @@ ===Sources=== * Preprocessor variables [http://blogs.msdn.com/jrock/archive/2008/01/29/complete-list-of-candle-preprocessor-variables.aspx|Justin Rockwood's Blog - List of Candle Preprocessor Variables] ===Usage=== Add to your WiX scripts (*.wxs). ===Notes=== * WiX is the technology used to build the installer of many Microsoft software packages (including: Visual Studio, SQL Server and Office). * There are a few GUIs for helping you build WiX scripts, but most people use Visual Studio's XML editor because it includes IntelliSense. * Some of the GUIs are: [http://www.wixaware.com/|WiXAware] and [http://wixedit.sourceforge.net/|Wix Edit] * [http://robmensching.com/blog/archive/2007/11/26/Visual-Studio-ships-the-WiX-toolset.aspx|WiX will be integrated into the next version of Visual Studio - Codename "Rosario"] sponsored by: [http://www.cheappoolproducts.com/Pool~Covers~Accessories_50~supplies.html|cover pools]
© 2008 William Bartholomew
blog.bartholomew.id.au
Powered by
screwturn wiki