****************************************************

         OVAL SQL & XML Definition Interpreters

              Build Instructions

    Copyright (c) 2004 - The MITRE Corporation

****************************************************

The MITRE Corporation developed the Definition Interpreters to 
demonstrate the usability of OVAL definitions in both the XML and 
SQL formats.  The source for the Interpreters is freely available
for reference use. This document describes the steps you need to
build each of the OVAL Definition Interpreters.

For information about using the Interpreters refer to the ReadMe.txt
file included with each Interpreter, or the OVAL Web site.

      XML Definition Interpreter:
      http://oval.mitre.org/oval/download/README_xml.html 

      SQL Definition Interpreter:
      http://oval.mitre.org/oval/download/README_sql.html 

BY USING THE INTERPRETERS, YOU SIGNIFY YOUR ACCEPTANCE OF THE
TERMS AND CONDITIONS OF USE.  IF YOU DO NOT AGREE TO THESE TERMS,
DO NOT USE THE INTERPRETER.  SEE THE TERMS.TXT FILE INCLUDED WITH
THE INTERPRETER, OR http://oval.mitre.org/oval/termsofuse.html.


-- CONTENTS --

  I    OVERVIEW
        A. Source Distribution
        B. Source Distribution Contents
        C. Supporting Libraries
  III  SQL DEFINITION INTERPRETER
        A. PCRE Library
        B. SQLite Library
        C. SQLite Source
        D. Building the SQL Definition Interpreter
  II   XML DEFINITION INTERPRETER
        A. PCRE Library
        B. Xerces Library
        C. Building the XML Definition Interpreter
  IV   PCRE
  V    SQLite
  VI   XERCES
  VII  TROUBLESHOOTING
  VIII REPORTING PROBLEMS

-- I -- OVERVIEW --

Download the appropriate installation files from the OVAL Web site.

  A. Source Distributions

       The source for the Interpreters is freely available on the OVAL
       Web site.  There is currently a .zip file for windows users that
       contains all the source code as well as a VC6 project for each
       interpreter.  To download the source go to:

            http://oval.mitre.org/oval/download/interpreter.html

  B. Source Distribution Contents

       The source code distribution contains the source for
       both the XML & SQL Definition Interpreters. The source distribution
       does not include the source for the libraries needed to compile the
       Interpreters. 


  C. Supporting Libraries

       The Interpreters rely on several c/c++ libraries that can be found
       on the web.  The supporting libraries are not included in the source
       distribution of the Interpreters.  See sections IV - VI for more 
       information about the specific libraries used and where to download
       their source from.
     
       
-- II -- SQL DEFINITION INTERPRETER --

The following instructions describe how to build the OVAL SQL Definition 
Interpreter on a Windows system.  The SQL Definition Interpreter has been
built on windows and tested on Windows 2000 and Windows XP Pro using VC6.
The source distribution includes a project file that has can be used to
build the Interpreter.  Before the Interpreter can be built the supporting
libraries must be installed. Follow the instruction below to setup and
install the supporting libraries.


  A. PCRE (Perl-compatible regular-expression) Library
 
       The simplest way to setup the PCRE library on a Windows system is to
       download just the "Developer files" (note: dowload 'Setup' not 'Zip')
       from:
       
          http://gnuwin32.sourceforge.net/packages/pcre.htm

       The download should be an executable that will install the developer
       files on your machine.  Run this setup program and follow the
       instructions provided.

       After the installation is complete you must add the PCRE lib and
       include directories to your VC6 environment. The menu to setup
       directories in VC6 can be found by clicking "Tools" then selecting
       "Options..." and selecting the "Directories" tab in VC6.  The
       <installed path>\gnuwin32\lib directory must be added as a location
       to search for library files and the <installed path>\gnuwin32\include
       must be added as a location to search for include files.       


  B. SQLite Library

       To install and configure the SQLite library first download the SQLite
       precompiled dll for windows. Download the file named "sqlitedll.zip."
       from:

          http://www.sqlite.org/download.html
     
       After downloading the sqlitedll.zip file unzip it.  (should contain
       two files, sqlite.def and sqlite.dll)  To create the sqlite.lib file,
       open a command windows and browse to the directory that contains the
       extracted SQLite.dll. At the command line type:

          lib.exe /def:sqlite.def

       NOTE: lib is a tool that comes with VC6 and/or the Windows Platform
       SDK.  To use it, you may have to add it to your path or use the full
       path to the application from the command-line.

       This will create the sqlite.lib file.  Finally, add the directory
       containing the sqlite.lib file as a location to search for library
       files in VC6.  The menu to setup directories in VC6 can be found by
       clicking "Tools" then selecting "Options..." and selecting the
       "Directories" tab in VC6.       


  C. SQLite Source

       Download the SQLite source (sqlite_source.zip) from:

          http://www.sqlite.org/download.html

       Extract the SQLite source to a convenient location. Then add the newly
       created directory containing the SQLite source as a location to search
       for include files in VC6.  The menu to setup directories in VC6 can be
       found by clicking "Tools" then selecting "Options..." and selecting
       the "Directories" tab in VC6.       


  D. Building the XML Definition Interpreter

      After setting up the PCRE and SQLite libraries open the provided VC6
      project for the SQL Definition Interpreter. The project is in:

         <installed path>\Interpreters\project\Win32\VC6\QueryInterpreter\
         QueryInterpreter.dsp

      From the build menu simply select "build" to build the SQL Definition
      Interpreter. Note that a "Debug" and a "Release" build configuration
      is provided. 


