/* Copyright (c) Oracle Corporation 1995.  All Rights Reserved */
/*****************************************************************************
  NAME
    oci80.ins - V3 installation script for Windows 95 and Windows NT OCI 8.0

  DESCRIPTION
    This script installs Windows 95 and Windows NT OCI 8.0

  MODIFIED    DD-MMM-YY  Reason

  kpotter     3/98       version update for 805 EE
    mmckerle  20-NOV-97  Modified to install OTT only if this is the EE CD
    kakiyama  03-JUN-97  Install OTT
    echien    19-APR-95  Creation for Windows 3.1
    mclose    19-JUL-95  Adopted from Windows 3.1 and modified for Windows 95

*****************************************************************************/
{
  /**************************************************************************
      Start main logic...
   **************************************************************************/

  if (doit)
    {
      ins_ratchet = "8.0.5.0.0";

      execute("%installer_home%\%operating_system%.ins");

    /* Display an advertisement bitmap only in pkg installation of Enterprise Edition and Oracle8. */
    /* Catch unbound variable defined in user.stp and default to an empty value (rxfernan-JUN-97). */
    { install_type = install_type; }
    [ 'UNBOUND_VARIABLE: install_type = ""; ]

    if((install_type == "Oracle8 Enterprise Edition") || (install_type == "Oracle8"))
    {
        { ui_graphics("%product_home%\b5.bmp"); }
        [ 'DEFAULT : continue(); ]
    }
    /* End Display advertisement bitmap. */

      permit_retry_operations = TRUE;

      install(w32rsf80);

      if(install_ott)
         install(w32ott80);

      ui_product(product_label);

      { borland_ver = win32_get_value("HKEY_LOCAL_MACHINE", "Software\Borland\Borland C++", "CurrentVersion"); }
      [ 'DEFAULT: borland_ver = "5.0"; ]

      { borland_home = win32_get_value("HKEY_LOCAL_MACHINE", "Software\Borland\Borland C++\%borland_ver%", "BCRoot Path"); }
      [ 'DEFAULT: borland_home = "C:\BC5"; ]

      ui_action(instantiate(installing_scripts));
      copy(deinstl, nls_abbreviation);

      ui_action(instantiate(installing_ocifiles));
      copy(ocifiles);

      ui_action(instantiate(installing_ocisamples));
      copy(ocisamples);

      permit_retry_operations = FALSE;

      ui_product(product_label);

      ui_action(instantiate(registering));

      permit_retry_operation = TRUE;

      register(current_product);
      reference(w32rsf80,current_product);

      permit_retry_operation = FALSE;
  }
}
