/* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
/*****************************************************************************
  NAME
    des2_72.ins - Windows V3 root installation script for all case client
                products.

  DESCRIPTION
    This script installs the selected case client products.

  OWNER
    Jeremy Williams

  MODIFIED    DD-MMM-YY Reason
    jewillia  03-NOV-94 Created.

*****************************************************************************/
{
  {
  start_ins_list = list(current_script, 'DEBUG_DES2_72, "des2_72.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 = "des2_72.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);
            }
          else if (not(case_registry_only_install))
            {
              ui_action(instantiate(installing_main));
              copy(main);
              copy(date,"%language_subgroup%");
              copy(date_ja,"%language_subgroup%");

              ui_action(instantiate(installing_cfg));
              copy(cfg);
            }
        }

      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("DES2_72",                     "%DES2_72%",                         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("DES2K_R61_TUTORIAL",          "%DES2K_R61_TUTORIAL%",              ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));

        add(case_modify_list,list("DESIGNER_HOME_SERVICE",       "%DESIGNER_HOME_SERVICE2%",          ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));
        add(case_modify_list,list("DESIGNER_HOME_NAME",          "%DESIGNER_HOME_NAME2%",             ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));
        add(case_modify_list,list("DESIGNER_HOME_GROUP",         "%DESIGNER_HOME_GROUP2%",            ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));
        add(case_modify_list,list("DESIGNER_HOME_KEY",           "%DESIGNER_HOME_KEY2%",              ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));
        add(case_modify_list,list("DESIGNER_KEY",                "%DESIGNER_KEY2%",                   ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));
        add(case_modify_list,list("DESIGNER_HOME_DIR",           "%ORACLE_HOME%",                     ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));

        add(case_modify_list,list("DESIGNER2000_DATE",           "DD Month YYYY",                     ora_config, ini_section));
        add(case_modify_list,list("DESIGNER2000_TIME",           "HH24:MI:SS",                        ora_config, ini_section));

        if (DESIGNER2000_RELEASE)
          {
            add(case_modify_list,list("DESIGNER2000_RELEASE",    ins_ratchet,                         ora_config, ini_section));
          }

        if (DATAMART_DESIGNER_RELEASE)
          {
            add(case_modify_list,list("DATAMART_DESIGNER_RELEASE", ins_ratchet,                         ora_config, ini_section));
          }

        add(case_modify_list,list("EXECUTE_REPORTS_RUNTIME",     "%oracle_home%\BIN\RWRUN60.EXE",    ora_config, ini_section));
        add(case_modify_list,list("EXECUTE_REPORTS_DESIGNTIME",  "%oracle_home%\BIN\RWBLD60.EXE",    ora_config, ini_section));
        add(case_modify_list,list("EXECUTE_REPORTS_GENTIME",     "%oracle_home%\BIN\RWCON60.EXE",    ora_config, ini_section));
        add(case_modify_list,list("EXECUTE_FORMS_RUNTIME",       "%oracle_home%\BIN\IFRUN60.EXE",    ora_config, ini_section));
        add(case_modify_list,list("EXECUTE_FORMS_DESIGNTIME",    "%oracle_home%\BIN\IFBLD60.EXE",    ora_config, ini_section));
        add(case_modify_list,list("EXECUTE_FORMS_GENTIME",       "%oracle_home%\BIN\IFCMP60.EXE",    ora_config, ini_section));

        /* 8.0 imp/exp */
        /* add(case_modify_list,list("EXECUTE_IMPORT",           "%oracle_home%\BIN\IMP80.EXE",       ora_config, ini_section)); */
        /* add(case_modify_list,list("EXECUTE_EXPORT",           "%oracle_home%\BIN\EXP80.EXE",       ora_config, ini_section)); */
        /* add(case_modify_list,list("EXECUTE_GUI_IMPORT",       "%oracle_home%\BIN\IMP80.EXE",       ora_config, ini_section)); */
        /* add(case_modify_list,list("EXECUTE_GUI_EXPORT",       "%oracle_home%\BIN\EXP80.EXE",       ora_config, ini_section)); */

        /* 8.1 imp/exp - do not know oracle home so assume that path is set correctly */
        add(case_modify_list,list("EXECUTE_IMPORT",              "%EXECUTE_IMPORT%",                  ora_config, ini_section));
        add(case_modify_list,list("EXECUTE_EXPORT",              "%EXECUTE_EXPORT%",                  ora_config, ini_section));
        add(case_modify_list,list("EXECUTE_GUI_IMPORT",          "%EXECUTE_GUI_IMPORT%"               ora_config, ini_section));
        add(case_modify_list,list("EXECUTE_GUI_EXPORT",          "%EXECUTE_GUI_EXPORT%"               ora_config, ini_section));

        add(case_modify_list,list("EXECUTE_WINDOW_SQL",          "%oracle_home%\bin\plus80w.exe",     ora_config, ini_section));
        add(case_modify_list,list("EXECUTE_COMMAND_SQL",         "%oracle_home%\bin\plus80.exe",      ora_config, ini_section));

        /* add(case_modify_list,list("EXECUTE_PLUS_RAU",         "%oracle_home%\bin\sqlplus.exe",     ora_config, ini_section)); */
        /* add(case_modify_list,list("EXECUTE_PLUS_RAU",         "sqlplus.exe",                       ora_config, ini_section)); */
        add(case_modify_list,list("EXECUTE_PLUS_RAU",            "%EXECUTE_PLUS_RAU%"                 ora_config, ini_section));

        add(case_modify_list,list("HTML_BROWSER",                    "%HTML_BROWSER%",                    ora_config, "%ini_section%\MLT_EDITOR"));
        add(case_modify_list,list("HTML_EDITOR",                     "%HTML_EDITOR%",                     ora_config, "%ini_section%\MLT_EDITOR"));
        add(case_modify_list,list("ASC_EDITOR",                      "%ASCII_EDITOR%",                    ora_config, "%ini_section%\MLT_EDITOR"));

        add(case_modify_list,list("EXCEPT_HANDLING_ON",              "1",                                 ora_config, ini_section));

        add(case_modify_list,list("ADOBE_ACROBAT_KEYNAME",           "SOFTWARE\\ADOBE\\Acrobat Reader\\4.0",  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");
      }

      if (not(DES2_72_REGISTRY_FILE == ""))
      {
        case_regedit_list = list(DES2_72_REGISTRY_FILE);
        EXECUTE_SCRIPT = "DES2_REGEDIT.INS";
        execute("%product_home%\des2k_72.ins");
      }

      if (not(DES2_72_DATE_FILE == ""))
      {
        case_regedit_list = list(DES2_72_DATE_FILE);
        EXECUTE_SCRIPT = "DES2_REGEDIT.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 = "des02.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");

}
