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

/*****************************************************************************
  NAME
    xru60.ins - V3 installation script for Reports Builder and Runtime Support.

  DESCRIPTION
    This script installs Reports Builder and Runtime Support.

  MODIFIED      MM/DD/YY        REASON
   pgupta       06/18/98   created
*****************************************************************************/

{
    if (doit)
    {
        
        /*****************************
        Set the VRF-INS script ratchet
        ******************************/
        ins_ratchet = "6.0.0.0.1";

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

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

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

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

        /****************************************************************
        Display the "SCALABLE SERVER-BASED REPORTING"
        billboard if not already displayed, and if Developer release
        *****************************************************************/
        if(exists("%installer_home%%dir_separator%d2bb_10.bmp"))
        {
            if(DEVELOPER2000_RELEASE)
            {
                if(not(DEV2K_BB10))
                {
                    DEV2K_BB10 = TRUE;
                    ui_graphics("%installer_home%%dir_separator%d2bb_10.bmp");
                }
            }
        }
        /****************************************************************/


        ui_action(instantiate(install_files));
        copy(xr);
        copy(XPData);
        copy(XPDataLang, "us");
        copy(sql);
        /******************/

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


        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 = FALSE;

        /*****************************************
         Modify environment variables in registry
        ******************************************/

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

        permit_retry_operations = TRUE;


        /***************************************************************
         Registering map variables except Installer_home and oracle_home
        ****************************************************************/

        /****************************
         Registering map file groups
        *****************************/
        win32_register_OCSM_group(deinst,'MINMODE);
        win32_register_OCSM_group(xr,'MEDMODE);
        win32_register_OCSM_group(XPData,'MEDMODE);
        win32_register_OCSM_group(XPDataLang, "us",'MEDMODE);
        win32_register_OCSM_group(sql,'MEDMODE);

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

        while(not(empty(dependency_list)))
        {
            {reference(first(dependency_list), current_product);}
            ['UNREGISTERED_PRODUCT: continue();]

            dependency_list = rest(dependency_list);
        }
        /*********************/

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