/* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
/*****************************************************************************
  NAME
    repadm61.ins - V3.1.2 installation script for
                   Oracle Repository Administrator V1.0.4.0

  DESCRIPTION
    This script installs Oracle Repository Administrator V1.0.9.0.0

  OWNER
    Jeremy Williams

  MODIFIED    DD-MMM-YY  Reason
    jewillia  03-JUL-95  Different oracle.ini groups for shared oracle
    jewillia  07-NOV-94  Created

*****************************************************************************/
{
  {
  start_ins_list = list(current_script, 'DEBUG_repadm61, "repadm61.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 = "repadm61.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);

          ui_action(instantiate(installing_registry));
          copy(regfile);

          if (patch_installation)
            {
              ui_action(instantiate(installing_patchset));
              copy(patchset);
              copy(bin);
              copy(ldll,"%language_subgroup%");
              copy(ldll_ja,"%language_subgroup%");
            }
          else if (not(case_registry_only_install))
            {
              ui_action(instantiate(installing_msb));
              copy(msb);

              ui_action(instantiate(installing_bin));
              copy(bin);
              copy(ldll,"%language_subgroup%");
              copy(ldll_ja,"%language_subgroup%");

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

              ui_action(instantiate(installing_md));
              copy(md);

              ui_action(instantiate(installing_ron));
              copy(ron);

              ui_action(instantiate(installing_ins));
              copy(ins);

              ui_action(instantiate(installing_jin));
              copy(jin);

              ui_action(instantiate(installing_utl));
              copy(utl);

              ui_action(instantiate(installing_sql));
              copy(sql);

              ui_action(instantiate(installing_cnv));
              /* changes made for Korean/Japanese/Chinese Dump file(s) */
              copy(cnv);
              copy(cnv_nls,"%nls_abbreviation%");     /* note using nls_abbreviation (a global variable) and not language_subgroup (a designer/repos variable) */

              ui_action(instantiate(installing_upg));
              copy(upg);
            }
        }

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

      /* repide_ini_section = product_filename(repide10_product); */

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

        /* remove old variables */

        /* new variables */

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

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

        add(case_modify_list,list("SERVER_API_MATRIX_DIAGRAMMER61",     "4.0.12.96.16",                                    ora_config, ini_section));
        add(case_modify_list,list("SERVER_API_RON61",                   "4.0.12.96.16",                                    ora_config, ini_section));
        add(case_modify_list,list("SERVER_API_REPOSITORY_LOADER61",     "4.0.12.96.16",                                    ora_config, ini_section));
        add(case_modify_list,list("SERVER_API_REPOSITORY_UNLOADER61",   "4.0.12.96.16",                                    ora_config, ini_section));
        add(case_modify_list,list("SERVER_API_EXCHANGE_UNLOAD61",       "4.0.12.96.16",                                    ora_config, ini_section));
        add(case_modify_list,list("SERVER_API_REPOSITORY_VERSION61",    "4.0.12.96.16",                                    ora_config, ini_section));

        /* settings used by the RON when invoking Diff/Merge Tool */
        /* RON uses the default settings when invoking a JVM for other tools eg VHV */
        /* there is a problem with negative numbers on ORCA and in the registry - use 4294967296 (Hex FFFFFFFF) instead */
        add(case_modify_list,list("JVM_NATIVE_STACK_SIZE",  4294967295,             ora_config, ini_section));
        add(case_modify_list,list("JVM_JAVA_STACK_SIZE",    4294967295,             ora_config, ini_section));
        add(case_modify_list,list("JVM_MIN_HEAP_SIZE",        33554432,             ora_config, ini_section));
        add(case_modify_list,list("JVM_MAX_HEAP_SIZE",        50331648,             ora_config, ini_section));

        /* added for RJCLARK, bug 1514219 and 1499509 and 1488380 */
        add(case_modify_list,list("ShowNewFiles",  1,             ora_config, ini_section));

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

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

        add(case_execute_list,list("EXECUTE_MATRIX_DIAGRAMMER61",        "md",                 bin,  ora_config, ini_section));
        add(case_execute_list,list("EXECUTE_RON61",                      "ron",                bin,  ora_config, ini_section));
        add(case_execute_list,list("EXECUTE_REPOSITORY_LOADER61",        "load",               bin,  ora_config, ini_section));
        add(case_execute_list,list("EXECUTE_REPOSITORY_UNLOADER61",      "load",               bin,  ora_config, ini_section));
        add(case_execute_list,list("EXECUTE_EXCHANGE_UNLOAD61",          "soe",                bin,  ora_config, ini_section));

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

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

        add(case_broadcast_list,list("BROADCAST_CKRON61"    "ron",     "CKRON61,BPMOD61,AWE61,AWF61,AWD61,AWM61,DOMDLL61,VHV", ora_config, ini_section, 'DES2_72_SECTION));
        add(case_broadcast_list,list("BROADCAST_AWM61"      "md",      "CKRON61,BPMOD61,AWE61,AWF61,AWD61,AWM61,DOMDLL61",     ora_config, ini_section, 'DES2_72_SECTION));

        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 = "repadm61.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");

}
