CAVERNsoft G2 Windows 95/98/NT Installation Guide

Introduction

This guide shows you how to build the networking libraries and the demo programs in the CAVERNsoft G2 distribution.

Table of Contents

  1. System Requirements
  2. Building and installing the CAVERNsoft libraries
  3. Building your own application
  4. Support
  5. Appendix A : Directory Structure
  6. Appendix B : Having trouble with NMAKE?
  7. Appendix C : A note on 'pthreads' and 'windowsthreads'

System Requirements

The networking modules of CAVERNsoft G2 were tested on Windows 95/98/NT 4.0. You will need Microsoft Visual C++ 6.0 or a later version.

Building and installing the CAVERNsoft libraries

The process has 4 main steps.

1. Downloading the distribution into a working directory

  1. Download the CAVERN distribution to a working directory. You should see the file CAVERNG2_xxx.tar.gz in your working directory (where xxx is the version number).

  2.  
  3. Extract all the contents of the file into your working directory. If your working directory is  C:\CAVERN, then you will see the distribution in C:\CAVERN\CAVERNG2_xxx. (where xxx is the version number of the distribution).
Note : A brief description of the directories in the distribution is available in Appendix A

You can now install the pre compiled library contained in the distribution (go to step 3) . Otherwise go to step 2 to build the CAVERNsoft G2 library.

2. Building the CAVERNsoft libraries

  1. Set an environment variable CAVERN_DISTRIB to point to the location of the distribution. If you downloaded the distribution into the directory described in step 1 then the CAVERN_DISTRIB variable should point to c:\CAVERN\CAVERNG2_xxx.

  2. Note : Use the windows 'help' to find out how to set an environment variable. You may have to close the MS-DOS window or restart your computer for the environment variable to take effect.
     
  3. To build the CAVERNsoft libraries type
    1. nmake -f Makefile.win32 everything
    Having problems with 'nmake'? See Appendix B

    Advanced users, see Appendix C for a note on the two different thread libraries with which CAVERNsoft libraries are built.

    The networking libraries are now ready for use. Go to step 4 to build the demo programs.
     

3. Installing CAVERNsoft G2 in the deployment directory
    If you need to make the CAVERNsoft networking APIs available to other users, you should install CAVERNsoft in a deployment directory which is separate from the working directory used so far. To do so follow the instructions below:
     
    1. You will need to redefine the environment variable CAVERN_DISTRIB to indicate the deployment directory. Check with the Windows Help on how to set up environment variables.  If you want to install the distribution in the directory D:\CAVERNG2, then the CAVERN_DISTRIB variable should be set to D:\CAVERNG2.

    2.  
    3. Type
    4. nmake -f makefile.win32 install
      This will copy the sub-directories demos, include and lib and the files CAVERN_APPLICATION_INCLUDES.WIN32, Makefile.win32 and README.WIN32.html to the directory D:\CAVERNG2. Go on to step 4 to build the demo programs.
4. Building the demo programs
The demo programs are a set of sample programs located in the 'demos' sub-directory of the distribution. These demo programs are strictly for CAVERNsoft's networking APIs. The demo programs exist in four directories under the demos sub-directory (db, network, misc, threads). A 'README' file in each directory (located in the 'docs' sub-directory) describes the demo programs.
To build the demo programs with the default options (32 bit pthreads) type
compile_demos PTHREADS
To build the demos programs with the native windows threads type
compile_demos WINDOWSTHREADS
Note :see Appendix C  to kow about pthreads and windows threads
The demo programs should now compile all the way through. Look into each directory and use the README file to understand how the demos should be run.

 Building your own application

    You can create new applications with CAVERNsoft G2 in two ways.

    1. Using NMAKE

      Click here for a sample Makefile. It shows how you can compile and link a program 'test.cxx' with the CAVERNsoft libraries.
      To run your Makefile type :
       nmake -f makefile.win32

    2. Using Visual C++ IDE

    1. Create a new project.
    2. Go to Project Settings and click on the C/C++ tab. Select Preprocessor as the Category.
      1.  
      In the Preprocessor definitions textbox add :
          CAVERN_DO_NOT_USE_GLOBUS, CAVERN_LITTLE_ENDIAN, CAVERN_THREAD_SAFE, CAVERN_USE_PTHREADS
      In the Additional include directories textbox add :
          D:\CAVERNG2\Win32\pthreads\include, (required only if you want to use pthreads)
          D:\CAVERNG2\include,
          D:\CAVERNG2\lib\win32\pthreads, (or D:\CAVERNG2\lib\win32\windowsthreads if you are using native windows threads)
          D:\CAVERNG2\include\CAVERNmisc_hash,
          D:\CAVERNG2\include\md5key,
          D:\CAVERNG2\include\keytool_md5_hashtable_treedir,
          D:\CAVERNG2\include\CAVERNmisc_hashDict
          (Note : D:\CAVERNG2 is the deployment directory used in our example)
    3. Now add the cavernsoftG2.lib that should be in D:\CAVERNG2\lib\win32\pthreads, (or D:\CAVERNG2\lib\win32\windowsthreads if you are using native windows threads) according to our example
    4. Add all your other files to the project and build it.

    5. Note that if winsock libs are not part of your default setting, you also need to link with ws2_32.lib

 Support

If you have any problems, questions, or feedback please send email to
cavern@evl.uic.edu

 Appendix A : Directory Structure

The CAVERNsoft distribution is organized into several sub directories. Each sub directory is described below.
 
Directory Description
demos contains sample programs that use the CAVERNsoft G2 version 1.2 networking APIs. 
globus contains the header files (for pthreads and sprocs) and pre compiled globus libraries for SGI IRIX and Linux.
globus_all, globus_build contains the globus distribution
include contains header files for CAVERNsoft G2 version 1.2
lib contains pre compiled library files of CAVERNsoft G2 for SGI IRIX, Linux, Solaris and Microsoft Windows
perf_daemon contains performance monitoring daemon server and a simple performance monitoring client.
src contains source code for CAVERNsoft G2 version 1.2
WIN32 contains the pthreads library

Appendix B : Having trouble with NMAKE?

  1. Make sure that the path and environment variables are set for Visual C++.

  2.  
  3. At the MS-DOS Command Prompt type 'nmake'. If you encounter an error like 'NMAKE not found', you need to set the environment for Visual C++. To do this execute 'vcvars32.bat' . You will find this file in the bin subdirectory where Visual C++ is installed. In a typical installation you will find it under D:\Program Files\Microsoft Visual Studio\VC98\Bin.

  4.  
  5. For more information please refer to the manual that comes with Visual C++ or consult www.msdn.microsoft.com

Appendix C: A note on 'pthreads' and 'windowsthreads'

  1. The CAVERNsoft libraries are built with two different flavors for Windows: one uses 'pthreads' and the other uses the native windows threads.

  2.  
  3. The pthread library is an open source project and is currently maintained by Cygnus. An application built with the pthread version of CAVERNsoft needs to execute pthreads.dll. This file can be found in the same location as the pthread version of CAVERsoft G2 ie. D:\CAVERNG2\lib\win32\pthreads - where D:\CAVERNG2 is the deployment directory described in Building and Installing CAVERNsoft Libraries Step 4

  4.  
  5. The pthread distribution is also available in the subdirectory WIN32. For more information visit http://sources.redhat.com/pthreads-win32

  6.  
  7. The native window threads is bundled alongwith the Windows operating system. The CAVERNsoft G2 library built with native windows threads can be found in the directory D:\CAVERNG2\lib\win32\windowsthreads.