#-----------------------------------------------------------------------------
# file:  TEST_DRIVER_XP.README
#
# description:
#      README file for MET test drivers and TD test drivers for the 
#      stand-alone time tools for the TOOLKIT_MTD on windows XP using
#      Microsoft's Visual Studio.
#
#      These test programs are provided to aid the user in the development of
#      software using the TOOLKIT_MTD. The user may run the same test cases as
#      included in this directory to verify that the TOOLKIT_MTD is functioning
#      correctly. These programs were written to support the internal test
#      of the TOOLKIT_MTD and are delivered without guarantee of any kind.
#      No support will be provided to the user of these programs. The directories
#      under the TOOLKIT_MTD/test directory contains source code for a driver 
#      in C and FORTRAN for each tool, makefiles for the tool group, readme files 
#      explaining how to use the drivers, sample input files and sample output files.
#
# author:
#       Corey Boettcher / Applied Research Corporation
#       Abe Taaheri / L3 Comm. GSI.
#       S. Zeng   Raytheon STX
#       Phuong Nguyen / L3 Communication Corp.
# history:
#       27-Jul-1995 CMB Initial version
#       1-Jun-1998 AT revised for TOOLKIT_MTD
#       01-May-1996 LVM Updated for TK5.1
#       1-Jun-1998 AT revised for TOOLKIT_MTD
#       Sep-1998   S. Zeng for Win95 
#       Oct-1999   S. Zeng for win98
#       Apr-2000   AT/PN for pgstk5.2.6/HDF41r3
#       Jan-2001   AT revised for HDF5
#	Oct-2002   PN for pgstk5.2.8/HDF41r5/HDF5
#       Mar-2005   PN for pgstk5.2.13/HDF4.2r0/HDF5-1.6.3
#       Oct-2006   AT for pgstk5.2.14/HDF4.2r1/HDF5-1.6.5
#-----------------------------------------------------------------------------

Set up the environment:
=========================

1. Set up environment variable "PGSHOME":
	in "Control Panel" double clich on "System". In the "System Properties" window
	select "Advanced". Click "Environment Variables" and enter the new variable
	 name as PGSHOME and value as <top-level PGSTK directory> may be F:\PGSTKHOME
   
	You may have done this also by Opening autoexec.bat file (if it exist)
	and adding 1 line at the end of file

       	Set PGSHOME=<top-level PGSTK directory>\TOOLKIT_MTD

	       where <top-level PGSTK directory> may be something like 
		 F:\PGSTKHOME if you have F:\PGSTKHOME as the parent directory
		 for  TOOLKIT_MTD directory.

2. Run MS Visual Studio. Select File -> New -> Project
   	Create a win32 project by selecting Win32 under "Visual C++ Projects" 
	and Win32Project under "Templates". Enter name for the project. The 
	project will be created in the directory shown in "Location:"

3. In the "Solution Explorer window remove all source and header files and add 
	a testdriver source code name under TOOLKIT_MTD/test/test_MET or 
	TOOLKIT_MTD/test/test_TIME
	Save the project by selecting File -> Save All

4. Under Tools-> Options-> Project", select "VC++ Directories".
            Under "Show directories for", select "Include files".

     No fortran support:
         Add the following directories:

            F:\Program Files\Microsoft Visual Studio\VC7\include
		F:\Program Files\Microsoft Visual Studio\SDK\v1.1\include
            <top-level HDF4 directory>\include
            <top-level HDF5 directory>\include
		<top-level jpeg>\include  or <top-level jpeg> if *.h files are there.
		<top-level zlib>\include
		<top-level szip>\include
		<top-level hdfeos5>\include
		<top-level hdfeos >\include
		<top-level hdfeos >\gctp\include
            <top-level PGSTK directory>\TOOLKIT_MTD\include 
            <top-level PGSTK directory>\TOOLKIT_MTD\include\CUC 
            <top-level PGSTK directory>\dev
 
     With Fortran support:
         Add the following directories:
		Add additional include directories corresponding to the Fortran
		Compiler if necessary.

