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

  DESCRIPTION
    This script installs Common Help Files.

  MODIFIED    MM/DD/YY  Reason
  pgupta      11/12/97  Created
*****************************************************************************/
{
    if (doit)
    {
        /*****************************
        Set the VRF-INS script ratchet
        ******************************/
        ins_ratchet = "6.0.8.11.0";

        execute("%installer_home%%dir_separator%%operating_system%.ins");

        permit_retry_operations  = TRUE;
        permit_ignore_operations = TRUE;
        permit_process_operations= TRUE;

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

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

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

        /************************************************************
        Delete the Old Program Group if present and Install the new
        Program Group
        *************************************************************/

        if(exists("%DOC60%/us/d2kdemo.hlp"))
        {
          D2K60_DEMOS = D2K60_DEMOS_OLD;
          windows_delete_icons(common, "us");
          D2K60_DEMOS = D2K60_DEMOS_NEW;
        }
        /************************************************************/
        copy(common,"us");

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

        permit_retry_operations = TRUE;

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

        /*********************************
        Install OIN, if required
        **********************************/
        while(not(empty(required_products_to_install)))
        {
            install(first(required_products_to_install));
            required_products_to_install = rest(required_products_to_install);
        }
        /*********************************/

        /*********************************
        Register and Reference the product
        and remove delold.
        **********************************/
        EXECUTE_SCRIPT = "REGISTER_REFERENCE_PRODUCT";
        execute("%installer_home%%dir_separator%d2kr2ins.usr");

        /********************************************************************
        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("OIN",OIN, ora_config, product_filename(current_product));
           win32_register_key("$ORACLE","","OIN",'REPLICATE);
        }
        modify("doc60_nls",DOC60_NLS,ora_config);
        win32_register_key("$ORACLE","","doc60_nls",'REPLICATE);


        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","pdpkg.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","pdpkg.hlp",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","pdincom.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","pdincom.hlp",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","d2kdemo.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","d2kdemo.hlp",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","cplsref.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","cplsref.hlp",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","fberror.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","fberror",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","fbflow1.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","fbflow1",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","fbflow2.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","fbflow2",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","fbflow3.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","fbflow3",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","fbflow4.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","fbflow4",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","obe60.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","obe60",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","obs60.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","obs60",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","go60.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","go60",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","go60r.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","go60r",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","if60.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","if60",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","de60.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","de60",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","pj60.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","pj60",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60c.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60c",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60d.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60d",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60be.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60be",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60qm.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60qm",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60r.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60r",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60x.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","rw60x",'REPLICATE);

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","nx60.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","nx60",'REPLICATE);

        if(install_forms)
        {
                ui_action(instantiate(install_files));
                copy(forms, "us");
                copy(forms, nls_abbreviation);
                win32_register_OCSM_group(forms,"us",'MEDMODE);
                win32_register_OCSM_group(forms,"nls_abbreviation",'MEDMODE);
         }
        if(install_graphics)
        {
                ui_action(instantiate(install_files));
                copy(graphics, "us");
                copy(graphics, nls_abbreviation);
                win32_register_OCSM_group(graphics,"us",'MEDMODE);
                win32_register_OCSM_group(graphics,"nls_abbreviation",'MEDMODE);
        }
        if(install_graphrun)
        {
                ui_action(instantiate(install_files));
                copy(graphics_runtime, "us");
                copy(graphics_runtime, nls_abbreviation);
                win32_register_OCSM_group(graphics_runtime,"us",'MEDMODE);
                win32_register_OCSM_group(graphics_runtime,"nls_abbreviation",'MEDMODE);
        }
        if(install_procbldr)
        {
                ui_action(instantiate(install_files));
                copy(procedure_builder, "us");
                copy(procedure_builder, nls_abbreviation);
                win32_register_OCSM_group(procedure_builder,"us",'MEDMODE);
                win32_register_OCSM_group(procedure_builder,"nls_abbreviation",'MEDMODE);
        }
        if(install_projbldr)
        {
                ui_action(instantiate(install_files));
                copy(project_builder, "us");
                copy(project_builder, nls_abbreviation);
                win32_register_OCSM_group(project_builder,"us",'MEDMODE);
                win32_register_OCSM_group(project_builder,"nls_abbreviation",'MEDMODE);
        }
        if(install_qrybldr)
        {
                ui_action(instantiate(install_files));
                copy(query_builder, "us");
                copy(query_builder, nls_abbreviation);
                win32_register_OCSM_group(query_builder,"us",'MEDMODE);
                win32_register_OCSM_group(query_builder,"nls_abbreviation",'MEDMODE);
        }
        if(install_schbldr)
        {
                ui_action(instantiate(install_files));
                copy(schema_builder, "us");
                copy(schema_builder, nls_abbreviation);
                win32_register_OCSM_group(schema_builder,"us",'MEDMODE);
                win32_register_OCSM_group(schema_builder,"nls_abbreviation",'MEDMODE);
        }
        if(install_transbldr)
        {
                ui_action(instantiate(install_files));
                copy(translation_builder, "us");
                copy(translation_builder, nls_abbreviation);
                win32_register_OCSM_group(translation_builder,"us",'MEDMODE);
                win32_register_OCSM_group(translation_builder,"nls_abbreviation",'MEDMODE);
        }

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

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

        permit_retry_operations = FALSE;

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

} /*END d2dh60.ins*/
