Building and testing VDSF on Windows
Software needed to build the software
The minimal software required to build the package from a zip file:
Visual Studio 6 (or later version, possibly), including nmake. It is untested with a Posix layer (cygwin and others) and more recent versions of Visual Studio.
The C compiler and linker can be run from the command line. Your Visual Studio installation must be set for this. If this is not the case, Microsoft provides a batch file to create the needed environment variables (for VC++ 6) - VCVARS32.BAT (for later versions of Visual Studio, please consult the documentation).
- VB Script 5.6 (or later) is also needed (the default for Windows XP) if you want to be able to run the tests. Microsoft provides a free download for Windows 2000 under the name Windows Script 5.6 but access to the download requires "genuine validation"...
Warning: building the documentation on Windows was never attempted.
- If you want to retrieve the software directly from the repository, you will need a subversion client for Windows. Tortoise is one possible choice.
- Inno Setup is needed to build the Windows package.
Step by step instructions to build directly from the repository.
Warning: these instructions are no longer complete! As an example, the newer version of VDSF (in the repository) uses two additional packages, libxml2 and Error Parser. Error Parser is only needed if you change the code - libxml2 on the other hand is mandatory (and is usually not found on Windows workstations, you will have to install it first).
Furthermore, the code in the repository is often in an unstable state (the Subversion message logs are a good indicator of the current status, some times...).
Retrieve the latest version of vdsf, using the following repository:
Of course, this will only retireve the main trunk. You can omit the sub-directory trunk to retrieve everything, including the files needed to build the web site.
- The remaining instructions are similar to the instructions for building the software from a zip file.
Step by step instructions to build the package from a zip file.
- Unpack the zip file (evidently).
You might want to examine/change some of the values in src\config-win32.h to tailor the package to your needs:
- VDSE_BLOCK_SIZE and VDSE_BLOCK_SHIFT. These set the size of vdsf blocks (blocks are the basic unit of memory allocation just like pages are for operating systems - the name is different to avoid confusion). Legal values for blocks size are 1024, 2048, 4096, 8192 and 16384 - the default is 8192. The shift must be set appropriately (10 for 1024 since 1024 is equal to 2 to the power 10 (or in computer terms is equal to 1 shifted 10 bits to the left). You may want to set the block size at a lower value if you have many small objects and/or have small amount of RAM.
- USE_DBC. Add contract-validation checks to the code. You might want to disable this on production systems for performance reasons. It is on by default.
The command to build the software:
nmake -f Makefile.win32
This will build both the release and debug versions. The output files (DLL, etc.) are put in src\Release and src\Debug.
- You can also use the workspace file, vdsf.dsw, located in the src directory. This workspace and the associated project files will build the core of the package (.DLL, vdswd.exe) and utilities (vdssh.exe, etc.) BUT they will not build or run the tests (too many tests, over 800 of them).
If you want to run the tests, use the command:
nmake -f Makefile.win32 check
If you do it, be patient - it can take a long time (more than 9 minutes on an Intel (R) core duo E6600). Don't forget to copy the vdsf DLLs (and vdswd.exe) to a directory included in the path (or add the Your_VDSF_DIR\src\Release to your path).
Other possible make targets are clean and checkdebug. Be warned however that the current setup does not check dependencies - you will likely have to use the clean target to force a recompile.
- To build the installation, open src\Packages\vdsf.iss with Inno Setup. Compile it. The self-extracting .exe should be in src\Packages\Output.
That's it, all done!
- If you want to run all the tests, have a look at the Optional directories. These tests are not run by default since they may require additional resources not always present on a computer.
- The documentation is available as a PDF (in the doc directory) and on-line. If you want to have the html documentation locally, modify the file doc/doxyfile.vds_c (set GENERATE_HTML to YES) and execute the command doxygen doxyfile.vds_c.
Last updated on June 06, 2008.