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

/*****************************************************************************
  NAME
    D2SCC60.ins - V3 installation script for Windows Clearcase Interface.

  DESCRIPTION
    This script installs Windows Clearcase Interface.

  MODIFIED      MM/DD/YY        REASON
   pgupta       10/01/97        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;


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

        /*************
        Install Parent
        **************/
        if(install_parent)     
            install(product_parent(current_product));
        /*************/

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

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

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


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

        if(exists("%D2SCC%\d2scc.txt"))
        {
	    OPEN2K60_DOCS_TMP = OPEN2K60_DOCS;
          OPEN2K60_DOCS = "Oracle Developer 6.0 Doc";
          windows_delete_icons(doc);
          OPEN2K60_DOCS = OPEN2K60_DOCS_TMP;
        }
        ui_action(instantiate(install_files));
        copy(doc);

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

        permit_retry_operations = TRUE;

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

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

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

        win32_set_value("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","Sc2k_cc.hlp",DOC60_NLS);
        win32_register_key("HKEY_LOCAL_MACHINE","SOFTWARE\MICROSOFT\WINDOWS\HELP","Sc2k_cc",'REPLICATE);
        /*********************
        Reference dependencies
        **********************/
        ui_action(instantiate(reference_dependencies));

        {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 d2scc60.ins*/
