
***********************************************************************
*        H4H5 Install Instructions for Windows XP/VISTA               *
*                         (Full Version)                              *
***********************************************************************

The following instructions assume that the H4H5 binary code package 
from HDF website (http://hdfgroup.org) is used.

Warnings:
Please read CAREFULLY about the following preconditions and notes first.

Contents:

   Section       :  Preconditions and Notes
   Section I     :  What do we provide?
   Section II    :  Helpful Pointers


========================================================================
                          Preconditions and Notes
========================================================================

Preconditions:

   1. Installed Microsoft Visual Studio.  This document is written for Visual
      Studio 2008. Express Editions may work with the project files
      but not from the command line. We do not support the Express Editions.
   
   2. Install Winzip or 7-zip for extracting source tarball.

      Note: 1. 7zip is an open-source alternative to WinZip.  Some of the
            advanced functionality is disabled in WinZip unless you buy the
            software.  With 7zip, most of this functionality is included for
            free.

   3. Set up a directory structure to unpack the library.  For example:

         c:\                                (any drive)
         MyHDFstuff\                     (any folder name)

   4. Download the h4h5tools binary code package and use 7zip or WinZip to
      extract the H4H5 package into c:\MyHDFstuff\h4h5tools.

   5. H4H5 provides options to do in-memory compression  within H4H5 library.  
      Currently, two external compression libraries Zlib and Szip can be used 
      with H4H5.

      5.1 H4H5 uses Zlib version 1.2.5 for compression and Zlib is 
          distributed with H4H5 library in this release.

      5.2 H4H5 uses Szip version 2.1 for compression and Szip compression 
          software is provided with H4H5 products in this release.

          Please note that Szip is not a totally open-source free software.  
          For licensing issue of Szip, please check "Licensing terms" at
          http://hdfgroup.org/doc_resource/SZIP/index.html.

          Szip compression feature inside H4H5 is enabled by default.

      5.3 H4H5 uses JPEG release 6b or 8b for HDF4 and JPEG is 
          distributed with H4H5 library in this release..
      
   6. Define the following environment variables: 

          HDF4_EXT_ZLIB
          HDF4_EXT_JPEG
          HDF4_EXT_SZIP
      
      To define these environment variables:
      
      Click "Start", click "Control Panel", and then double-click
      "System".  On the "Advanced" tab, click "Environment Variables".
      
      If you are logged on as administrator to the local computer AND
      want to let all other users use these three environment variables,
      click "New" under "System Variables" box; otherwise, click "New"
      under "User Variables" box.
      
      In the New Variable window, set "Variable name" as HDF4_EXT_ZLIB
      and "Variable value" as zlib1.lib, then click OK.
      
      Similarly, you can set:

      HDF4_EXT_JPEG environment variable as libjpeg.lib
      HDF4_EXT_SZIP environment variable as libszip.lib
      
      and also the paths for:
      
      HDF4_PATH environment variable as c:\HDF4
      HDF5_PATH environment variable as c:\HDF5

      Notes:

         a. You might have to close and reopen running programs for the
            new environment variable settings to take effect. 
      
   7. Set up paths for libraries and headers
 
      Invoke Microsoft Visual Studio and go to "Tools" and select
      "Options", find "Projects", and then "VC++ Directories"
      
      7.1 Find the box "Show directories for", choose "Include files",
           See whether you can find the include path of HDF4, HDF5
           and external libraries.  For example:

              c:\zlib125\include 
              c:\szip21\include
              c:\jpeg-8b (or jpeg-6b)
              c:\HDF5\include
              c:\HDF4\include

           If not, add the above pathes to the included directories.
      
      7.2 Find the box "Show directories for", choose "Library files",
           Make sure that you have the following paths added to the box:

              c:\zlib125\lib
              c:\szip21\dll
              c:\jpeg-8b (or jpeg-6b)
              c:\HDF4\lib
              c:\HDF5\lib
      
   8. Only Visual Studio 2008 is supported on Windows in this release.  Visual
      Studio 2008 is available as an "express" version free of charge from
      Microsoft.  If you are using older versions of Visual Studio, we recommend
      you upgrade.  We no longer support VS2005.


========================================================================
                 Section I: What do we provide?
========================================================================

   H4TOH5 static library: 
        release version
 
                
========================================================================
                Section II:  Helpful Pointers
========================================================================

Preconditions:

1. You must have release versions of HDF4 and HDF5 static static library installed
   on your machine for building an application with libh4toh5.

2. If you are building an application that uses libh4toh5, the following 
   locations will need to be specified for locating header files and linking 
   the HDF4 and HDF5 libraries of binary release:

   <top-level HDF4 directory>\include
   <top-level HDF5 directory>\include
   <top-level H4TOH5 directory>\include

where <top-level HDF5 directory> may be 

   C:\MyH4toH5stuff\hdf5\

3. There are two ways to tune your project settings:

    1. Go to Tools-->Options-->Directories

    Add the corresponding include paths and library paths.  Those paths
    should include HDF4, HDF5, and external library includes. HDF4, HDF5 and external
    library paths.

    2. To specify these locations in the settings for your VC++ project:

       1.) Open your VC project in Microsoft Visual C++ and make sure it is
           the active project.

       2.) Go to the Project menu and choose the 'Settings' option.

       3.) Choose the build configuration you would like to modify in the
           drop down menu labeled with 'Settings For:'

       4.) Choose the C/C++ tab

       5.) At the bottom of the window, there should be a text-area labeled
           with 'Additional include directories:'. type the 
           HDF4 path(<top-level HDF4 directory>\include) 
           HDF5 path(<top-level HDF5 directory>\include)
           H4TOH5 path(<top-level H4TOH5 directory>\include)
          
           then click OK.
            
