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

/*****************************************************************************
  NAME
    ge60.ins - V3 installation script for Graphics 6.0 Chart Wizard

  DESCRIPTION
    This script installs Windows Oracle Graphics 6.0 Chart Wizard.

  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;

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

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

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

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

        permit_retry_operations = FALSE;

        /************************************
         Install Graphics Runtime, if required
        *************************************/
        if(child_in_control)
               if(install_component)
                      install(COMPONENT_PRODUCT);
        /************************************/

        permit_retry_operations = TRUE;

        /*********************************

        /*****************************************
         Modify environment variables in Registry
        ******************************************/

        permit_retry_operations = FALSE;
        ini_var = g1_ini_var;
        ini_path_list = ini_path_list1;
        EXECUTE_SCRIPT = "MODIFY_ENVIRONMENT";
        modify_graphogd60_path = execute("%installer_home%%dir_separator%d2kr2ins.usr");
        win32_register_key("$ORACLE","",ini_var,'REPLICATE);

        ini_path_list = ini_path_list2;
        ini_var = g2_ini_var;
        EXECUTE_SCRIPT = "MODIFY_ENVIRONMENT";
        modify_graphbmp60_path = execute("%installer_home%%dir_separator%d2kr2ins.usr");
        win32_register_key("$ORACLE","",ini_var,'REPLICATE);

        ini_path_list = ini_path_list3;
        ini_var = g3_ini_var;
        EXECUTE_SCRIPT = "MODIFY_ENVIRONMENT";
        modify_gwizard60_path = execute("%installer_home%%dir_separator%d2kr2ins.usr");
        win32_register_key("$ORACLE","",ini_var,'REPLICATE);

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

        /****************************
         Registering map file groups
        *****************************/
         win32_register_OCSM_group(deinst,'MINMODE);
         win32_register_OCSM_group(dll,'MEDMODE);
         win32_register_OCSM_group(res,'MAXMODE);
        /***************************************/
        /*********************************
         Register and Reference the product
         and remove delold
        **********************************/
        EXECUTE_SCRIPT = "REGISTER_REFERENCE_PRODUCT";
        execute("%installer_home%%dir_separator%d2kr2ins.usr");
        /*********************************/

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

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

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

        permit_retry_operations = FALSE;

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