#-------------------------------------------------------------------------
# filename:
#    Install_TOOLKIT_MTD_98.readme
#
# description:
#    Installation instruction for TOOLKIT_MTD on Windows NT, Window 98.
#       
# author:
#    Subing Zeng/ Raytheon STX Corp.
#    Abe Taaheri/ Emergent Information Technologies, Inc.
#    Phuong Nguyen/ L3 Communication Corp.
#
# history:
#    25-July-1998 Initial version
#    10-Aug-1999  Second version
#    20-Oct-1999  Third version
#    20-Apr-2000  Fouth version
#    16-Jan-2001  Fifth version
#    04-Oct-2002  Version 5.2.8
#    03-Mar-2005  Version 5.2.13
#-------------------------------------------------------------------------
              
The instructions which follow assume that you will be using one of 
the 'zip' files that we provide, either the source code release with 
fortran (pgstk5.2.13r1full.zip) or the source release with no 
fortran( pgstk5.2.13r1nof.zip)

In building TOOLKIT_MTD from source code you may select between 
two build environment options depending on your application and 
environment needs.  Each option has it's own zip file:

Option I, (select pgstk5.2.13r1nof.zip)
Test and Utility configuration : TOLKIT_MTD library, and utilities, no 
fortran

Option II, (select pgstk5.2.13r1full.zip)
Full configuration : TOOLKIT_MTD library and utilities, with fortran
This version has been built and tested using DEC Visual Fortran.


Preconditions:
===========================
  To build the TOOLKIT_MTD library, it is assumed that you have done 
  the following:
      
      1. Installed MicroSoft Developer Studio and Visual C++ 6.0.
         Visual Fortran 6.0 is needed if you are going to build the
         full TOOLKIT_MTD Library with Fortran support.

      2. Installed jpeg, szip and zlib ( for the old versions such as 
         pgstk5.2.9, HD4.1r5 and hdf5-1_4_3 and before, no need to do 
         this)

      3. Installed NSCA HDF version4.2 release 0 and HDF5 release 5-1.6.3

      4. Set up a directory structure to unpack the library. For 
      example: 
           c:\					(any drive)
           PGSTKHOME\     			(any folder name)

      5. Copy the source distribution archive to that directory 
      and unpack it using the appropriate archiver options to create a 
      directory hierarchy.
         
 
INSTRUCTIONS FOR LIBRARY AND UTILITY INSTALLATION, NO FORTRAN :
==================================================================
       1. You will use pgstk5.2.13r1nof.zip 
            
            Run WinZip on 
               c:\PGSTKHOME\pgstk5.2.13r1nof.zip
    
            This should create directories called 'dev' and 'TOOLKIT_MTD'.

            'dev' directory contains a Developer Studio workspace 
            TOOLKIT_MTD.dsw. 
           
 
       2. Invoke Microsoft Visial C++ 6.0, go to "File" and select
            "Open Workspace" option. 
            Then open  c:\PGSTKHOME\dev\TOOLKIT_MTD.dsw workspace. 

       3. Under Tools->Options, select "Directories".
            Under "Show directories for", select "Include files".
            Add the following directories:

                C:\Program Files\ArrayVisualizer\INCLUDE		
                C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
                C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE
                <top-level HDF4 directory>\INCLUDE
                <top-level HDF5 directory>\hdflib\release\include
		<top-level jpeg>\include
		<top-level zlib>\include
		<top-level szip>\include
                <top-level PGSTK directory>\TOOLKIT_MTD\include 
                <top-level PGSTK directory>\TOOLKIT_MTD\include\CUC 
                <top-level PGSTK directory>\dev                     

        4.  Under Tools->Options, select "Directories".
            Under "Show directories for", select "Library files".
            Add the following directories:

                C:\Program Files\ArrayVisualizer\LIB
                C:\Program Files\Microsoft Visual Studio\VC98\LIB
                C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB
                <top-level HDF4 directory>\lib
                <top-level HDF4 directory>\dlllib
                <top-level HDF5 directory>\hdf5lib\release\lib
		<top-level jpeg>\lib
	        <top-level zlib>\lib
	        <top-level szip>\lib
                <top-level PGSTK directory>\dev\PGSTK\Release

            where 
	    <top-level PGSTK directory> may be C:\PGSTKHOME 
	    <top-level HDF4 directory> may be C:\HDF41r5s
	    <top-level HDF5 directory> may be C:\hdf5
	    <top-level zlib> may be C:\Zlib-1.1.3

	5. Select "Build", then Select "Set Active Configuration".
		   Select "PGSTK -- Win32Debug" as active configuration.
           Select "Build" and "Build PGSTKd.lib" to
           build the Debug version of the TOOLKIT_MTD tree.

        6. Select "Build", then Select "Set Active Configuration".
		   Select "PGSTK -- Win32Release" as active configuration.
           Select "Build" and "Build PGSTK.lib" to
           build the Release version of the TOOLKIT_MTD tree.
	
        7. Select "Build", then Select "Set Active Configuration".
		   Select "PGS_TD_NewLeap -- Win32Release" as active configuration.
	   Select "Project" --> "Settings":
		   Under Settings For: click on both "PGS_TD_NewLeap" and "ephtobin"
		   Select "C/C++" --> "Preprocessor definitions":  Add "INTEL86,VISUAL_CPLUSPLUS".
		   Select "Link" --> "Object/library modules": Add "ws2_32.lib pgstk.lib 
							       hd420.lib hm420.lib hdf5.lib
							       libjpeg.lib zlib.lib szlib.lib".

            Select "Build" and "Build PGS_TD_NewLeap.exe" to
            build the Release version of the TOOLKIT_MTD utility 
            PGS_TD_NewLeap and ephtobin.

        8. Run the installation batch file win32ins.bat in directory 
           <top-level PGSTK directory>\dev\.
           Commands in this file will copy pgstk.lib, pgstkd.lib and 
           utilities to <top-level PGSTK directory>\TOOLKIT_MTD\bin\nt_98 and 
           <top-level PGSTK directory>\TOOLKIT_MTD\lib\nt_98, and remove the temporary files.
       
              The <top-level PGSTK directory>\TOOLKIT_MTD\bin\nt_98 directory will contain  
              utility: 
                 PGS_TD_NewLeap.exe
                 ephtobin.exe
     
              The <top-level PGSTK directory>\TOOLKIT_MTD\lib\nt_98 directory will contain 
              PGSTK libraries:
                 pgstk.lib   (TOOLKIT_MTD Library of release version)
                 pgstkd.lib  (TOOLKIT_MTD library of debug version)

           where 
	   <top-level PGSTK directory> may be C:\PGSTKHOME 
	    


