/* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
/*****************************************************************************
  NAME
    rob61.ins - V3.1.2 installation script for
                for Oracle Designer/2000 Repository Object Browser (ROB)

  DESCRIPTION
    This script installs Oracle Designer/2000 Repository Object Browser (ROB)

  OWNER
    Jeremy Williams

  MODIFIED    DD-MMM-YYYY  Reason
    jewillia  08-AUG-02 Created

*****************************************************************************/
{
  {
  start_ins_list = list(current_script, 'DEBUG_ROB61, "rob61.bmp");
  EXECUTE_SCRIPT = "START.INS";
  execute("%product_home%\des2k_72.ins");

  if (doit)
    {
      ui_product(product_label);
      ui_action(instantiate(installing_product));

      ins_ratchet = "7.2.96.5.6";

      EXECUTE_SCRIPT = "INSTALL_DEPENDENCIES.INS";
      execute("%product_home%\des2k_72.ins");

      case_graphics_file = "rob61.bmp";
      EXECUTE_SCRIPT = "DES2_BB.DIS";
      execute("%product_home%\des2k_72.ins");

      EXECUTE_SCRIPT = "DES2_START_COPY.INS";
      execute("%product_home%\des2k_72.ins");

      ui_action(instantiate(removing_old));
      EXECUTE_SCRIPT = "DES2_OLD.INS";
      execute("%product_home%\des2k_72.ins");

      if (case_install_files)
        {
          ui_action(instantiate(installing_deinstl));
          copy(deinstl,nls_abbreviation);
          copy(product);

          if (patch_installation)
            {
              ui_action(instantiate(installing_patchset));
              copy(patchset);
              if (not(DATAMART_DESIGNER_RELEASE))
                {
                  copy(bin,"fp");
                }
               else
                {
                  copy(bin,"dmd");
                }
              /* see below for explanation of copy(ldll,???) */
              copy(ldll,"%language_subgroup%");
              copy(ldll_ja,"%language_subgroup%");
              copy(ldll_nls,"%nls_abbreviation%");
            }
          else if (not(case_registry_only_install))
            {
              ui_action(instantiate(installing_msb));
              copy(msb);

              ui_action(instantiate(installing_bin));
              if (not(DATAMART_DESIGNER_RELEASE))
                {
                  copy(bin,"fp");
                }
               else
                {
                  copy(bin,"dmd");
                }
              /* note that in installr/install/des2k_72.vrf, language_subgroup
                 is set to the supported language and this is used instead of
                 nls_abbreviation (the selected language) when copying group
                 ldll/ldll_nls (non US files are seperated from US for 9i support).
                 As our code is only English (US) at the moment language_subgroup
                 (the supported langauge) is always set to "US".
                 (we may soon support "JA" - check des2k_72.vrf)
              */
              copy(ldll,"%language_subgroup%");
              copy(ldll_ja,"%language_subgroup%");

              /* in a few instances we provide nls specific versions of SOME
                 files, so install the supported language (done above) and then
                 overwrite if required.
              */
              copy(ldll_nls,"%nls_abbreviation%");

              ui_action(instantiate(installing_main));
              copy(main);

              ui_action(instantiate(installing_mid));
              copy(mid,language_subgroup);
              copy(mid_ja,language_subgroup);

              ui_action(instantiate(installing_help));
              if (language_subgroup == "JA")
                {
                  /* test language subgroup to see if CD supports language
                     as files may not be on CD.
                     copy all of group as subgroup field not use for language
                  */
                  copy(help_ja);
                }
              else
                {
                  copy(help);
                }
            }
        }

      if (case_install_patch_files)
        {
          EXECUTE_SCRIPT = "INSPATCH.INS";
          execute("%product_home%\des2k_72.ins");
        }

      EXECUTE_SCRIPT = "DES2_END_COPY.INS";
      execute("%product_home%\des2k_72.ins");

      EXECUTE_SCRIPT = "INSTALL_CHILDREN.INS";
      execute("%product_home%\des2k_72.ins");

      ui_action(instantiate(modify_environment));
      ini_section = product_filename(current_product);

      {
        /* simple variable modification */
        case_modify_list = list();

        /* remove old variables */

        /* new variables */

        add(case_modify_list,list("ROB61",                            "%ROB61%",                                    ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));

        /* These are set in the user.avf */
        add(case_modify_list,list("DES2K_R61_GROUP",                        "%DES2K_R61_GROUP%",                                ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));
        add(case_modify_list,list("DES2K_R61_BULLETINS",                    "%DES2K_R61_BULLETINS%",                            ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));

        add(case_modify_list,list("SERVER_API_FRONT_PANEL61",           "4.0.12.96.16",                                    ora_config, ini_section));

        EXECUTE_SCRIPT = "MODIFY_VARIABLES.CMN";
        execute("%product_home%\des2k_72.ins");
      }

      {
        /* execute_variables */
        case_execute_list = list();

        EXECUTE_SCRIPT = "MODIFY_EXECUTE.INS";
        execute("%product_home%\des2k_72.ins");
      }

      {
        /* broadcast variables */
        case_broadcast_list = list();

        EXECUTE_SCRIPT = "MODIFY_BROADCAST.INS";
        execute("%product_home%\des2k_72.ins");
      }

      ui_action(instantiate(registering_product));
      EXECUTE_SCRIPT = "DES2_REF.INS";
      execute("%product_home%\des2k_72.ins");

      case_graphics_file = "rob61.bmp";
      EXECUTE_SCRIPT = "DES2_BB.REM";
      execute("%product_home%\des2k_72.ins");

    }

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

  EXECUTE_SCRIPT = "END.INS";
  execute("%product_home%\des2k_72.ins");

}
