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

/*****************************************************************************
  NAME
    rrun60.ins - V3 installation script for Oracle Report 6.0 Runtime

  DESCRIPTION
    This script installs Oracle Report 6.0 Runtime.

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

{
    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;

        /****************************************************************
        Display the "SCALABLE SERVER-BASED REPORTING"
        billboard if not already displayed, and if Developer release
        *****************************************************************/
        if(exists("%installer_home%%dir_separator%d2bb_09.bmp"))
        {
            if(DEVELOPER2000_RELEASE)
            {
                if(not(DEV2K_BB09))
                {
                    DEV2K_BB10 = TRUE;
                    ui_graphics("%installer_home%%dir_separator%d2bb_09.bmp");
                }
            }
        }
        /****************************************************************/
	  /* Setting SQLPATH */
	  if(set_sqlpath)
          {
             {
              modify("SQLPATH", SQLPATH, ora_config);
             }
              [ 'UNBOUND_ENVIRONMENT_VARIABLE, 'FILE_NOT_FOUND: continue(); ]
              win32_register_key("$ORACLE","","SQLPATH",'REPLICATE);
          }

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


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

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

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

        copy(plb);
        copy(sql);


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

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

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

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

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

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