/* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
/*****************************************************************************
  NAME
    cdoc72.ins - V3.1.2 installation script for
                   Oracle Designer API Documentation

  DESCRIPTION
    This script installs Oracle Designer API Documentation

  OWNER
    Jeremy Williams

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

*****************************************************************************/
{
  {
  start_ins_list = list(current_script, 'DEBUG_CDOC72, "cdoc72.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 = "cdoc72.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);
            }
          else if (not(case_registry_only_install))
            {
              ui_action(instantiate(installing_main));
              if (not(DATAMART_DESIGNER_RELEASE))
                {
                  copy(main,"des2k");
                }
               else
                {
                  copy(main,"dmd");
                }

              ui_action(instantiate(installing_funspecs));
              copy(funspecs,language_subgroup);
              copy(funspecs_ja,language_subgroup);

              ui_action(instantiate(installing_domdefs));
              copy(domdefs,language_subgroup);
              copy(domdefs_ja,language_subgroup);
              copy(domdefs2,language_subgroup);
              copy(domdefs2_ja,language_subgroup);

              ui_action(instantiate(installing_eldefs));
              copy(eldefs,language_subgroup);
              copy(eldefs_ja,language_subgroup);
              copy(eldefs2,language_subgroup);
              copy(eldefs2_ja,language_subgroup);

              ui_action(instantiate(installing_objdefs));
              copy(objdefs,language_subgroup);
              copy(objdefs_ja,language_subgroup);

              ui_action(instantiate(installing_changes));
              copy(changes,language_subgroup);
              copy(changes_ja,language_subgroup);
              copy(changes2,language_subgroup);
              copy(changes2_ja,language_subgroup);

              ui_action(instantiate(installing_wdelete));
              copy(wdelete,language_subgroup);
              copy(wdelete_ja,language_subgroup);
              copy(wdelete2,language_subgroup);
              copy(wdelete2_ja,language_subgroup);

              ui_action(instantiate(installing_webocos));
              copy(webocos,language_subgroup);
              copy(webocos_ja,language_subgroup);

              ui_action(instantiate(installing_langdefs));
              copy(langdefs,language_subgroup);
              copy(langdefs_ja,language_subgroup);

              ui_action(instantiate(installing_ref));
              copy(ref);

              ui_action(instantiate(installing_relnotes));
              copy(relnotes);

              ui_action(instantiate(installing_concepts));
              copy(concepts,language_subgroup);
              copy(concepts_ja,language_subgroup);

              ui_action(instantiate(installing_cli));
              copy(cli,language_subgroup);
              copy(cli_ja,language_subgroup);

              if (DATAMART_DESIGNER_RELEASE)
                {
                  {
                     permit_retry_operations = FALSE;
                     spawn("%ORACLE_HOME%\bin\DMSTocGen.EXE %ORACLE_HOME%");
                  }
                  [
                    'DEFAULT: continue();
                  ]
                }
            }
        }

      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);
      documentation_section = "DOCUMENTATION\DESIGNER_2000_DOC_INDEX";
      documentation_subkey = "DOCUMENTATION\DESIGNER_2000_DOC_INDEX";

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

        /* remove old variables */
        add(case_modify_list,list("Name",               "",                                                   ora_config, documentation_section));
        add(case_modify_list,list("Location",           "",                                                   ora_config, documentation_section));
        add(case_modify_list,list("",                   "",                                                   ora_config, documentation_section));
        add(case_modify_list,list("",                   "",                                                   ora_config, documentation_subkey));

        /* new variables */

        add(case_modify_list,list("CDOC72",             "%CDOC72%",                                           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("ODD_R61_GROUP",       "%ODD_R61_GROUP%",                                    ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));
        add(case_modify_list,list("OBM_R10_GROUP",       "%OBM_R10_GROUP%",                                    ora_config, ini_section, 'INI_SECTION, 'TOP_LEVEL));
        */
        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));

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

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

        add(case_execute_list,list("FUN_SPECS",     "dir",     funspecs,     ora_config, ini_section));
        add(case_execute_list,list("DOM_DEFS",      "dir",     domdefs,      ora_config, ini_section));
        add(case_execute_list,list("EL_DEFS",       "dir",     eldefs,       ora_config, ini_section));
        add(case_execute_list,list("CHANGES",       "dir",     changes,      ora_config, ini_section));
        add(case_execute_list,list("LANG_DEFS",     "dir",     langdefs,     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 = "cdoc72.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");

}
