/* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
/*****************************************************************************
  NAME
    cgens72.ins - V3.1.2 installation script for
                   Oracle Server Generator 5.5.0.0

  DESCRIPTION
    This script installs Oracle Server Generator 5.5.9.0.0

  OWNER
    Jeremy Williams

  MODIFIED    DD-MMM-YY  Reason
    jewillia  07-NOV-94  Created

*****************************************************************************/
{
  {
  start_ins_list = list(current_script, 'DEBUG_CGENS72, "cgens72.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 = "cgens72.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);
              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_sql));
              copy(sql);

              ui_action(instantiate(installing_tpl_db2x));
              copy(tpl_db2x);

              ui_action(instantiate(installing_tpl_genx));
              copy(tpl_genx);

              ui_action(instantiate(installing_tpl_mapi));
              copy(tpl_mapi);

              ui_action(instantiate(installing_tpl_orcl));
              copy(tpl_orcl);

              ui_action(instantiate(installing_tpl_polx));
              copy(tpl_polx);

              ui_action(instantiate(installing_tpl_rdbx));
              copy(tpl_rdbx);

              ui_action(instantiate(installing_tpl_svrx));
              copy(tpl_svrx);

              ui_action(instantiate(installing_tpl_sybx));
              copy(tpl_sybx);

              ui_action(instantiate(installing_tpl_tapi));
              copy(tpl_tapi);

              ui_action(instantiate(installing_tpl_rr));
              copy(tpl_rr);

            }
        }

      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 */
        add(case_modify_list,list("DES2K_BULLETINS",                "", ora_config, ini_section));
        add(case_modify_list,list("EXECUTE_DB_NAVIGATOR_61",            "",                         ora_config, ini_section, 'SYSDES61_SECTION));

        /* new variables */

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

        /* These are set in the user.avf */
        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_SERVER_GEN72",        "4.0.12.96.16",                    ora_config, ini_section));

        add(case_modify_list,list("EDITOR",                         "%ASCII_EDITOR%",               ora_config, ini_section));
        add(case_modify_list,list("GENERATE_CONTINUEONWARNING",     "FALSE",                        ora_config, ini_section));
        add(case_modify_list,list("GENERATE_CONTINUESQLEXECERROR",  "FALSE",                        ora_config, ini_section));

        add(case_modify_list,list("CDS_UTILITY_MSG_DATA",               "CDS,CGENS72",                                  ora_config, ini_section, 'REPCOM61_SECTION));

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

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

        add(case_execute_list,list("EXECUTE_SERVER_GEN72",           "cgens",  bin,       ora_config, ini_section));
        add(case_execute_list,list("EXECUTE_SERVER_GEN_UI72",        "dwrsg",  bin,       ora_config, ini_section));
        add(case_execute_list,list("EXECUTE_DB_NAVIGATOR_61",        "dwb",    bin,       ora_config, ini_section));

        add(case_execute_list,list("TEMPLATE_DB2",                   "dir",    tpl_db2x,  ora_config, ini_section));
        add(case_execute_list,list("TEMPLATE_GENERIC",               "dir",    tpl_genx,  ora_config, ini_section));
        add(case_execute_list,list("TEMPLATE_MODULE_API",            "dir",    tpl_mapi,  ora_config, ini_section));
        add(case_execute_list,list("TEMPLATE_ORACLE7",               "dir",    tpl_orcl,  ora_config, ini_section));
        add(case_execute_list,list("TEMPLATE_ORACLE8",               "dir",    tpl_orcl,  ora_config, ini_section));
        add(case_execute_list,list("TEMPLATE_POLITE",                "dir",    tpl_polx,  ora_config, ini_section));
        add(case_execute_list,list("TEMPLATE_RDB",                   "dir",    tpl_rdbx,  ora_config, ini_section));
        add(case_execute_list,list("TEMPLATE_SQLSERVER",             "dir",    tpl_svrx,  ora_config, ini_section));
        add(case_execute_list,list("TEMPLATE_SYBASE",                "dir",    tpl_sybx,  ora_config, ini_section));
        add(case_execute_list,list("TEMPLATE_TABLE_API",             "dir",    tpl_tapi,  ora_config, ini_section));
        add(case_execute_list,list("TEMPLATE_RECONCILE_REPORT",      "dir",    tpl_rr,    ora_config, ini_section));

        EXECUTE_SCRIPT = "MODIFY_EXECUTE.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 = "cgens72.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");

}
