/* Copyright (c) Oracle Corporation 1996.  All Rights Reserved */
/*****************************************************************************
  NAME
    xc60.ins - V3 installation script for the Oracle Express Connection editor

  DESCRIPTION
    This script installs the Oracle Express Connection editor

  MODIFIED    MM/DD/YY   Reason
  pgupta      06/12/98   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;


         win32_register_OCSM_product();

        /******************
        Install the product
        *******************/

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

        permit_retry_operations = FALSE;

        /**************************
        Modify Config Variables....
        ***************************/
        /**************************/


        /*******************
        Install dependencies
        ********************/

        while(not(empty(install_dependency_list)))
        {
            next_dependency = first(install_dependency_list);
            install_dependency_list = rest(install_dependency_list);

            install(next_dependency);
        }
        /*******************/

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

        /****************************
         Registering map file groups
        *****************************/
        win32_register_OCSM_group(deinst,'MINMODE);
        win32_register_OCSM_group(dll32,'MEDMODE);
        win32_register_OCSM_group(dll32nt,'MEDMODE);

         /*********************************
          Register and Reference the product
         **********************************/
         ui_product(instantiate(display_product_label));
         ui_action( instantiate(install_register) );

         register(current_product);
         reference(current_product);
         /*********************************/

        remove(delold);                                                    /* remove any outdated files if install was successful */

        permit_retry_operations = TRUE;


        /*********************
        Reference dependencies
        **********************/
        ui_product(instantiate(display_product_label));
        ui_action(instantiate(reference_dependencies));
        reference(GUI_PRODUCT, current_product);
        /*********************/

        permit_retry_operations = FALSE;
    }
    [
        'UNREGISTERED_PRODUCT: continue();
        'CANCEL: signal('FAILURE, instantiate(halt_installation));
    ]
}
