home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / po7_win / install / windows.stp < prev    next >
Text File  |  1995-03-06  |  40KB  |  775 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2.  
  3. /*****************************************************************************
  4.   NAME
  5.     windows.stp - Windows V3 Installation Environment Initialization File
  6.           for V7 Oracle products
  7.  
  8.   DESCRIPTION
  9.     This script bootstraps the Windows environment for the installation
  10.     of Oracle V7 products. It is always read first by ORAINST for Windows.
  11.  
  12.   MODIFIED   MM/DD/YY REASON
  13.     zzerhoun 03/06/95 NLS_LANGUAGE: if defined entry invalid, assume unbound
  14.     LMurphy  01/12/94 Took out language prompt for Web install
  15.     zzerhoun 12/20/94 Modified to check if "chained install"
  16.     zzerhoun 12/15/94 Always ask for language when run from distribution
  17.     zzerhoun 12/15/94 Merged Customer & Oracle Home Question
  18.     zzerhoun 12/13/94 Executes user.stp, if any
  19.     dgalatin 07/25/94 Add initialization of 'reboot*' variables.
  20.     ichen    07/25/94 Add windows.shd to the copy_list.
  21.     ichen    07/22/94 Remove information_dialog for reboot. Message will be
  22.               displayed in the shutdown script
  23.     dgalatin 07/22/94 Add no_preselect variable.
  24.     ichen    07/15/94 Add problem_reboot and autoexec_reboot for shutdown
  25.                       script. 
  26.     ichen    12/13/93 Add creat_log.
  27.     ming     12/10/93 Removed false backups.
  28.     ekabatch 10/29/92 Revised the reinstall and deinstall prompts.
  29.     jicohen  10/26/92 Made sure oracle_home != v6_oracle_home
  30.     jicohen  10/26/92 Moved environment check to after user selects directory
  31.     jicohen  10/26/92 Only modify win.ini if it is already set
  32.     jicohen  10/26/92 Added windows_sys_dir and windows_dir. Moved oracle.ini
  33.     jicohen  10/23/92 Removed Oracle Installer Group from modify command
  34.     jicohen  10/23/92 Removed get_boot_drive() reference
  35.     ekabatch 08/18/92 Made it possible for the installer to recognize an
  36.               ORA_CONFIG reference that is already in win.ini.    Done
  37.               for Heather Andrus' uncompliant mail program.  :)
  38.     ekabatch 07/21/92 Added deinstall prompts.    Removed environment out of
  39.               date prompt.
  40.     ekabatch 06/19/92 Renamed registry.prd to windows.rgs.
  41.     ekabatch 05/29/92 Accomodated OS_ERROR on translate.
  42.     ekabatch 02/18/92 Moved regustry.prd to install subdirectory.
  43.     ekabatch 01/27/92 Formatted code to Oracle Coding Standards.
  44.     ekabatch 01/26/92 Added resinstall prompts.
  45.     ekabatch 04/15/92 Accomodate installer_home change: ORACLE_HOME\orainst.
  46.     ekabatch 12/11/91 Created.
  47. *****************************************************************************/
  48.  
  49. {
  50.   permit_retry_operations = FALSE;
  51.  
  52.   product_label = nls("product_label","Oracle Installer");
  53.  
  54.   
  55.   /* Let the installer know if this is a bootstrapping sequence. */
  56.   bootstrap = FALSE;
  57.  
  58.   /* Let the installer know that it is being run from distribution media. */
  59.   distribution = TRUE;
  60.  
  61.   /* Be friendly. */
  62.   problem_reboot = FALSE;
  63.   autoexec_reboot = FALSE;
  64.  
  65.   welcome = TRUE;
  66.  
  67.  
  68.   ui_product(product_label);
  69.   check_environment = nls("check_environment",
  70.                     "Checking the Environment...");
  71.   ui_action(check_environment);
  72.  
  73.   /* Check if chained installation */
  74.   {
  75.     windows_dir = windows_directory();
  76.     if (directory_name(windows_dir) == windows_dir)
  77.       temp_home = "%windows_dir%oratemp.ini";
  78.     else
  79.       temp_home = "%windows_dir%\oratemp.ini";
  80.  
  81.     if (not(exists(temp_home)))
  82.       signal('UNBOUND_ENVIRONMENT_VARIABLE);
  83.  
  84.     nls_language = translate("NLS_LANG",temp_home,"ORACLE");
  85.     customer_default = translate("CUSTOMER",temp_home,"ORACLE");
  86.     protocols = translate("PROTOCOL",temp_home,"ORACLE");
  87.     install_type = "Chained Install";
  88.     remove_file(temp_home);
  89.   } 
  90.   ['UNBOUND_ENVIRONMENT_VARIABLE: continue();]
  91.  
  92.   {
  93.     /* Get NLS Language */
  94.     {
  95.        /* Chained Installation? */
  96.        nls_language = nls_language;
  97.        signal('nls_language_set);
  98.     }
  99.     ['UNBOUND_VARIABLE: continue();]
  100.  
  101. /* LMurphy - 01/12/95 */
  102. /* Take out prompt for language for Web install */
  103. /*    ui_action(nls("default_language","Looking for a Default Language...")); */
  104.  
  105.     english = list("English","AMERICAN_AMERICA.WE8ISO8859P1");
  106.     arabic = list("Arabic","ARABIC_UNITED ARAB EMIRATES.AR8MSAWIN");
  107.     brazilian_portuguese = list("Brazilian Portuguese",
  108.             "BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1");
  109.     czech = list("Czech","CZECH_CZECHOSLOVAKIA.EE8ISO8859P2");
  110.     danish = list("Danish","DANISH_DENMARK.DK8PC850");
  111.     dutch = list("Dutch","DUTCH_THE NETHERLANDS.WE8ISO8859P1");
  112.     finnish = list("Finnish","FINNISH_FINLAND.SF8PC850");
  113.     french = list("French","FRENCH_FRANCE.WE8ISO8859P1");
  114.     german = list("German","GERMAN_GERMANY.WE8ISO8859P1");
  115.     greek = list("Greek","GREEK_GREECE.EL8PC437S");
  116.     hungarian = list("Hungarian","HUNGARIAN_HUNGARY.EE8ISO8859P2");
  117.     italian = list("Italian","ITALIAN_ITALY.WE8ISO8859P1");
  118.     japanese = list("Japanese","JAPANESE_JAPAN.JA16SJIS");
  119.     norwegian = list("Norwegian","NORWEGIAN_NORWAY.N8PC850");
  120.     polish = list("Polish","POLISH_POLAND.EE8ISO8859P2");
  121.     portuguese = list("Portuguese","PORTUGUESE_PORTUGAL.WE8ISO8859P1");
  122.     russian = list("Russian","RUSSIAN_CIS.RU8PC866");
  123.     slovak = list("Slovak","SLOVAK_CZECHOSLOVAKIA.EE8ISO8859P2");
  124.     spanish = list("Spanish","SPANISH_SPAIN.WE8ISO8859P1");
  125.     swedish = list("Swedish","SWEDISH_SWEDEN.S8PC850");
  126.     turkish = list("Turkish","TURKISH_TURKEY.TR8PC857");
  127.  
  128.     language_content = nls("language_content","Language");
  129.     lang_list = list(english,arabic,brazilian_portuguese,
  130.              czech,danish,dutch,finnish,french,german,
  131.              greek,hungarian,italian,japanese,
  132.              norwegian,polish,portuguese,
  133.              russian,slovak,spanish,swedish,turkish);
  134.  
  135.     language_list = list(first(english),first(arabic),
  136.              first(brazilian_portuguese),
  137.              first(czech),
  138.              first(danish),first(dutch),first(finnish),
  139.              first(french),first(german),first(greek),
  140.              first(hungarian),
  141.              first(italian),first(japanese),
  142.              first(norwegian),first(polish),
  143.              first(portuguese),first(russian),
  144.              first(slovak),first(spanish),first(swedish),
  145.              first(turkish));
  146.  
  147.     {
  148.       language_prompt = nls("language_prompt","Please select the language in which you would like to run Oracle Products.");
  149.       language_warn = nls("language_warn","Products not yet supported in your selected language will default to English.");
  150.       language_help = nls("language_help","You are being asked to select the language you would like to use. The Oracle Installer will run in that language.%carriage_return%%carriage_return%Some products may not yet be supported in the language you have selected.  In this case the default will be English.%carriage_return%%carriage_return%If you change your language selection at a later time, already installed products will still use your previous selection, until you reinstall them with the new language.");
  151.  
  152.       language_exists_default = default_language(); 
  153.  
  154.       lng_list = lang_list;
  155.       while(not(empty(lng_list)))
  156.       {
  157.         if (language_exists_default == first(rest(first(lng_list))))
  158.           break();
  159.         else
  160.           lng_list = rest(lng_list);
  161.       }
  162.  
  163.       if (empty(lng_list))
  164.         signal('UNBOUND_ENVIRONMENT_VARIABLE);
  165.  
  166.       language_default = first(first(lng_list));
  167.  
  168.       language_old_prompt = instantiate(nls("language_old_prompt","The previously selected language is %%language_default%%."));
  169.       language_prompt = "%language_prompt%  %language_warn%%carriage_return%%carriage_return%%language_old_prompt%";
  170.     }
  171.     [ 'UNBOUND_ENVIRONMENT_VARIABLE:
  172.       {
  173.         language_default = first(english);
  174.         language_new_prompt = nls("language_new_prompt","No previously selected language was found.");
  175.         language_prompt = "%language_prompt%  %language_warn%%carriage_return%%carriage_return%%language_new_prompt%";
  176.       }
  177.     ]
  178.  
  179.     if (welcome)
  180.     {
  181.       welcome_prompt = nls("welcome_prompt",
  182.                            "Welcome to the Oracle Installer.");
  183.       language_prompt = "%welcome_prompt% %language_prompt%";
  184.     }
  185.  
  186.     welcome = FALSE;
  187.  
  188. /* LMurphy - 01/12/95 */
  189. /* Take out prompt for language for Web install */
  190. /* Will now default to first of lang_list which is English */
  191. /*    nls_language = single_selection_dialog(language_prompt,
  192.                                            language_list,
  193.                            language_default,
  194.                                            language_content,
  195.                            language_help);
  196.  
  197.     while(not(nls_language == first(first(lang_list))))
  198.       lang_list = rest(lang_list);
  199. */
  200.  
  201.     nls_language = first(rest(first(lang_list)));
  202.   }
  203.   ['nls_language_set: continue();]
  204.     
  205.   set_default_language(nls_language);
  206.  
  207.   reopen_resource_file(); 
  208.  
  209.  
  210.   /* Define NLS strings for makedir.vrf */
  211.   {
  212.     makedir_specify_drive = nls("makedir_specify_drive","The path that you have entered, '%%makedir_path_to_check%%', is not a valid path because it does not specify a drive.");
  213.     makedir_bad_drive = nls("makedir_bad_drive", "The path, '%%makedir_path_to_check%%', is not valid because the drive '%%makedir_drive%%:' does not exist.");
  214.     makedir_no_dir = nls("makedir_no_dir", "'%%makedir_path_to_check%%' does not specify a directory. Please specify a directory name in your path.");
  215.     makedir_invalid_path = nls("makedir_invalid_path", "'%%makedir_path_to_check%%' is not a valid path.");
  216.     makedir_absolute_path = nls("makedir_absolute_path", "'%%makedir_path_to_check%%' is not an absolute path.");
  217.     makedir_illegal_char = nls("makedir_illegal_char", "'%%makedir_path_to_check%%' is not a valid path because it contains the illegal character '%%makedir_bad_char%%'.");
  218.     makedir_name_too_long = nls("makedir_name_too_long","The directory, '%%makedir_name%%', of the path '%%makedir_path_to_check%%' is too long.");
  219.     makedir_illegal_name = nls("makedir_illegal_name","The directory, '%%makedir_name%%', of the path '%%makedir_path_to_check%%' is not a legal name.");
  220.     makedir_dir_not_accessible = nls("makedir_dir_not_accessible","The directory, '%%makedir_current_path%%', is not accessible.");
  221.     makedir_cant_create_dir = nls("makedir_cant_create_dir","The Installer could not create the directory '%%makedir_current_path%%' : %%makedir_signal%%"); 
  222.     makedir_long_basename = nls("makedir_long_basename","The directory, '%%makedir_name%%', of the path, '%%makedir_path_to_check%%', is not legal because the basename '%%makedir_base%%' contains more than 8 characters.");  
  223.     makedir_long_extension = nls("makedir_long_extension","The directory, '%%makedir_name%%', of the path, '%%makedir_path_to_check%%', is not legal because the extension '%%makedir_ext%%' contains more than 3 characters.");
  224.     makedir_has_white_space = nls("makedir_has_white_space","The directory, '%%makedir_name%%', of the path, '%%makedir_path_to_check%%', contains a space or tab character. To avoid confusion, you should not enter a directory which does not contain any whitespace characters.");
  225.   } 
  226.  
  227.   check_environment = nls("check_environment",
  228.                     "Checking the Environment...");
  229.  
  230.   cancel_prompt01 = nls("cancel_prompt01","Installation terminated at user request."); 
  231.  
  232.   ui_action(check_environment);
  233.   windows_dir = windows_directory();
  234.   windows_sys_dir = windows_system_directory();
  235.  
  236.   if (earlier_version(dos_version(),"4"))
  237.     default_home = "C:\ORAWIN";
  238.   else
  239.   {
  240.     boot_drive = dos_boot_drive();
  241.     default_home = "%boot_drive%:\ORAWIN";
  242.   }
  243.  
  244.   current_home = "";
  245.   current_config = "";
  246.   if (directory_name(windows_dir) == windows_dir)
  247.     default_config = "%windows_dir%oracle.ini";
  248.   else
  249.     default_config = "%windows_dir%\oracle.ini";
  250.   has_v6_oracle_home = FALSE;
  251.   has_v7_oracle_home = FALSE;
  252.  
  253.   home_help = nls("home_help","You are being asked to select the location to which Oracle products are to be installed.");
  254.  
  255.   customer_content = nls("customer_content","Company Name");
  256.   customer_prompt = nls("customer_prompt","Please enter the name of the company to which this Oracle product has been licensed:");
  257.   customer_help = nls("customer_help","You are being asked to enter the name of the company to which this copy of Oracle has been licensed. This information will be internally recorded for licensing purposes.");        
  258.  
  259.   customer_label = customer_content; 
  260.   { the_customer_name = customer_default; }
  261.   ['UNBOUND_VARIABLE:
  262.     { customer_default = customer_name(); }
  263.     ['UNKNOWN_CUSTOMER: customer_default = ""; ]
  264.   ]
  265.   customer_list = list('label, customer_label,
  266.                        'default,customer_default);
  267.  
  268.  
  269.   ui_action(nls("locate_home","Locating Oracle Home..."));
  270.  
  271.   {
  272.     v6_config = v6_translate("%%CONFIG%%");
  273.     v6_oracle_home = v6_translate("%%ORACLE_HOME%%");
  274.     pathify(v6_oracle_home);
  275.     has_v6_oracle_home = TRUE;
  276.   }
  277.   [
  278.     'OS_ERROR:
  279.       { v6_oracle_home = ""; v6_config = ""; }
  280.     'UNBOUND_ENVIRONMENT_VARIABLE: 
  281.       { v6_oracle_home = "";v6_config = ""; }
  282.   ]
  283.  
  284.  
  285.   {
  286.     oracle_home = v7_translate("ORACLE_HOME");
  287.     pathify(oracle_home);
  288.     current_home = oracle_home;
  289.     has_v7_oracle_home = TRUE;
  290.   }
  291.   [
  292.     'OS_ERROR: oracle_home = default_home; 
  293.     'UNBOUND_ENVIRONMENT_VARIABLE: oracle_home = default_home;
  294.   ]
  295.  
  296.   {
  297.     ora_config = v7_translate("ORA_CONFIG");
  298.     current_config = ora_config;
  299.   }
  300.   [
  301.     'OS_ERROR: { ora_config = default_config; }
  302.     'UNBOUND_ENVIRONMENT_VARIABLE: { ora_config = default_config; } 
  303.   ]
  304.  
  305.   if (v6_oracle_home == oracle_home)
  306.     oracle_home = default_home;
  307.  
  308.   if ((v6_config == ora_config) || (not(contains(ora_config,".ini"))))
  309.     ora_config = default_config;
  310.  
  311.   found_good_home = FALSE;
  312.  
  313.   if (has_v7_oracle_home)
  314.     if (directory_name(oracle_home) == oracle_home)
  315.     {
  316.       root_level_config_prompt = instantiate(nls("root_level_config_prompt","This machine is configured for Oracle products to be installed to '%%oracle_home%%'. However, Oracle products cannot be installed to the root directory of a drive. Please choose a different directory."));
  317.  
  318.       root_level_config_content = nls("root_level_config_content","Top-Level Directory");
  319.       information_dialog(root_level_config_prompt,root_level_config_content);
  320.       has_v7_oracle_home = FALSE;
  321.     }
  322.     else if (exists(oracle_home)) 
  323.       found_good_home = TRUE;
  324.     else
  325.     {
  326.       has_v7_oracle_home = FALSE;
  327.       oracle_home = default_home;
  328.     }
  329.  
  330.   directory_prompt = nls("directory_prompt","Where should Oracle products be installed?");
  331.   directory_add_prompt = "";
  332.   if (found_good_home)
  333.   {
  334.     have_home_prompt = instantiate(nls("have_home_prompt","Note that Oracle products are currently installed in '%%oracle_home%%'. Changing the location of Oracle Home will disable the products currently installed there."));
  335.     directory_add_prompt = "%directory_add_prompt%%carriage_return%%have_home_prompt%";
  336.   }
  337.  
  338.   if ((oracle_home == v6_oracle_home) && (v6_config == ora_config))
  339.   {
  340.     more_home_help = instantiate(nls("config_home_help","
  341.  
  342. WARNING: The DOS environment variable CONFIG points to %%v6_config%%. This file indicates that %%oracle_home%% is the DOS Oracle Home. However, %%v6_config%% is also the Oracle configuration file for Windows. You may install Windows products in %%oracle_home%%, but please run the Oracle Installer for DOS to correct the value of the DOS environment variable CONFIG."));
  343.     directory_add_prompt = "%directory_add_prompt%%carriage_return%%more_home_help%";
  344.   }
  345.  
  346.   /* call makedir.vrf */
  347.   if (v6_config != ora_config)
  348.   {
  349.     makedir_bad_dir_list = list(v6_oracle_home);
  350.     makedir_bad_dir_message_list = list(nls("windows_vs_dos_message",
  351.                   "You cannot install Windows Oracle products into the same directory as DOS Oracle products."));
  352.     makedir_bad_dir_content_list = list(nls("windows_vs_dos_content",
  353.                   "Windows vs. DOS"));
  354.     makedir_bad_dir_help_list = list(nls("windows_vs_dos_help",
  355.                    "The Installer has detected a DOS Oracle Home at '%%makedir_path_to_check%%'. The process of installing Windows Oracle products into a DOS Oracle Home may render certain DOS Oracle products unusable."));
  356.   }
  357.  
  358.   makedir_default_dir = oracle_home;
  359.   makedir_select_dir_prompt = "%directory_prompt%%directory_add_prompt%";
  360.   makedir_root_message = nls("root_directory_message", "'%%makedir_path_to_check%%' is a root directory. Oracle products cannot be installed to a root directory of a drive. Please choose a different directory.");
  361.   makedir_root_content = nls("root_directory_content","Top-Level Directory");
  362.   makedir_root_help = nls("makedir_root_help", "'%%makedir_path_to_check%%' is a root directory. Oracle products cannot be installed to a root directory of a drive. Please choose a directory such as %%makedir_path_to_check%%ORAOS2.");
  363.  
  364.  
  365.  
  366.   home_label = nls("home_label","Oracle Home");
  367.   home_default = oracle_home;
  368.   home_help = nls("home_help","You are being asked to enter the location where you would like to install Oracle products.");  
  369.   home_list = list('label, home_label,
  370.                    'default,home_default
  371.                    'browse);
  372.  
  373.   
  374.   { 
  375.     if (install_type != "Chained Install")
  376.       signal('UNBOUND_VARIABLE);
  377.   }
  378.   ['UNBOUND_VARIABLE:
  379.     {
  380.       install_settings_content = nls("install_settings_content",
  381.                                      "Oracle Installation Settings");
  382.       install_settings_help = instantiate(nls("install_settings_help",
  383.                                               "%%customer_label%%: %%customer_help%%%carriage_return%%carriage_return%%%home_label%%: %%home_help%%%%directory_add_prompt%%"));
  384.       install_settings_prompt = nls("install_settings_prompt",
  385.                                   "Please enter the following Oracle installation settings:");
  386.       if (welcome)
  387.       {
  388.         welcome_prompt = nls("welcome_prompt",
  389.                            "Welcome to the Oracle Installer.");
  390.         install_settings_prompt = "%welcome_prompt% %install_settings_prompt%";
  391.         welcome = FALSE;
  392.       }  
  393.  
  394.       install_settings_choices = multiple_text_dialog(install_settings_prompt,
  395.                                                       list(customer_list,
  396.                                                            home_list),
  397.                                                       install_settings_content,
  398.                                                       install_settings_help);
  399.  
  400.       the_customer_name = first(install_settings_choices);
  401.       while(the_customer_name == "")
  402.         the_customer_name = text_dialog(customer_prompt,"",
  403.                                    customer_content,
  404.                         customer_help);
  405.  
  406.       makedir_path_to_check = first(rest(install_settings_choices));
  407.       makedir_skip_pass = TRUE;
  408.     }
  409.   ]
  410.  
  411.   { save_customer_name(the_customer_name);}
  412.     [ 'WRITE_PROTECTED: continue(); 
  413.       'WRITE_ERROR: continue(); ]
  414.     
  415.  
  416.   directory = execute("makedir.vrf");
  417.  
  418.  
  419.   dos_config_prompt = instantiate(nls("dos_config_prompt1","The DOS CONFIG variable points to %%v6_config%%. This is an illegal configuration that may cause problems. Please run the Oracle Installer for DOS to correct this problem."));
  420.   dos_config_content = nls("dos_config_content","DOS CONFIG Variable");
  421.           
  422.   if (v6_config == ora_config)
  423.     information_dialog(dos_config_prompt,
  424.                dos_config_content,
  425.                instantiate(nls("dos_config_help1","The DOS environment variable CONFIG points to %%v6_config%%. This is an illegal configuration because %%v6_config%% is the Oracle configuration file for Windows. Please run the Oracle Installer for DOS to correct this problem.")));
  426.   else if (contains(v6_config,".ini"))
  427.     information_dialog(dos_config_prompt,
  428.                dos_config_content,
  429.                instantiate(nls("dos_config_help2","The DOS environment variable CONFIG points to %%v6_config%%. This is an illegal configuration because %%v6_config%% is a Windows INI file. Please run the Oracle Installer for DOS to correct this problem.")));
  430.   
  431.   if (oracle_home != directory)
  432.     oracle_home = directory;
  433.  
  434.   /* Make sure ora_config is correct. */
  435.  
  436.   if (not(exists(ora_config)))
  437.     ora_config = default_config;
  438.  
  439.   if (current_config != ora_config)
  440.     modify("ORA_CONFIG",ora_config);
  441.  
  442.   /* Make sure Oracle Home is correct. */
  443.   {
  444.     if (directory_name(windows_dir) == windows_dir)
  445.       translate("ORACLE_HOME","%windows_dir%win.ini");
  446.     else
  447.       translate("ORACLE_HOME","%windows_dir%\win.ini");
  448.     modify("ORACLE_HOME","");
  449.   }
  450.   [ 'UNBOUND_ENVIRONMENT_VARIABLE: continue(); ]
  451.  
  452.   { current_home = v7_translate("ORACLE_HOME"); pathify(current_home); }
  453.   [ 'OS_ERROR: { current_home = ""; }
  454.      'UNBOUND_ENVIRONMENT_VARIABLE: { current_home = ""; } ]
  455.  
  456.   if (oracle_home != current_home)
  457.     {
  458.       old_dir = directory_name(ora_config);
  459.       if (directory_name(old_dir) == old_dir)
  460.     ora_config_backup = "%old_dir%ORACLE.BAK";
  461.       else
  462.     ora_config_backup = "%old_dir%\ORACLE.BAK";
  463.  
  464.       { move_file(ora_config,ora_config_backup); }
  465.       [ 'default: continue(); ]
  466.  
  467.       modify("ORACLE_HOME",oracle_home,ora_config);
  468.     }
  469.  
  470.   config_anomaly_help = nls("config_anomaly_help","The Installer has detected the following problems in your configuration:");
  471.   config_anomaly_help1 = instantiate(nls("config_anomaly_help1","
  472.  
  473. A CONFIG.ORA file was found in the %%oracle_home%%\BIN directory. This file may interfere with the correct operation of some Oracle products."));
  474.   config_anomaly_help2 = instantiate(nls("config_anomaly_help2","
  475.  
  476. An ORACLE.INI file was found in the %%oracle_home%%\BIN directory. Since your configuration uses %%ora_config%% instead, this file may interfere with the correct operation of Oracle products."));
  477.   config_anomaly_help3 = nls("config_anomaly_help3","
  478.  
  479. It is recommended that you remove this file before you install other Oracle products. Otherwise, they may not function properly.");
  480.   config_anomaly_help4 = nls("config_anomaly_help4","
  481.  
  482. It is recommended that you remove these files before you install other Oracle products. Otherwise, they may not function properly.");
  483.   config_anomaly_content = nls("config_anomaly_content","Configuration Problem");
  484.   config_anomaly_message = instantiate(nls("config_anomaly_message","There are one or more configuration files located in the %%oracle_home%%\BIN directory. These files may prevent Oracle products from functioning properly. Please choose Help for more details."));
  485.  
  486.   config_ora_found = FALSE; oracle_ini_bad = FALSE;
  487.   
  488.   if (exists("%oracle_home%\bin\config.ora"))
  489.     {
  490.       config_ora_found = TRUE;
  491.       config_anomaly_help = "%config_anomaly_help% %config_anomaly_help1%";
  492.     }
  493.  
  494.   if (exists("%oracle_home%\bin\oracle.ini") &&
  495.       ora_config != "%oracle_home%\bin\oracle.ini")
  496.     {
  497.       oracle_ini_bad = TRUE;
  498.       config_anomaly_help = "%config_anomaly_help% %config_anomaly_help2%";
  499.     }
  500.  
  501.   if (config_ora_found || oracle_ini_bad)
  502.     {
  503.       if (config_ora_found && oracle_ini_bad)
  504.     config_anomaly_help = "%config_anomaly_help% %config_anomaly_help4%";
  505.       else
  506.     config_anomaly_help = "%config_anomaly_help% %config_anomaly_help3%";
  507.  
  508.       information_dialog(config_anomaly_message,config_anomaly_content,config_anomaly_help);
  509.     }
  510.   
  511.   /* Make sure the Oracle Home directories and the registration file exist. */
  512.  
  513.   {
  514.     if (not(exists("%oracle_home%\bin")))
  515.       make_directory("%oracle_home%\bin");
  516.  
  517.     if (not(exists("%oracle_home%\dbs")))
  518.       make_directory("%oracle_home%\dbs");
  519.  
  520.     if (not(exists("%oracle_home%\orainst")))
  521.       make_directory("%oracle_home%\orainst");
  522.   }
  523.   [
  524.     'WRITE_ERROR: signal('failure,instantiate(nls("subdir_failure1","It was not possible to create a subdirectory in %%oracle_home%%.")));
  525.     'FILE_NOT_FOUND: signal('failure,nls("subdir_failure2","An internal Installer error occurred because of a problem with the operating system."));
  526.   ]
  527.  
  528.   /* create log file */
  529.   {
  530.     { 
  531.       copy_file("%oracle_home%\orainst\orainst.log",
  532.         "%oracle_home%\orainst\orainst.olg");
  533.     } [ 'default: continue(); ]
  534.  
  535.     create_log("%ORACLE_HOME%\ORAINST\ORAINST.LOG",FALSE);
  536.   } [ 'default: continue(); ]
  537.  
  538.   /* resume_logging();   */
  539.  
  540.   /* log the windows env */
  541.   log_state();
  542.   windows_log_state();
  543.  
  544.   if (not(exists("%oracle_home%\orainst\windows.rgs")))
  545.     create_file("%oracle_home%\orainst\windows.rgs");
  546.  
  547.   modify("NLS_LANG",nls_language,ora_config);
  548.   modify("ORAINST","%oracle_home%\dbs",ora_config);
  549.  
  550.   autoexec_modified = FALSE;
  551.  
  552.   identifying_boot_drive = nls("identifying_boot_drive",
  553.                            "Identifying the Boot Drive...");
  554.  
  555.   boot_drive_prompt = nls("boot_drive_prompt","Please select the drive from which you boot your computer:");
  556.  
  557.   boot_drive_content = nls("boot_drive_content","Boot Drive");
  558.   boot_drive_help = nls("boot_drive_help","You are being asked to identify the drive from which you boot your computer.");
  559.  
  560.   { environment_path = v6_translate("%%PATH%%"); }
  561.   [ 'OS_ERROR: environment_path = "";
  562.     'UNBOUND_ENVIRONMENT_VARIABLE: environment_path = "";
  563.   ]
  564.             
  565.   exploded_environment_path = explode(environment_path,";");
  566.   if (member(exploded_environment_path,"%oracle_home%\bin"))
  567.     bin_on_envir_path = TRUE;
  568.   else
  569.     bin_on_envir_path = FALSE;
  570.   
  571.   if (not(bin_on_envir_path))
  572.   {
  573.     ui_action(identifying_boot_drive);
  574.  
  575.       if (earlier_version(dos_version(),"4"))
  576.         {
  577.           mapped_drives = dos_mapped_drives();
  578.  
  579.       extract(mapped_drives,"A"); extract(mapped_drives,"B");
  580.  
  581.       boot_drive = single_selection_dialog(boot_drive_prompt, mapped_drives,boot_drive_content,boot_drive_help);
  582.  
  583.     }
  584.       else
  585.     boot_drive = dos_boot_drive();
  586.  
  587.       variable = "SET PATH";
  588.       separator = " = ";
  589.  
  590.       {
  591.         if (not(exists("%boot_drive%:\AUTOEXEC.BAT")))
  592.           create_file("%boot_drive%:\AUTOEXEC.BAT");
  593.  
  594.         { autoexec_path = translate(variable,
  595.                     "%boot_drive%:\AUTOEXEC.BAT",
  596.                     separator); }
  597.           [ 'UNBOUND_ENVIRONMENT_VARIABLE:
  598.         { variable = "PATH";
  599.           { autoexec_path = translate(variable,
  600.                       "%boot_drive%:\AUTOEXEC.BAT",
  601.                       separator); }
  602.             [ 'UNBOUND_ENVIRONMENT_VARIABLE:
  603.               { separator = " ";           
  604.             { autoexec_path = translate(variable,
  605.                         "%boot_drive%:\AUTOEXEC.BAT",
  606.                         separator); }
  607.               [ 'UNBOUND_ENVIRONMENT_VARIABLE:
  608.                 { autoexec_path = ""; continue(); } ] 
  609.               } ]
  610.         } ]
  611.       }
  612.       exploded_autoexec_path = explode(autoexec_path,";");
  613.       if (member(exploded_autoexec_path,"%oracle_home%\bin"))
  614.         bin_on_auto_path = TRUE;
  615.       else
  616.         bin_on_auto_path = FALSE;
  617.  
  618.       if (bin_on_auto_path)
  619.         {  
  620.       path_problem_prompt = instantiate(nls("path_problem_prompt","The PATH variable correctly includes '%%oracle_home%%\BIN' in your '%%boot_drive%%:\AUTOEXEC.BAT' file, but does not do so in the DOS environment. Third party products that access Oracle databases may not function properly until the PATH variable has been corrected."));
  621.       path_problem_content = nls("path_problem_content","PATH Problem");
  622.       path_problem_help = instantiate(nls("path_problem_help","The PATH variable correctly includes '%%oracle_home%%\BIN' in your '%%boot_drive%%:\AUTOEXEC.BAT' file, but does not do so in the DOS environment. This problem may have arisen from a manual change of the PATH variable, in which case rebooting your computer will resolve the problem. It is also possible that your PATH variable has been changed by some other software you are running or by a DOS batch file you have executed. In that case, it is necessary for you to track the problem manually." ));
  623.       problem_reboot = TRUE;
  624.     }
  625.       else
  626.         {
  627.           autoexec_path = "%oracle_home%\BIN;%autoexec_path%";
  628.           autoexec_path = implode(explode(autoexec_path,";"),";");
  629.       autoexec_path = "%autoexec_path%;";
  630.       len = length(autoexec_path);
  631.       if (len > 127)
  632.         additional_changes_help = instantiate(nls("greater_path_length","
  633.  
  634. These changes will result in a search path length of %%len%%, exceeding the DOS limit of 127. You will have to correct this manually. One solution may be shorter directory names."));
  635.       else
  636.         additional_changes_help = "";
  637.  
  638.       has_dos_oracle_home = nls("has_dos_oracle_home","A DOS Oracle Home has been detected.");
  639.  
  640.       modify_autoexec_prompt = instantiate(nls("modify_autoexec_prompt","The PATH variable does not include directory '%%oracle_home%%\BIN'. Third party products that access Oracle databases may not function properly unless '%%oracle_home%%\BIN' is on the PATH. Do you wish the Installer to modify '%%boot_drive%%:\AUTOEXEC.BAT' to add this directory to the PATH?"));
  641.       modify_autoexec_content = nls("modify_autoexec_content",
  642.                     "Configuration");
  643.       modify_autoexec_help = instantiate(nls("modify_autoexec_help","The PATH variable does not include directory '%%oracle_home%%\BIN'. Third party products that access Oracle database may not function properly unless '%%oracle_home%%\BIN' is on the PATH. Choose 'Yes' if you wish the Installer to modify your '%%boot_drive%%:\AUTOEXEC.BAT' file to add this directory to the PATH. Choose 'No' if you wish to modify '%%boot_drive%%:\AUTOEXEC.BAT' yourself.
  644.  
  645. If you choose 'Yes', you will need to reboot your computer for the change to your PATH variable to take effect."));
  646.  
  647.       if (has_v6_oracle_home)
  648.         modify_autoexec_help = "%has_dos_oracle_home% %modify_autoexec_help%";
  649.       
  650.       modify_autoexec_help = "%modify_autoexec_help% %additional_changes_help%";
  651.  
  652.       modify_autoexec = yesno_dialog(modify_autoexec_prompt,FALSE,
  653.                      modify_autoexec_content,
  654.                      modify_autoexec_help);
  655.       if (modify_autoexec)
  656.         {
  657.           modify(variable,autoexec_path,
  658.              "%boot_drive%:\AUTOEXEC.BAT",separator);
  659.           autoexec_modified = TRUE;
  660.           autoexec_changed_message = nls("autoexec_changed_message","In order for the changes to your AUTOEXEC.BAT file to take effect, your PC must be rebooted. It is recommended that you do so prior to using any Oracle products.");
  661.               autoexec_changed_content = nls("autoexec_changed_content","AUTOEXEC.BAT Changed");
  662.               autoexec_changed_help = nls("autoexec_changed_help","Changes have been made to your AUTOEXEC.BAT file. These changes will not take effect until you reboot your PC. You may install Oracle products before you reboot, but it is recommended that you reboot your PC prior to using any Oracle products.");
  663.           { no_preselect = empty(selected_products); }
  664.             [ 'UNBOUND_VARIABLE: no_preselect = TRUE; ]
  665.           if (not(bootstrap && no_preselect))
  666.                 autoexec_reboot = TRUE;
  667.         }
  668.         } /* %ORACLE_HOME%\BIN not on PATH in AUTOEXEC.BAT */
  669.     } /* %ORACLE_HOME%\BIN not on PATH in DOS environment */
  670.  
  671.   {
  672.     ui_action(nls("installing_scripts",
  673.           "Installing Common Installer Functions..."));
  674.     inst_dir = "%oracle_home%\ORAINST";
  675.     backup_dir = "%inst_dir%\backup";
  676.     backup_marker = "%inst_dir%\backup.mk";
  677.     copy_list = list("WINDOWS.AVF", "WINDOWS.VRF", "WINDOWS.PVF",
  678.              "WINDOWS.INS", "WINDOWS.DEI", "WINDOWS.PIN", 
  679.                      "WINDOWS.SHD",
  680.              "PATH.VRF", "MAKEDIR.VRF");
  681.     /* save files to backup if not already backed up*/
  682.     if (not(exists(backup_marker)) && exists("%inst_dir%\WINDOWS.AVF"))
  683.       {
  684.     if (not(exists(backup_dir)))
  685.       make_directory(backup_dir);
  686.     a_list = copy_list;
  687.     while (not(empty(a_list))) 
  688.       {
  689.         the_file = first(a_list);
  690.         a_list = rest(a_list);
  691.         {
  692.           copy_file("%inst_dir%\%the_file%", "%backup_dir%\");
  693.         } [ 'default: continue(); ]
  694.       }
  695.     /* indicate that all files are in backup dir and are valid */
  696.     create_file(backup_marker);
  697.     modify("", 
  698.            nls("dont_touch", "Please do not remove this file or change its permissions."),
  699.            backup_marker);
  700.       }
  701.     a_list = copy_list;
  702.     while (not(empty(a_list))) 
  703.       {
  704.     the_file = first(a_list);
  705.     a_list = rest(a_list);
  706.     copy_file(the_file, "%inst_dir%\");
  707.       }
  708.   }
  709.  
  710.   reboot = list(); reboot_hints = list();
  711.  
  712.   ui_action(nls("prepare_to_install","Preparing to Install..."));
  713.  
  714.   { execute("user.stp");}
  715.   ['FILE_NOT_FOUND: install_type = "Custom Install";]
  716.  
  717.   reinstall_prompt01 = nls("reinstall_prompt01","Would you like to update %%product_label%%, version %%installed_version%%, with the available release of %%product_label%%, version %%current_version%%?");
  718.  
  719.   reinstall_content01 = nls("reinstall_content01","Update");
  720.  
  721.   reinstall_help01 = nls("reinstall_help01","The currently installed version of %%product_label%%, %%installed_version%%, is out of date. The available version is %%current_version%%. It is recommended that you update %%product_label%% to the newer version, %%current_version%%. Choose 'Yes' to update %%product_label%% to %%current_version%%. Choose 'No' if you are sure you want to keep the installed version, %%installed_version%%, intact.");
  722.  
  723.   reinstall_prompt02 = nls("reinstall_prompt02","WARNING: Not installing the latest version of %%product_label%%, %%current_version%%, may cause other Oracle products to work improperly.");
  724.  
  725.   reinstall_content02 = nls("reinstall_content02","Necessary Update");
  726.  
  727.   reinstall_help02 = nls("reinstall_help02","You are in the process of installing Oracle products which depend on version %%current_version%% of %%product_label%%. It is therefore recommended that you update %%product_label%% to %%current_version%%. You have chosen not to do so so, which may cause certain Oracle products to work improperly.");
  728.  
  729.   reinstall_prompt03 = nls("reinstall_prompt03","WARNING: The currently installed version of %%product_label%%, %%installed_version%%, is up to date. Are you sure you want to install the old version, %%current_version%%?  Doing so may cause other Oracle products to work improperly.");
  730.  
  731.   reinstall_content03 = nls("reinstall_content03","Old Version");
  732.  
  733.   reinstall_help03 = nls("reinstall_help03","You are attempting to install an older version of %%product_label%%, %%current_version%%, although version %%installed_version%% is already installed. Installing an older version of %%product_label%% may cause other Oracle products to work improperly. Choose 'No' to leave the current version of %%product_label%%, %%installed_version%%, intact. Choose 'Yes' if you are sure you want to replace it with version %%current_version%%.");
  734.  
  735.   reinstall_prompt04 = nls("reinstall_prompt04","Version %%installed_version%% of %%product_label%% has already been installed and is up to date. Would you like to reinstall it?");
  736.  
  737.   reinstall_content04 = nls("reinstall_content04","Up To Date");
  738.  
  739.   reinstall_help04 = nls("reinstall_help04","Version %%installed_version%% of %%product_label%% has already been installed and is up to date. There is no need to reinstall %%product_label%% unless the installation has somehow become damaged. Choose 'No' to skip the reinstallation of %%product_label%%. Choose 'Yes' if you are sure you want to reinstall it.");
  740.  
  741.   deinstall_prompt01 = nls("deinstall_prompt01","WARNING: Other products are dependent on %%registry_label%%. Removing it may cause other products to work improperly. Are you sure you want to deinstall it?");
  742.  
  743.  
  744.   deinstall_content01 = nls("deinstall_content01","Dependencies");
  745.  
  746.   deinstall_help01 = nls("deinstall_help01","Other products are dependent on %%registry_label%%. Removing it may cause them to work improperly. It is therefore recommended that you do not remove %%registry_label%%. Choose 'No' to leave %%registry_label%% intact. Choose 'Yes' if you are sure you want to remove it.");
  747.  
  748.   deinstall_prompt02 = nls("deinstall_prompt02","It was not possible to find a value for the variable, '%%variable%%', in '%%ora_config%%'. It is therefore not possible to remove %%registry_label%%. Please restore the binding for '%%variable%%' in '%%ora_config%%' in order to remove %%registry_label%%.");
  749.  
  750.   deinstall_content02 = nls("deinstall_content02","Variables");
  751.  
  752.   deinstall_help02 = nls("deinstall_help02","It was not possible to find a value for the variable, '%%variable%%', in '%%ora_config%%'. '%%variable%%' is used to determine in what directory %%registry_label%% was installed. It is therefore not possible to remove %%registry_label%%. Please restore the binding for '%%variable%%' by adding a line that begins with '%%variable%%=' in '%%ora_config%%'.
  753.  
  754. If %%registry_label%% were installed in '%%oracle_home%%', you would add the line '%%variable%%=%%oracle_home%%' to correct the problem.
  755.  
  756. When you have corrected the problem, please try to remove %%registry_label%% again.");
  757.   unbound_message = nls("unbound_message","The versions of the products you are installing require a separate installation procedure. Please choose 'OK' to quit this installation, leave the disk labeled '%%product_label%% 1' in your drive, and then choose 'From'. When the %%product_label%% installation is complete, please resume installing the products you originally selected for installation.");
  758.   unbound_content = nls("unbound_content","Separate Installation Procedure");
  759.   unbound_help = nls("unbound_help","The product you are currently installing was created with a different version of %%product_label%%. Proceeding with the current installation may result in installation errors. To avoid these errors and to successfully complete your installation, please choose 'OK' to quit this installation, insert the disk labeled '%%product_label%% 1' in your drive, and choose 'From'. When that installation is complete, then install the other products you originally selected for installation.");
  760.  
  761.   path_too_long_prompt = nls("path_too_long_prompt","The addition of %%path_to_add%% to the PATH will result in a search path length of %%len%%, exceeding the DOS limit of 127. You will have to correct this manually.");
  762.   path_too_long_content = nls("path_too_long_content","Path Too Long");
  763.   path_too_long_help = nls("path_too_long_help","The addition of %%path_to_add%% to the PATH will result in a search path length of %%len%%, exceeding the DOS limit of 127. You will have to correct this manually. One solution may be shorter directory names.");
  764.   instver_too_early = nls("instver_too_early","The version of the Installer currently running is %%installer_version%%. The installation you have chosen requires version %%required_version%% or later. Please run version %%required_version%% or later in order to perform this installation.");
  765.   version_string = nls("version_string","%%prodlab%% version %%ver%%");
  766.   registering_product = nls("registering_product", "Registering %%product_label%%...");
  767.   reboot_prompt1 = nls("reboot_prompt1","Please reboot your computer after you exit the Installer in order for changes to the following file(s) to take effect:%carriage_return%%carriage_return%");
  768.   reboot_prompt2 = nls("reboot_prompt2","Please reboot your computer after you exit the Installer.");
  769.   reboot_content = nls("reboot_content","Reboot Needed");
  770.   reboot_help = nls("reboot_help","The product(s) you have just installed may not function correctly until you reboot.");
  771.   remind_content = nls("remind_content","Installation Notes");
  772. }
  773.  
  774.  
  775.