/* Copyright (c) Oracle Corporation 1996.  All Rights Reserved */

/****************************************************************************
  NAME
    oca60.ins - V3 installation script for OCA20 package

  DESCRIPTION
    This script installs OCA20 package.

  MODIFIED  MM/DD/YY    Reason
   Pgupta   08/07/97    created
*****************************************************************************/

{
    if (doit)
    {
          /*****************************
          Set the VRF-INS script ratchet
          ******************************/
          ins_ratchet = "6.0.0.0.0";

          execute("%installer_home%%dir_separator%%operating_system%.ins");
          permit_retry_operations  = TRUE;
          permit_ignore_operations = TRUE;
          permit_process_operations= TRUE;

          /******************
          Install the product
          *******************/
          ui_product(instantiate(display_product_label));

          ui_action(instantiate(install_files));
          copy(deinst);
          /******************/


          permit_retry_operations = FALSE;

          /******************************************
          Install all the components of the PARENT
          *******************************************/
          EXECUTE_SCRIPT = "INSTALL_COMPONENTS";
          execute("%installer_home%%dir_separator%d2kr2ins.usr");
          /******************************************/

          /*******************
           Install dependencies
          ********************/
          EXECUTE_SCRIPT = "INSTALL_DEPENDENCIES";
          execute("%installer_home%%dir_separator%d2kr2ins.usr");

          /*******************/
          permit_retry_operations = FALSE;
          /*********************************
          Register and Reference the product
          and remove delold
          **********************************/

          EXECUTE_SCRIPT = "REGISTER_REFERENCE_PRODUCT";
          {execute("%installer_home%%dir_separator%d2kr2ins.usr");}
          ['Invalid_File_Name: continue();]


          /********************************************************************
           Reference all the components of the PARENT
          *********************************************************************/
          child_products_to_reference = all_child_products(current_product);
          EXECUTE_SCRIPT = "REFERENCE_COMPONENTS";
          execute("%installer_home%%dir_separator%d2kr2ins.usr");
          /********************************************************************/

          /*************************************
          Set the install_variable in Registry
          **************************************/
          if(modify_oracle_ini)
          {
               modify(install_variable,OCA60, ora_config);
               win32_register_key("$ORACLE","",install_variable,'REPLICATE);
          }
           modify("UB", "%oracle_home%%dir_separator%DBS", ora_config);
           win32_register_key("$ORACLE","","UB",'REPLICATE);

          modify("OCA_DEBUG_ERROR","FALSE", ora_config);
          modify("OCA_DEBUG_SQL","FALSE", ora_config);
          win32_register_key("$ORACLE","","OCA_DEBUG_ERROR",'REPLICATE);
          win32_register_key("$ORACLE","","OCA_DEBUG_SQL",'REPLICATE);
         /************************************************
          Set the FORMS60_PATH install_variable in Registry
          ************************************************/
          ini_var = ini_var1;
          EXECUTE_SCRIPT = "MODIFY_ENVIRONMENT";
          execute("%installer_home%%dir_separator%d2kr2ins.usr");
          win32_register_key("$ORACLE","","FORMS60_PATH",'REPLICATE);

          /***************************************************************
          Registering map variables except Installer_home and oracle_home
          ****************************************************************/
          win32_register_map_variable("ODBC10");

          /*********************
          Reference dependencies
          **********************/
          ui_action(instantiate(reference_dependencies));

          while(not(empty(dependency_list)))
          {
               {reference(first(dependency_list), current_product);}
               ['UNREGISTERED_PRODUCT: continue();]
               dependency_list = rest(dependency_list);
          }
          /*********************/
          set("acro_flag", TRUE, 'GLOBAL);
          permit_retry_operations = FALSE;


     } /*END if doit*/
     [
          'UNREGISTERED_PRODUCT: continue();
          'CANCEL: signal('FAILURE, instantiate(halt_installation));
     ]



} /*END oca20.ins*/
