#-----------------------------------------------------------------------------
# filename:
#       Install_HDFEOS5_WIN.README
#
# description:
#       Installation instruction for HDFEOS5.1.16 on Windows xp
#       
# author:
#       Phuong Nguyen/ L3 Communication, GSI.
#       Abe Taaheri/ Raytheon SSI
#
# history:
#       02-Aug-1999 Second version
#       11-OCT-1999 Third version( with Fortran support)
#	06-Jul-2005 Version 5.1.9
#	19-Feb-2006 Version 5.1.10
#	27-Feb-2008 Version 5.1.11
#	15-jun-2009 Version 5.1.12
#	19-Aug-2010 Version 5.1.13
#	14-Dec-2011 Version 5.1.14
#	05-Nov-2013 Version 5.1.15
#	05-Oct-2017 Version 5.1.16
#-----------------------------------------------------------------------------
              
The instructions which follow assume that you will be using
the 'zip' files that we provide: hdfeos5_1_16b.zip (binary file 
for Windows xp) and hdfeos5_1_16.zip (source code file along with binaries). 
Also we have been using "Microsoft Visual Studio 2008" for our windows 
developement. 


Building from Binary Code Release (hdfeos5_1_16b.zip)
===============================================
To install the HDFEOS with the prebuilt libraries, it is assumed that 
you have done the following:      

      NOTE: THE FOLLOWING INTSTRUTIONS SHOULD BE FINE FOR WIN xp

      1. Go to the  ftp site 
      ftp://edhs1.gsfc.nasa.gov/edhs/hdfeos5/latest_release/windows/, 
         and download hdfeos5_1_16b.zip.

      2. On your window, create a directory structure to unpack the 
	source file. For example: 
	F:\					(any drive)
   	MyHDFEOS\				(any folder name)
        

      3. Copy the hdfeos5_1_16b.zip to that directory and unpack it by running 
	WinZip on it. This should create the following directories: hdfeos5, 
	hdf5-1.8.19-win32, jpeg9b-vs2013, zlib1211-dll, and szip21-vs2013-noenc 
	(no- encoder) and szip211-vs2013-enc (with encoder)

	The libraries and include files for hdfeos5.1.16 are inside:
	F:\MyHDFEOS\hdfeos5\lib		(Release versions of hdfeos and gctp
					libraries (hdfeos.lib, gctp.lib))
					(Debug versions of hdfeos and gctp
					libraries (hdfeosd.lib, gctpd.lib))
	
	F:\MyHDFEOS\hdfeos5\include		( HDFEOS5 include files )

	Inside the directories hdf5-1.8.19-win32, jpeg9b-vs2013, zlib1211-dll, 
	and szip211-vs2013-noenc ( or szip21-vs2008-enc) You can find their 
	include files and libraries (hdf5.lib, hdf5_hl.lib, zdll.lib, 
	hdf5_fortran.lib, hdf5_hl_fortran.lib, libjpeg.lib and szlib.lib).

      4. Run your "Microsoft Visual Studio 2013" application.
	If you are building an application that uses the HDFEOS5 library,
	you must already have installed hdf5-1.8.19 (or use HDF5 binary provided
	for your machine. 
         
	Assumed you have installed HDF5-1.8.19 on 
            
	F:\MyHDF\hdf5-1.8.19-win32\

	To specify the header files and linking in the HDFEOS5 libraries:
	Select Tools->Options->Projects and Solutions->VC++Directories->
	"Show directories for"->"Include files", add the following directories:

	$(VCInstallDir)include
        $(VCInstallDir)atlmfc\include
        $(WindowsSdkDir)\include
        $(FrameworkSDKDir)include
	F:\MyHDFEOS\jpeg9b-vs2013\include
	F:\MyHDFEOS\zlib1211-dll\include
	F:\MyHDFEOS\szip211-vs2008-enc\include
	F:\MyHDF\hdf5-1.8.19-win32\include
	F:\MyHDFEOS\hdfeos5\include

	Select Tools->Options->Projects and Solutions->VC++Directories->
	"Show directories for"->"Library files", add the following directories:

	F:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT
	$(VCInstallDir)lib
	$(VCInstallDir)atlmfc\lib
	$(VCInstallDir)atlmfc\lib\i386
	$(WindowsSdkDir)\lib
	$(FrameworkSDKDir)lib
	$(VSInstallDir)
	$(VSInstallDir)lib
	F:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT
	F:\MyHDFEOS\jpeg9b-vs2008\lib
	F:\MyHDFEOS\zlib1211-dll\lib
	F:\MyHDFEOS\szip211-vs2013-enc\lib
	F:\MyHDF\hdf5-1.8.19-win32\lib
	F:\MyHDFEOS\hdfeos5\lib\WIN

	NOTE: you may need H5_USE_16_API in C/C++->Preprocesssor(if you are 
	using HDF5-1.8.X this may be required to map a few depricated hdf5 
	functions to their new formats). Please note that you may need some 
	other include and lib directories, depending on your application. 
	Please see Compile_WIN.readme.txt inside for more details.


Building from Source Code Release (hdfeos5_1_16.zip)
===============================================

STEP I:  Preconditions

To build the HDFEOS5, it is assumed that you have done the following:
      
      1. Installed MicroSoft Developer Studio 2008 (or higher)
    
      2. Installed jpeg, szip and zlib (see install_jpeg_zlib_szip.txt)
         
      3. Installed HDF5 version 1.8.19.

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

	    	F:\				(any drive)
           	MyHDFEOS\			(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.
         
      Run WinZip on hdfeos5_1_16.zip. Exract 'hdfeos5' and
      'hdfeos5_dev' directories into F:\MyHDFEOS5. The directory 'hdfeos5_dev' 
      contains several files and directories for Windows, and the 'hdfeos5' 
      directory hdfeos5 source code package.

STEP II: Build HDFEOS5 library

INSTRUCTIONS FOR INSTALLATION           

      1. Open  F:\myHDFEOS5\hdfeos5_dev\hdfeos5.sln to begin building the 
	Developer Studio project.
         
      2. Select Tools->Options->Projects and Solutions->VC++Directories->
      "Show directories for"->"Include files", add the following directories:
         
	$(VCInstallDir)include
        $(VCInstallDir)atlmfc\include
        $(WindowsSdkDir)\include
        $(FrameworkSDKDir)include
	F:<path to jpeg>\include  
	F:<path to zlib>\include
	F:<path to szlib>\include      
	F:<path to HDF5>\include 
	F:<path to HDFEOS5>\include 
	F:<path to HDFEOS5>\gctp\include

	where for example <path to HDF5> is F:\MyHDF\hdf5-1.8.19-win32      
	and <path to HDFEOS5> can be F:\myHDFEOS5\hdfeos5

      3. Select Tools->Options->Projects and Solutions->VC++Directories->
      "Show directories for"->"Library files", add the following directories:

	F:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT
	$(VCInstallDir)lib
	$(VCInstallDir)atlmfc\lib
	$(VCInstallDir)atlmfc\lib\i386
	$(WindowsSdkDir)\lib
	$(FrameworkSDKDir)lib
	$(VSInstallDir)
	$(VSInstallDir)lib
	F:<path to jpeg lib>\jpeg  
	F:<path to zlib>\lib
	F:<path to szlib>\lib
	F:<path to HDF5>\lib
	F:<path to HDFEOS5>\lib\WIN

      4. Select hffeos5 in the "Solution Explorer" window the select 
      Project->Properties, 

	Select "General" under "Configuration Properties". In the selection 
	window for "Configuration Type" select "Static Library(.lib)" option 
	to create output as library.

	Select folder C/C++->Preprocesssor.
	Add the following to "Preprocessor definitions" if they are not there 
	alraedy: 
	WIN32;NDEBUG;_LIB;INTEL86;VISUAL_CPLUSPLUS;_CRT_SECURE_NO_WARNINGS;
	H5_USE_16_API	 

      5. Now Select "Solution 'hdfeos5'" in the "Solution Explorer" windoW. 
      Select "Build", then Select "Configuration Mangger".
      Select "Debug" in "Active Solution Configuration" window, check mark 
      hdfeos5 and gctp build boxes and change Configuration to Debug for both
      projects.
      Select "Build" and "Build Solutions" to build the Debug version of the 
      hdfeos5 and gctp tree.

      6. Select "Build", then Select "Configuration Mangger".
      Select "Release" in "Active Solution Configuration" window, check mark 
      hdfeos5 and gctp build boxes and change Configuration to Release for both
      projects.
      Select "Build" and "Build Solutions" to build the Release version of 
      the hdfeos5 and gctp tree.

      Please note that you have a choice of building gctp and hdfeos5 
      separately.

      7. Please check "Release" and "Debug" directories under 
      F:\myHDFEOS5\hdfeos5_dev\hdfeos5 and F:\myHDFEOS5\hdfeos5_dev\gctp to 
      make sure that libraries have been created sucessfully.

      8. In command prompt window run the installation batch commands 
      win32ins.bat in the directory F:\myHDFEOS5\hdfeos5_dev, Or double click 
      on "F:\myHDFEOS5\hdfeos5_dev\win32ins.bat" file. This will copy *.lib 
      files to F:\MyHDFEOS5\hdfeos5\lib directory and will remove some 
      temporary files, debug and release directories, and all other lib 
      directories under "F:\MyHDFEOS5\hdfeos5\lib" directory.

      9. If you are building an application that uses the HDFEOS5 library,
      Please refer to the 
      <HDFEOS5 directory>\hdfeos5_dev\compile_WIN_readme.txt 
      file for more information on compiling an application with the 
      HDFEOS5 libraries on Windows.

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

Settings... details:
  If you create your own project, the necessary settings can be
  read from the hdfeos5.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.




