From OPeNDAP Documentation

<< back to HowTo Guides

Making Windows XP Distributions

Our software builds under Windows XP using the 'Express Edition' (aka free) versions of Microsoft's compilers. As of this writing, the builds have been completed using Visual Studio 9 Express (April 2008). Two other things need to be recognized: We run our builds using the nmake command line tool, and that means various environment variables need to be set before the Makefiles work, and Most of our code uses libdap and that, in turn, uses a variety of third-party software that must be installed. It might seem complicated, however, the entire process can be completed pretty quickly by following the directions.

Suggestion: Set up a virtual machine to run XP and do the builds on that. I used this approach and found that a VM with 16GB of disk space was adequate for the build tools plus Matlab and some other stuff.

For each package that has been ported to XP there is a subdirectory within that project named 'VCPP' which holds a Makefile and other maybe other files. Do the build in this directory. Also note that there is a project named 'VCPP' which has more detailed directions for building most of our client-side software.

Note: You may have to fiddle with XP's environment variables to get the builds to work. To set environment variables in WinXP, right click on 'My Computer' in the Start menu, select 'Properties', choose 'Advanced' from the tabs and finally click on the button labeled 'Environment Variables.' They don't really want most users to change these, I guess. ;-)

General outline of Windows XP builds:

  1. First get and install Visual Studio 9.0 Express (which is also Visual Studio 2008 Express).
  2. Get and install SVN.
  3. Check out the VCPP project - this includes directions for all of the builds plus the 'opendap-tools' zip file.
  4. Get the OPeNDAP Tools 1.1 installer. This will install the libraries, tools and headers that you will need to build libdap. You can look at the directions in !HowToBuild.txt found in the VCPP project and use the opendap-tools zip file instead, but it requires setting a bunch of environment variables and the installer does that for you. If you use the OPeNDAP Tools 1.1 installer you should skip the next step.
  5. If you don't use the OPeNDAP Tools installer described in the previous step... Install the opendap-tools software.
    • Unzip the tools & set the paths. There are a few steps here, look at the !HowToBuild.txt file to see how the environment variables are set.
    • Set the paths for both the Visual Studio compiler and the tools. I used an environment variable to name the location of the compiler and SDK and then used that env var in the PATH, include and lib env vars (this will be clearer once you read the instructions in VCPP).
  6. Check out the projects you want to build (generally this means libdap plus some other stuff). Check them out into the \opendaproot directory that is discussed in the VCPP project's documentation. Some of the builds - and the Inno Setup control files - expect a certain directory organization so don't stray far from the documentation's instructions with regard to path names.
  7. For each project (e.g., libdap), cd to the VCPP subdirectory of that project and look for any directions there.
    • Update version numbers in config.h
    • copy over any headers that would be generated by configure
    • Run nmake all, install and package
  8. Get and install Inno Setup if you want to make installer-style distributions
  9. The ocean_toolbox_xp project contains information about making a Inno Setup installer. It should be easy to adapt this to other projects besides the Ocean Data Toolbox.