INSTRUCTIONS FOR FULL TOOLKIT_MTD INSTALLATION WITH FORTRAN:
==============================================================
       1. You will use pgstk5.2.8r1full.zip 
           
            Run WinZip on 
               c:\PGSTKHOME\pgstk5.2.8r1full.zip

            This should create directories called 'dev' and  'TOOLKIT_MTD'.
        
            'dev' directory contains a Developer Studio workspace 
            TOOLKIT_MTD.dsw 
       
       2. Invoke Microsoft Visial C++ 6.0, go to "File" and select
            "Open Workspace" option. 
            Then open  c:\PGSTKHOME\dev\TOOLKIT_MTD.dsw workspace. 
 
       3. Under Tools->Options, select "Directories":
            Under "Show directories for", select "Include files".
            Add the following directories:

                C:\Program Files\ArrayVisualizer\INCLUDE
                C:\Program Files\Microsoft Visual Studio\DF98\IMSL\INCLUDE
                C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
                C:\Program Files\Microsoft Visual Studio\DF98\INCLUDE
                C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE
                <top-level HDF4 directory>\INCLUDE
                <top-level HDF5 directory>\hdf5lib\release\include
		<top-level jpeg>\include
		<top-level zlib>\include
		<top-level szip>\include
                <top-level PGSTK directory>\TOOLKIT_MTD\include 
                <top-level PGSTK directory>\TOOLKIT_MTD\include\CUC 
                <top-level PGSTK directory>\dev

        4.  Under Tools->Options, select "Directories".
            Under "Show directories for", select "Library files".
            Add the following directories:

              C:\Program Files\ArrayVisualizer\LIB
              C:\Program Files\Microsoft Visual Studio\VC98\LIB
              C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB
              C:\Program Files\Microsoft Visual Studio\DF98\LIB
              C:\Program Files\Microsoft Visual Studio\DF98\IMSL\LIB
              <top-level HDF4 directory>\lib
              <top-level HDF4 directory>\dlllib
              <top-level HDF5 directory>\hdf5lib\release\lib
	      <top-level jpeg>\lib
	      <top-level zlib>\lib
	      <top-level szip>\lib
              <top-level PGSTK directory>\dev\PGSTK\Release

            where 
	    <top-level PGSTK directory> may be C:\PGSTKHOME 
	    <top-level HDF4 directory> may be C:\HDF41r5s
	    <top-level HDF5 directory> may be C:\hdf5
	    <top-level zlib> may be C:\Zlib-1.1.3

       5. Select "Build", then Select "Set Active Configuration".
		 Select "PGSTK -- Win32Debug" as active configuration.
          Select "Build" and "Build PGSTKd.lib" to
          build the Debug version of the TOOLKIT_MTD tree.

       6. Select "Build", then Select "Set Active Configuration".
		 Select "PGSTK -- Win32Release" as active configuration.
          Select "Build" and "Build PGSTK.lib" to
          build the Release version of the TOOLKIT_MTD tree.

       7. Select "Build", then Select "Set Active Configuration".
		 Select "PGS_TD_NewLeap -- Win32Release" as active configuration.
	  Select "Project" --> "Settings":
		 Under Settings For: click on both "PGS_TD_NewLeap" and "ephtobin"
		 Select "C/C++" --> "Preprocessor definitions":  Add "INTEL86,VISUAL_CPLUSPLUS".
		 Select "Link" --> "Object/library modules": Add "ws2_32.lib pgstk.lib 
							     hd420.lib hm420.lib hdf5.lib
							     libjpeg.lib zlib.lib szlib.lib	
          Select "Build" and "Build PGS_TD_NewLeap.exe" to
          build the Release version of the TOOLKIT_MTD utility
          PGS_TD_NewLeap and ephtobin.       

       8. Run the installation batch file win32ins.bat in directory 
          <top-level PGSTK directory>\dev\.

          Commands in this file will copy pgstk.lib, pgstkd.lib and utilities 
          to <top-level PGSTK directory>\TOOLKIT_MTD\bin\nt_98 and 
          <top-level PGSTK directory>\TOOLKIT_MTD\lib\nt_98, and remove the temporary files. 
        
              The <top-level PGSTK directory>\TOOLKIT_MTD\bin\nt_98 directory will contain  
              utility: 
                 PGS_TD_NewLeap.exe
                 ephtobin.exe
     
              The <top-level PGSTK directory>\TOOLKIT_MTD\lib\nt_98 directory will contain 
              PGSTK libraries:
                 pgstk.lib   (TOOLKIT_MTD Library of release version)
                 pgstkd.lib  (TOOLKIT_MTD library of debug version)
    
           where 
	   <top-level PGSTK directory> may be C:\PGSTKHOME

