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

/*****************************************************************************
  NAME
    d2kqt60.ins - V3 installation script for Windows Documentation Quick Tour

  DESCRIPTION
    This script installs Windows Documentation Quick Tour.

  OWNER
  majain      01/05/00   created as a seperate component
******************************************************************************/

{
    if (doit)
    {
        /*****************************
        Set the VRF-INS script ratchet
        ******************************/
        ins_ratchet = "1.0.0.9.0";
        execute("%installer_home%%dir_separator%%operating_system%.ins");

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

        /************************************************************
        Display the "OPEN SOLUTION" billboard
        if not already displayed, and if Developer release
        *************************************************************/
        if(exists("%installer_home%%dir_separator%d2bb_08.bmp"))
        {
            if(not(DEV2K_BB08))
            {
                DEV2K_BB08 = TRUE;
                ui_graphics("%installer_home%%dir_separator%d2bb_08.bmp");
            }
        }
        /************************************************************/
        permit_retry_operations = FALSE;

        /*******************
         Install dependencies
        ********************/
        EXECUTE_SCRIPT = "INSTALL_DEPENDENCIES";
        execute("%installer_home%%dir_separator%d2kr2ins.usr");
        /*******************/

        /*********************************
        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");
        /********************************************************************/



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

        permit_retry_operations = TRUE;

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

        ui_action(instantiate(install_files));
        copy(deinst);
        copy(qtour);
        /*********************************
        Install d2dh  Language Supplement
        **********************************/
        /*if(child_in_control)
        {
            install_qtour = TRUE;
            install(w32rhl60);
        }   */


{win32_asynchronous_spawn("%doc60%%dir_separator%\us\d2q60.exe -o -d %doc60%\us");}

        ['NO_RESPONSE, 'FILE_NOT_FOUND, 'MEMORY_ERROR: continue();]

        /******************/
        permit_retry_operations = FALSE;
        /**************/
        if(install_parent)                                                  /* Install parent first, if necessary */
            install(product_parent(current_product));
        /*************/
        /*******************
         Install dependencies
        ********************/
        EXECUTE_SCRIPT = "INSTALL_DEPENDENCIES";
        execute("%installer_home%%dir_separator%d2kr2ins.usr");
        /*******************/

        permit_retry_operations = TRUE;
         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);
         }
         /*********************/

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

        /****************************
         Registering map file groups
        *****************************/
        win32_register_OCSM_group(deinst,'MINMODE);
        win32_register_OCSM_group(qtour,'MAXMODE);
        /*************************************************/

        /*********************
        Reference dependencies
        **********************/
        ui_product(instantiate(display_product_label));
        ui_action(instantiate(reference_dependencies));
        reference(current_product,product_parent(current_product));                /* reference parent */
        /*********************/

         permit_retry_operations = FALSE;
        ui_product(instantiate(display_product_label));
        permit_retry_operations = TRUE;

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


         permit_retry_operations = FALSE;

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