Now that Rob moved the WiX source repository and releases to Codeplex, how you interact with the WiX source code changes. Before the move to Codeplex, we published a .zip file that contains most—but not all—of the files needed to rebuild WiX. (Some large binary files were omitted because of space limitations at SourceForge.) For example, http://wix.sourceforge.net/releases/3.5.1811.0/wix35-sources.zip contains the source code as of the 11-June-2010 release of WiX v3.5. For now, we’re continuing to publish those files but the move to Codeplex makes them pretty much obsolete.
I’m writing a couple of posts that talk about how to use the WiX source repository to view, modify, and patch the WiX source code.
Getting WiX source code
Getting WiX source code out of Mercurial is straightforward using TortoiseHg:
- Install TortoiseHg.
- Use Explorer to create a directory where you want to store the source code. I used “wix” in the root of my X: drive.
- Right-click the directory you created in step 2 and choose TortoiseHg|Clone.
- In Source path, enter https://hg01.codeplex.com/wix. That’s the Mercurial clone URL, provided by Codeplex. You can see it for your self by going to https://wix.codeplex.com/ then clicking the Source Code tab and clicking Mercurial in the Source Control Setup box in the right bar.
[<img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TortoiseHg Clone" border="0" alt="TortoiseHg Clone" src="/wp-content/uploads/2010/06/TortoiseHgClone_thumb.png" width="476" height="148" />](/wp-content/uploads/2010/06/TortoiseHgClone.png)
- Click Clone. TortoiseHg will fetch many “chunks” from Codeplex. It’ll take a while, depending on your Internet connection speed. Your patience is rewarded with a directory that contains one subdirectory and two files (at least as of today). Huh? All you’ve done so far is cloned the WiX Mercurial repository. Next up is updating your working directory with a particular revision of that repository. (The default branch in the WiX repository contains no interesting files; all past and active development is happening on the named branches wix20, wix30, and wix35, shown below in green.)
- Right-click the directory you created in step 2 and choose Hg Repository Explorer. You’ll get a window that contains the changes that have been committed to the Mercurial repository.
- Right-click the line representing the version you’re interested in and choose Update. To get the latest version, look toward the top for the version with the yellow “tip” box.
- Click Update to get the version you selected.
The directory now contains a WiX source enlistment. Up next: creating patches against a clone of the official repository.