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

/*****************************************************************************
  NAME
    d2tx60.ins - V3 installation script for Tuxedo Interface.

  DESCRIPTION
    This script installs Tuxedo Interface.

  MODIFIED      MM/DD/YY   REASON
   pgupta       06/12/98   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;

        /*********************************
        Set Tuxedo Interface Variables....
        **********************************/
        {modify("OPEN60", OPEN60, ora_config, product_filename(current_product));}
        [ 'UNBOUND_ENVIRONMENT_VARIABLE: continue(); ]
        win32_register_key("$ORACLE","","OPEN60",'REPLICATE);

        {modify("D2TX60", D2TX60, ora_config, product_filename(current_product));}
        [ 'UNBOUND_ENVIRONMENT_VARIABLE: continue(); ]
        win32_register_key("$ORACLE","","D2TX60",'REPLICATE);

        modify("OPEN60_PLSQL", OPEN60_PLSQL, ora_config, product_section_heading);
        win32_register_key("$ORACLE","","OPEN60_PLSQL",'REPLICATE);

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

        /*************
        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);
        copy(dll);
        copy(libs);
        copy(demos);

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

        if(exists("%D2TX60%\DOC\d2tx.pdf"))
        {
	    OPEN2K60_DOCS_TMP = OPEN2K60_DOCS;
          OPEN2K60_DOCS = "Oracle Developer 6.0 Doc";
          windows_delete_icons(doc);
          OPEN2K60_DOCS = OPEN2K60_DOCS_TMP;
        }
        copy(doc);
        /******************/

        permit_retry_operations = TRUE;

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

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

        permit_retry_operations = FALSE;

         /************************************************
          Set the FORMS60_PATH install_variable in Registry
          ************************************************/
          ini_var = ini_var1;
          ini_path_list = ini_path_list_dtx;
          EXECUTE_SCRIPT = "MODIFY_ENVIRONMENT";
          execute("%installer_home%%dir_separator%d2kr2ins.usr");
          win32_register_key("$ORACLE","","FORMS60_PATH",'REPLICATE);

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


        /****************************
         Registering map file groups
        *****************************/
         win32_register_OCSM_group(dll,'MEDMODE);
         win32_register_OCSM_group(libs,'MAXMODE);
         win32_register_OCSM_group(demos,'MAXMODE);
         win32_register_OCSM_group(doc,'MAXMODE);
         win32_register_OCSM_group(deinst,'MINMODE);
        set("acro_flag", TRUE, 'GLOBAL);

        permit_retry_operations = TRUE;

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

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


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