Background:
I always try to ensure the following tenet in my projects:
After a fresh checkout a developer should be able to do all project related tasks with solely the contents of the combined folders.
Obviously, this isn’t always possible (e.g. Visual Studio for Windows development). However, I really dislike having to install any third-party libraries or tools that are specific a project like log4net, NHibernate, NUnit, etc. There are number of reasons for this including:
- For a given development machine, you may work on several different projects, all which leverage different versions of the same third-party library or tool.
- Minimizing the environment setup requirements makes setting up new developers or machines much easier
- Facilitates easier maintenance of automated builds
Assumptions/Contraints
- I am currently using WiX 3 beta, but if there is way for either 2.0 or 3.0 please respond
- I am using Visual Studio 2005
- The IDE syntax highlighting is not a requirement.
Question:
Is it possible to avoid local installation of the WiX toolset and use flat files instead? If so, please explain how.
First, build your WiX installer:
Now, to integrate the WiX toolkit into your source tree:
c:\Program Files\Windows Installer XML v3\binto a sub-directory in your source tree. I usedWiX\binrelative to my .wixproj file.c:\Program Files\MSBuild\WiX\v3.0\to a subdirectory in your source tree. I usedWiX\v3.0relative to my .wixproj file.<WixTargetsPath Condition=' '$(WixTargetsPath)' == ''>$(MSBuildExtensionsPath)\Microsoft\WiX\v3.0\Wix.targets</WixTargetsPath>With the following lines:
<WixToolPath>$(MSBuildProjectDirectory)\WiX\bin\</WixToolPath> <WixTasksPath>$(MSBuildProjectDirectory)\WiX\v3.0\WixTasks.dll</WixTasksPath> <WixTargetsPath>$(MSBuildProjectDirectory)\WiX\v3.0\Wix.targets</WixTargetsPath>As you can see, the
WixToolPath,WixTasksPathandWixTargetsPathdirectives reflect the location of the folders I’ve instructed you to copy.Using this method, the WiX directory as described is about 9MB large.