Compile Notes
=========================
      If you are building an application that uses the TOOLKIT_MTD library 
      pgstk.lib (release version ) or pgstkd.lib(debug version), the following
      locations will need to be specified for locating header files and 
      linking in the HDF4, HDF5, JPEG, SZIP, ZLIB and TOOLKIT_MTD libraries:
 
               <top-level HDF4 directory>\lib
               <top-level HDF4 directory>\dlllib
               <top-level HDF5 directory>\hdf5lib\release\lib
	       <top-level jpeg>\lib
	       <top-level zlib>\lib
	       <top-level szip>\lib
               <top-level PGSTK directory>\TOOLKIT_MTD\lib\nt_98

               <top-level HDF4 directory>\include
               <top-level HDF5 directory>\hdf5lib\release\include
	       <top-level jpeg>\include
	       <top-level zlib>\include
	       <top-level szip>\include
               <top-level PGSTK directory>\TOOLKIT_MTD\include
               <top-level PGSTK directory>\TOOLKIT_MTD\include\CUC
               <top-level PGSTK directory>\dev
	       
            where 
	    <top-level PGSTK directory> may be C:\PGSTKHOME 
	    <top-level HDF4 directory> may be C:\HDF41r5s
	    <top-level HDF5 directory> may be C:\hdf5

            Please refer to the 
            <top-level PGSTK directory>\dev\compile_NT_98.txt 
            file for more information on compiling an application with the 
            TOOLKIT_MTD libraries on Windows 98 and Window NT.


     In order to use PGSTK.lib or PGSTKd.lib, it is needed to set up 
     environment variable "PGSHOME" :

           Open autoexe.bat file and add 1 line at the end of file:
                  Set PGSHOME=<top-level PGSTK directory>\TOOLKIT_MTD
         
                  where <top-level PGSTK directory> may be C:\PGSTKHOME

MORE HELPFUL POINTERS
=====================

       Here are some notes that may be of help is you are not familiar
       with using the Visual C++ Development Environment.

       Project name and location issues: 
          The files in pgstk5.2.13r1full.zip ( or pgstk5.2.13r1nof.zip) must 
          end up in the dev\ and TOOLKIT_MTD\ directories installed by 
          pgstk5.2.13full.zip ( or pgstk5.2.13nof.zip).

          If you must install TOOLKIT_MTD.dsw in another directory, relative 
          to dev\ , you will be asked to locate the project files, when you 
          open the project TOOLKIT_MTD.dsw.

      Settings... details:
	  If you create your own project, the necessary settings can be
	  read from the TOOLKIT_MTD.dsw file(as text), or from the
	  Project Settings in the Developer Studio project settings dialog.

      Project
	  Settings
	      C/C++
		  Category
		     PreProcessor
			 Code Generation
			    Use run-time Library
				   These are all set to use Single-Threaded.
				   or Single-Threaded debug.
