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

/*****************************************************************************
  NAME
    fapi60.ins - V3 installation script for Oracle Forms 6.0 API

  DESCRIPTION
    This script installs Oracle Forms 6.0 API.

  MODIFIED      MM/DD/YY        REASON
    pgupta   11/07/97   Created
*****************************************************************************/

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

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

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

        win32_register_OCSM_product();
        /************************************************************
        Display the "Developer INTEGRATED COMPONENTS" billboard
        if not already displayed, and if Developer release
        *************************************************************/
        if(exists("%installer_home%%dir_separator%d2bb_02.bmp"))
        {
            if(not(DEV2K_BB02))
            {
                DEV2K_BB02 = TRUE;
                ui_graphics("%installer_home%%dir_separator%d2bb_02.bmp");
            }
        }
        /************************************************************/



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

        ui_action(instantiate(install_files));
        copy(deinst);
        ui_action(instantiate(install_files));
        copy(api);
        /******************/

        permit_retry_operations = FALSE;

        /**********************************
        Install Forms Designer, if required
        ***********************************/
        if(child_in_control)
            if(install_component)
                install(COMPONENT_PRODUCT);
        /**********************************/

        permit_retry_operations = TRUE;

        /*********************************
        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("FORMS60");
        /****************************
         Registering map file groups
        *****************************/
         win32_register_OCSM_group(api,'MAXMODE);
        win32_register_OCSM_group(deinst,'MINMODE);
        /***************************************/

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

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

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

        permit_retry_operations = FALSE;
    } /*END if doit*/
    [
        'UNREGISTERED_PRODUCT: continue();
        'CANCEL: signal('FAILURE, instantiate(halt_installation));
    ]
} /*END fapi50.ins*/
