home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a525 / 41.ddi / UTIL70.VRF < prev   
Encoding:
Text File  |  1993-03-10  |  5.0 KB  |  119 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     util70.vrf - OS/2 V3 installation verification script for database utilities.
  5.  
  6.   DESCRIPTION
  7.     This script checks dependencies and environment settings for installation
  8.     of the ORACLE database utilities.
  9.  
  10.   OWNER
  11.     Tony Rodgers
  12.  
  13.   MODIFIED    DD-MMM-YY Reason
  14.     kschrait  02/19/93 - Added dialog to ask whether 16 bit or 32 bit executables are needed
  15.     trodgers  01-APR-92 Created.
  16. *****************************************************************************/
  17. {
  18.   product = os2util70;
  19.   product_label = product_interface_label(product);
  20.  
  21.   ui_product(product_label);
  22.  
  23.   ui_action( instantiate( nls("analyze_depend","Analyzing %%product_label%% Dependencies...") ) );
  24.  
  25.   doit = TRUE;
  26.  
  27. /*****************************************************************************
  28.    Check if the product has already been installed ...
  29. *****************************************************************************/
  30.  
  31.   if (registered(product_name(product)))
  32.     {
  33.       registry = registration(product_name(product));
  34.       current_version = product_version(product);
  35.       installed_version = registry_version(registry);
  36.  
  37.       if (earlier_version(registry,current_version))
  38.         {
  39.           doit = yesno_dialog(instantiate(reinstall_prompt01));
  40.  
  41.           if (not(doit))
  42.             if (internally_called)
  43.               information_dialog(instantiate(reinstall_prompt02));
  44.         }
  45.       else if (not(internally_called))
  46.         if (later_version(registry,current_version))
  47.           doit = yesno_dialog(instantiate(reinstall_prompt03));
  48.         else
  49.           doit = yesno_dialog(instantiate(reinstall_prompt04));
  50.       else
  51.         doit = FALSE;
  52.     }
  53.  
  54. /*****************************************************************************
  55.      Find out whether 32 bit or 16 bit executables are desired
  56. *****************************************************************************/
  57.  
  58.   if (doit)
  59.   {
  60.   exec_32 = "32 bit";
  61.   exec_16 = "16 bit";
  62.   exec_prompt = nls("exec_prompt","OS/2 executables for Oracle utilities exist in two formats: OS/2 1.X format (16 bit) and OS/2 2.X format (32 bit).  Please select the format you would like to use:");
  63.   exec_content = nls("exec_content","Executable Type");
  64.   exec_help = nls("exec_help","You are being asked to select whether you need OS/2 1.X (16 bit) or OS/2 2.X (32 bit) executables.  OS/2 1.X executables may be run in OS/2 1.X or OS/2 2.X, while OS/2 2.X executables only run in OS/2 2.X.");
  65.   exec_list = list(exec_32, exec_16);
  66.   exec_type = single_selection_dialog(exec_prompt,exec_list,exec_32,
  67.                                       exec_content,exec_help);
  68.   }
  69.  
  70. /*****************************************************************************
  71.      Return total size of files ...
  72. *****************************************************************************/
  73.   if (doit)
  74.     {
  75.       /* Is RDBMS70 is already there and is it pointing to a valid directory? */
  76.       {
  77.         rdbms70 = v7_translate("RDBMS70");
  78.  
  79.         if (not(exists(rdbms70)))
  80.           signal('UNBOUND_ENVIRONMENT_VARIABLE);
  81.       }
  82.        [ 'UNBOUND_ENVIRONMENT_VARIABLE: rdbms70 = "%oracle_home%\RDBMS70"; ]
  83.  
  84.       /* Is PLSQL20 is already there and is it pointing to a valid directory? */
  85.       {
  86.         plsql20 = v7_translate("PLSQL20");
  87.  
  88.         if (not(exists(plsql20)))
  89.           signal('UNBOUND_ENVIRONMENT_VARIABLE);
  90.       }
  91.        [ 'UNBOUND_ENVIRONMENT_VARIABLE: plsql20 = "%oracle_home%\PLSQL20"; ]
  92.  
  93.       installing_scripts = nls("installing_scripts",
  94.                                "Installing %%product_label%% Scripts...");
  95.       installing_executables = nls("installing_executables",
  96.                                "Installing %%product_label%% Executables...");
  97.       installing_msbs = nls("installing_msbs",
  98.                              "Installing %%product_label%% Message Files...");
  99.       installing_resource = nls("installing_resource",
  100.                                "Installing %%product_label%% Resource Files...");
  101.       installing_init = nls("installing_init",
  102.                                "Installing INIT.ORA...");
  103.       installing_sql = nls("installing_sql",
  104.                                "Installing %%product_label%% SQL Scripts...");
  105.       installing_demo = nls("installing_demo",
  106.                                "Installing %%product_label%% Demonstration Files...");
  107.       modifying_config = nls("modifying_config",
  108.                                "Modifying %%ora_config%%...");
  109.       creating_stubs = nls("creating_stubs",
  110.                            "Creating %%product_label%% Execution Stubs...");
  111.       registering = nls("registering","Registering %%product_label%%...");
  112.  
  113.       return( verify(os2rsf70) + sum( deinstl, exec, exec_type, msg,
  114.                                       nls_abbreviation, res, init, sql, demo ) );
  115.     }
  116.   else
  117.     return(0);
  118. }
  119.