Project Omaha can be quite tedious to compile under Windows XP due to some of its aspects being outdated. Below are the steps I used to get Omaha successfully building on June 1st, 2011.
The first step is to download all of the dependencies Omaha requires to build.
The following packages should be downloaded and installed in the following order (as they have Windows installers):
The following dependencies do not have installers and must be downloaded to a folder of your choice, which will be referenced later. In my case I will use C:\utils.
The next step is to set up all of your various dependencies to make sure that Omaha can find them. In order to do this you will need to Add and Edit some various environment variables. This can be done by right-clicking on My Computer, selecting Properties, going to the Advanced tab, and clicking Environment Variables.
First we need to add python to the global Path, so find the Path environment variable, and append the path to your installed python 2.4 instance to it (in my case, I added “;C:\Python24”).
Next we need to tell the system where to find SCons. This is done by adding a variable called SCONS_DIR, and adding the path to SCons. This should be under “[your python24 dir]\Lib\site-packages”. (in my case, I set SCONS_DIR to “C:\Python24\Lib\site-packages\scons-1.3.1”).
The next step is to download and extract the Omaha source code. You can find it here. At the time of this writing, I used version r104.
Once you've downloaded the source release, extract it anywhere, but YOU MUST NAME THE FOLDER YOU EXTRACT IT TO “omaha” (in my case, I extracted to “C:\omaha”).
Once that's done, go back into the Environment Variables setup, and set the following variables:
Lastly, create a file in your base Omaha directory called envsetup.bat, and point it to the VS2008 VCVarsAll batch file. This will be used to set up our environment before building. It should contain the following:
@call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
There are some problems with building Omaha with Visual Studio 2008. These caveats need to be taken care of before we build.
Omaha uses ATLMFC, which was being phased out after Visual Studio 2005, so Visual Studio 2008 is missing a few of the required header files in order to build it, specifically atlrx.h.
To get around this, first download the ATL Server zip (at the time of this writing, version 9.0.70425_Alpha), and copy the include/atlrx.h file from inside the zip to the ATLMFC/Include directory of Visual Studio 2008 (in my case “C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include”).
This should solve problems with missing headers.
If you have Visual Studio 2010 installed on the same machine you intend to build on, it will cause a huge slough of errors. This is because for some reason, Omaha tries to use Visual Studio 2010's version of ATLMFC, even though our envsetup.bat file specifies to use the Visual Studio 2008 ones.
I am not sure why this happens, but the easiest solution is to rename the Visual Studio 2010 folder before building, and rename it back afterwards. This will break the VS2010 paths and cause Omaha to fall-back to the VS2008 paths.
In my case, I ended up renaming “C:\Program Files\Microsoft Visual Studio 10.0” to “C:\Program Files\Microsoft Visual Studio 10.0hideme” and back again.
Time for it to get fun. Now you need to open a new command window. To do this go to Start → Run… and type “cmd”.
Now first change directories to your omaha directory.
cd C:\omaha
Then run your environment setup to update environment variables to point to VS2008
envsetup
Lastly, start the build (it's HAMMER time!)
hammer
If all goes well, you should get a working build output to the scons-out directory.