5. Under Tools-> Options-> Project", select "VC++ Directories".
            Under "Show directories for", select  "Library files".

     No fortran support:
         Add the following directories:
		F:\Program Files\Microsoft Visual Studio\Vc7\PlatformSDK\Lib
            F:\Program Files\Microsoft Visual Studio\VC7\lib
		F:\Program Files\Microsoft Visual Studio\SDK\v1.1\lib
            <top-level HDF4 directory>\release\lib
            <top-level HDF4 directory>\release\dll
            <top-level HDF5 directory>\release\lib
            <top-level HDF5 directory>\release\dll
		<top-level jpeg>\lib  or <top-level jpeg> where *.lib files are.
		<top-level zlib>\lib
		<top-level szip>\lib
		<top-level szip>\dll
		<top-level hdfeos5>\lib
		<top-level hdfeos >\lib
            <top-level PGSTK directory>\TOOLKIT_MTD\lib\nt_98
 		<top-level PGSTK directory>\dev\PGSTK\Release
	You may need also to include the following directories:
		F:\WINDOWS\system32
		F:\WINDOWS
		F:\WINDOWS\system32\wbem

    With Fortran support:
         Add the following directories:
		Add additional include directories corresponding to Fortran
		Compiler if necessary.

            where 
	    	<top-level PGSTK directory> may be
	    	F:\TOOLKIT_MTD5.2.19\with_Fortran\pgstk5.2.19r1full
	    	<top-level HDF4 directory> may be F:\4210-win\4210-win
	    	<top-level HDF5 directory> may be F:\5-1812-win\5-1812-win
	    	<top-level szip> may be F:\zlib128-windows
	    	<top-level hdfeos5> may be F:\hdfeos5_1_15b\hdfeos5
	    	<top-level hdfeos > may be F:\hdfeos2_19b\hdfeos
	    	<top-level szip> may be F:\szip21-win-xp-enc
	    	<top-level jpeg> may be F:\jpeg-6b


6. Click on the project name in the "Solution Explorer" window. Then click on 
	Project -> Properties to open Proprty Page for the project.
	a. In the Cofiguration Manger setect "Release" or "Debug". Click "Apply".
	b. Select C/C++ -> "Preprocessor" and add "INTEL86,VISUAL_CPLUSPLUS to 
		"Preprocessor definitions" if they do not show up in the list. 
      		Add the following if they are not already there:   WIN32,_CONSOLE
		Click "Apply".
	c. Select C/C++ -> "Precompiled Headers". In the "Create/Use Precompiled Header" 
		box choose "Not Using Precompiled Headers". Click "Apply".
	d. Under C/C++ -> Adavaced select "Compile as" and choose 
		"Compile as C Code (/TC)" for C code compilation.
	f. Select Linker -> General, then in the "output File" box put 
		".\Release\<Project Name>.exe" or ".\Debug\<Project Name>.exe" 
		depending on your configuation settings. Click "Apply".

	g. Select Linker -> "Input" and add the following libraries to the beginning 
		of the list in the "Additional Dependencies" box:

       		For testdivers under test_MET:  ws2_32.lib pgstk.lib hd421.lib 
						hm421.lib hdf5.lib libjpeg.lib 
						zdll.lib szlib.lib
       		For testdivers under test_TIME: ws2_32.lib pgstk.lib

   		The following libraries may (or may not) need to be included: 
       			kernel32.lib user32.lib gdi32.lib winspool.lib comdig32.lib
       			advapi32lib shell32.lib ole32.lib oleaut32.lib uuid.lib
       			odbc32.lib odbccp32.lib

		Click "Apply".
	g. 	Also under Project -> Properties Select "Linker" --> Advanced
		you may (or may not) need to add "main" to the "Entry Point" box.

		Click "Apply" and then Save the project by selecting File -> Save All

	build the Release or Debug version of the project executable by selecting:
	Build -> <project Name>, then Build -> Project only -> Link
	The executable will be created in the Release or Debug directory under project
	directory (the directory mentioned during the creation of project, step 2).

	Copy the executable file to TOOLKIT_MTD/test/test_MET or 
	TOOLKIT_MTD/test/test_TIME (depending on testdriver). In that directory edit 
	filetable.temp to modify directories for all file paths.

	To run the application open a DOS window, go to test_TIME or test_MET 
	directories (the one that you put your executable), and type:

		application.exe < input_file.in

	where application.exe is the application executable that you created and 
	input_file.in is the input file relevant to the application.
 
NOTE:
=========

Please note that when editing the filetable.temp for any application 
(as directed in the MTD_TOOLKIT Users Guide for setting the path of the files) 
one should use "\", instead of "/", in the directory structure for windows
applications such as:

10100|LogStatus|C:\PGSTKHOME\TOOLKIT_MTD\runtime\LogStatus