-- III -- XML DEFINITION INTERPRETER --

The following instructions describe how to build the OVAL XML Definition 
Interpreter on a Windows system.  The XML Definition Interpreter has been
built on windows and tested on Windows 2000 and Windows XP Pro using VC6.
The source distribution includes a project file that has can be used to
build the Interpreter.  Before the Interpreter can be built the supporting
libraries must be installed. Follow the instruction below to setup and install
the supporting libraries.

  A. PCRE (Perl-compatible regular-expression) Library
 
       The simplest way to setup the PCRE library on a Windows system is to
       download just the "Developer files" (note: dowload 'Setup' not 'Zip')
       from:
       
          http://gnuwin32.sourceforge.net/packages/pcre.htm

       The download should be an executable that will install the developer
       files on your machine.  Run this setup program and follow the
       instructions provided.

       After the installation is complete you must add the PCRE lib and
       include directories to your VC6 environment. The menu to setup
       directories in VC6 can be found by clicking "Tools" then selecting
       "Options..." and selecting the "Directories" tab in VC6.  The
       <installed path>\gnuwin32\lib directory must be added as a location
       to search for library files and the <installed path>\gnuwin32\include
       must be added as a location to search for include files.       


  B. Xerces Library

       Download and build version 2.5 of the xerces-c library. The source can
       be found at:

          http://archive.apache.org/dist/xml/xerces-c/

       From the win32 directory, select the "xerces-c-src_2_5_0.zip" link.
       Unzip the source and follow the build instructions on the xerces Web
       site:

          http://xml.apache.org/xerces-c/build-winunix.html#WinNT

       Be sure to build the WIN32 Release version. After building the xerces-c
       library add the location of the xerces-c.dll onto your path environment
       variable. 

       Finally, VC6 needs to be setup. First add
       
          <installed path>\xerces-c-src_2_5_0\src
       
       directory as a location to search for library files. Then add

          <installed path>\xerces-c-src_2_5_0\include

       as a location to search for include files. The menu to setup 
       directories in VC6 can be found by clicking "Tools" then selecting
       "Options..." and selecting the "Directories" tab in VC6. 


  C. Building the XML Definition Interpreter

      After setting up the PCRE and Xerces libraries open the provided VC6
      project for the XML Definition Interpreter. The project is in:

         <installed path>\Interpreters\project\Win32\VC6\DefinitionInterpreter\
         DefinitionInterpreter.dsp

      From the build menu simply select "build" to build the XML Definition
      Interpreter. Note that a "Debug" and a "Release" build configuration
      is provided. 

 
-- IV -- PCRE --

The Interpreters use the open source PCRE library.  The Interpreters
currently use version 4.4 of the PCRE library.  From the PCRE Web site:

  "Regular expression support is provided by the PCRE library 
   package, which is open source software, written by Philip Hazel,
   and copyright by the University of Cambridge, England."

For more information about PCRE visit:

    http://www.pcre.org

To download the source code for PCRE, please use the following ftp
site:

    ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

-- III -- SQLite --

The OVAL Query Interpreter uses the open source SQLite.  From the
SQLite Web site:

  "SQLite is a C library that implements an embedable SQL database
  engine...SQLite is not a client library used to connect to a big
  database server.  SQLite is the server.  The SQLite library reads
  and writes directly to and from the database files on disk."

By default, the database file created by the OVAL Query Interpreter is
called 'data.slt'.

For more information about SQLite, or to download the source code for
the database engine, please visit the SQLite Web site at
www.sqlite.org.

-- V -- XERCES --

The Definition Interpreter uses the open source Xerces library.  The
binary was compiled with version 2.5 of the xerces-c library.  From
the Xerces Web site:

  "This product includes software developed by the Apache Software
  Foundation (http://www.apache.org/)."

For more information about Xerces visit:

    http://xml.apache.org

The source code is also available at the above Web site.

-- V -- REPORTING PROBLEMS --

To report a problem with either OVAL Definition Interpreter, please
send an email with a brief description of the problem to 
oval@mitre.org. Include the platform the Interpreter was run on, and
the version of the Interpreter and definitions file.

