/* Copyright (c) Oracle Corporation 1996.  All Rights Reserved */
/*****************************************************************************
  NAME
    ut60.ins - V3 installation script for GUI Common Files 2.5

  DESCRIPTION
    This script installs GUI Common Files 6.0.

  MODIFIED   MM/DD/YY   Reason
*****************************************************************************/
{
    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;


        /*************************** Installer 3.2 *****************************
        Need to indicate group for dlls
        ************************************************************************/
        win32_register_OCSM_product();
       /******************
        Install the product
        *******************/
        ui_product(instantiate(display_product_label));

        ui_action(instantiate(install_gui));
        copy(deinst);
        copy(dll);
       /******************/

        permit_retry_operations = FALSE;

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

            modify("UI60", UI60, ora_config, product_filename(current_product));             /* add UI60 variable in the registry */
            win32_register_key("$ORACLE","","UI60",'REPLICATE);
        /**************************/
        /***************************************************************
        Registering map variables except Installer_home and oracle_home
        ****************************************************************/

        /****************************
        Registering map file groups
        *****************************/

        permit_retry_operations = TRUE;

        /*********************************
        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 */

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

        while(not(empty(dependency_list)))
        {
            current_dependency = first(dependency_list);
            dependency_list = rest(dependency_list);

            {reference(current_dependency, current_product);}
            ['UNREGISTERED_PRODUCT: continue();]
        }
        /*********************/

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