/* Copyright (c) Oracle Corporation 1996.  All Rights Reserved */
/*****************************************************************************
  NAME
    ion60.ins - V3 installation script for the Information Navigator 1.0

  DESCRIPTION
    This script installs the Information Navigator 1.0


  MODIFIED    MM/DD/YY   Reason
   amanian    01/22/99   Update changes to reflect language supplement files.
   PGUPTA     04/17/97   UPDATE FOR CHANGING RATCHET NUMBER AND GROUPS
   pyuen      03/21/97   update ins_ratchet from 1.0.0.0.0 to 1.0.3.1.0
             change copy(oin) to copy(res)
   aharriso   11/20/96   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_product(instantiate(display_product_label));

        ui_action(instantiate(install_files));
        copy(deinstl);

        ui_action(instantiate(install_exe));
        copy(exe);

        ui_action(instantiate(install_files));
        copy(res);

        ui_action(instantiate(install_dll));
        copy(dll);
       /******************/

        permit_retry_operations = FALSE;

        /**************************
        Modify Config Variables....
        ***************************/
        ui_action(instantiate(modify_variables));

        if (set_oin60)
        {
            modify("OIN60", OIN60, ora_config, product_filename(current_product));     /* add oin60 in Registry */
            win32_register_key("$ORACLE","","OIN60",'REPLICATE);

        }

        if (set_orainfonav_docpath)
        {
                                                                                    /* add orainfonav_docpath in Registry */
            modify("ORAINFONAV_DOCPATH", ORAINFONAV_DOCPATH, ora_config, product_filename(current_product));

            win32_register_key("$ORACLE","","ORAINFONAV_DOCPATH",'REPLICATE);
        }

        if (set_orainfonav_cdpath)
        {
                                                                                    /* add orainfonav_docpath in Registry */
            modify("ORAINFONAV_CDPATH", ORAINFONAV_CDPATH, ora_config, product_filename(current_product));
            win32_register_key("$ORACLE","","ORAINFONAV_CDPATH",'REPLICATE);
        }
        /**************************/

        /*******************
        Install dependencies
        ********************/
        ui_product(instantiate(display_product_label));

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

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

        permit_retry_operations = TRUE;

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

        /*********************************
        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));
        reference(GUI_PRODUCT, current_product);
        /*********************/

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