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

/*****************************************************************************
  NAME
    d2kdoc60.ins - V3 installation script for Windows Oracle
                   Online Documentation

  DESCRIPTION
    This script installs Windows Oracle  Online Documentation.

  MODIFIED  MM/DD/YY    REASON
  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;

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

         /******************
          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("%ORAINFONAV_DOCPATH%\1aod60.toc"))
        {
          D2K60_DOCS = D2K60_DOCS_OLD;
          windows_delete_icons(doc);
          D2K60_DOCS = D2K60_DOCS_NEW;
        }

	 ui_action(instantiate(install_files));
         copy(doc);
         /****************************************************************
          Display the "Getting Started with Oracle Developer"
          billboard if not already displayed, and if Developer release
         *****************************************************************/
         if(exists("%installer_home%%dir_separator%d2bb_07.bmp"))
         {
            if(DEVELOPER2000_RELEASE)
            {
                if(not(DEV2K_BB07))
                {
                    DEV2K_BB07 = TRUE;
                    ui_graphics("%installer_home%%dir_separator%d2bb_07.bmp");
                }
            }
         }
         /****************************************************************/

        /* ui_action(instantiate(install_files));
         copy(doc);*/
        /******************/
        /*********************************
        Install d2kdoc  Language Supplement
        **********************************/
        /*if(child_in_control)
        {
            install_doc = TRUE;
            install(w32rdl60);

        } */

        /*permit_retry_operations = FALSE; */

        /*************
        Install Parent
        **************/
        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;

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

        /*********************
        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;
    }
    [
         'UNREGISTERED_PRODUCT: continue();
         'CANCEL: signal('FAILURE, instantiate(halt_installation));
    ]
}
