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

/*****************************************************************************
  NAME
    rtc60.ins - V3 installation script for Oracle Report 6.0 Builder

  DESCRIPTION
    This script installs Windows Oracle Report 6.0 Builder.

  MODIFIED      MM/DD/YY        REASON
  mjain         11/12/97   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 Reports Runtime, if required
         install before Designer so that .ico
         file is installed.
        ************************************/

        while(not(empty(component_products_to_install)))
        {
            install(first(component_products_to_install));
            component_products_to_install = rest(component_products_to_install);
        }
        /***********************************/


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

        ui_action(instantiate(install_files));
        copy(deinst);
        copy(exe);
        copy(dll);
	  copy(java);
        copy(user);

        /***********************************/
        permit_retry_operations = TRUE;

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

        /*************************************
        Set variable in Registry
        **************************************/

        {
            if(modify_reports60_db_auth)
            {
                modify("REPORTS60_DB_AUTH", reports60_db_auth_var, ora_config, product_filename(product_parent(current_product)));
                win32_register_key("$ORACLE", "", "REPORTS60_DB_AUTH", 'REPLICATE);
            }
        }
        [ 'UNBOUND_ENVIRONMENT_VARIABLE, 'FILE_NOT_FOUND: continue(); ]

        {
            if(modify_reports60_sys_auth)
            {
                modify("REPORTS60_SYS_AUTH", reports60_sys_auth_var, ora_config, product_filename(product_parent(current_product)));
                win32_register_key("$ORACLE", "", "REPORTS60_SYS_AUTH", 'REPLICATE);
            }
        }
        [ 'UNBOUND_ENVIRONMENT_VARIABLE, 'FILE_NOT_FOUND: continue(); ]


        permit_retry_operations = TRUE;

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