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

/*****************************************************************************
  NAME
    orlang30.ins - V3 installation script for Dev2000 Report Language Supplement

  DESCRIPTION
    This script installs Report Language Supplement.

  MODIFIED      MM/DD/YY        REASON
  ynuraliy      08/14/97        Created
*****************************************************************************/

{
    if(not(doit))
    {
       if(member(selected_products, w32repl60))
       {
          information_dialog("Language Supplement Files are not required if English is chosen");
       }
    }

    if (doit)
    {
        /*****************************
        Set the VRF-INS script ratchet
        ******************************/
        ins_ratchet = "6.0.8.12.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.
        ************************************/
        if(child_in_control)
            if(install_parent)
                install(product_parent(current_product));
        /***********************************/

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

        ui_action(instantiate(install_files));
        copy(deinst);
        
        if(install_rrun)
            {
                ui_action(instantiate(install_files));
                copy(rrun, nls_abbreviation);
                win32_register_OCSM_group(rrun,"nls_abbreviation",'MEDMODE);
            }


        if(install_rdes)
            {
                ui_action(instantiate(install_files));
                copy(rdes, nls_abbreviation);
                win32_register_OCSM_group(rdes,"nls_abbreviation",'MEDMODE);
            }

        if(install_rcuesnd)
            {
                ui_action(instantiate(install_files));
                copy(rcuesnd, nls_abbreviation);
                win32_register_OCSM_group(rcuesnd,"nls_abbreviation",'MEDMODE);
            }

        if(install_rsql)
            {
                ui_action(instantiate(install_files));
                copy(rsql, nls_abbreviation);
                win32_register_OCSM_group(rcuesnd,"nls_abbreviation",'MEDMODE);
            }

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

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

         permit_retry_operations = FALSE;
        /***********************************/
        /*****************************************/

        permit_retry_operations = TRUE;
        /*********************
        Reference dependencies
        **********************/
        ui_action(instantiate(reference_dependencies));

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

        /*********************/
        permit_retry_operations = FALSE;

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