home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / DB / UTIL72 / UTIL72.VRF < prev    next >
Encoding:
Text File  |  1995-10-13  |  8.0 KB  |  192 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     util72.vrf - Windows 95 V3 installation verification script for database
  5.                  utilities.
  6.  
  7.   DESCRIPTION
  8.     This script checks dependencies and environment settings for installation
  9.     of the ORACLE database utilities.
  10.  
  11.   OWNER
  12.     Tony Rodgers
  13.  
  14.   MODIFIED    DD-MMM-YY Reason
  15.   LMurphy     06/01/95 - Modified for Windows 95 and 7.2
  16.   syau        07/01/94 - 7.1.3
  17.   Hartenstine 04/20/93 - WIN_NT: Adapt for Windows NT
  18.     kschrait  02/19/93 - Added dialog to ask whether 16 bit or 32 bit executables are needed
  19.     trodgers  01-APR-92 Created.
  20. *****************************************************************************/
  21. {
  22.   { doit = execute("%installer_home%\win95.vrf"); }
  23.   [
  24.     'UNBOUND_VARIABLE:
  25.       {
  26.         required_version = product_version(w95instver);
  27.         temp = explode(required_version,".");
  28.         required_version = implode(list(first(temp),first(rest(temp)),
  29.                                         first(rest(rest(temp))),
  30.                                         first(rest(rest(rest(temp))))),".");
  31.         signal('failure,instantiate(nls("instver_too_early1","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.")));
  32.       }
  33.   ]
  34.  
  35.   if (not(doit) && (version_status == 'reinstall))
  36.   {
  37.     if(member(selected_products, current_product) ||
  38.        member(selected_products, product_parent(current_product)))    
  39.       doit = TRUE;    
  40.   }
  41.  
  42.   if (doit)
  43.     {
  44.       /***********************************************************************
  45.           Set the VRF-INS script "ratchet"
  46.        ***********************************************************************/
  47.       vrf_ratchet = "7.2.2.3.1";
  48.  
  49.       permit_retry_operations = FALSE;
  50.  
  51.       /***********************************************************************
  52.          Bind path variables...
  53.       ************************************************************************/
  54.       {
  55.         set_rdbms72 = FALSE;
  56.         rdbms72 = v7_translate("RDBMS72");
  57.  
  58.         if (not(exists(rdbms72)))
  59.           signal('UNBOUND_ENVIRONMENT_VARIABLE);
  60.       }
  61.         [ 'OS_ERROR,'INVALID_FILE_NAME,
  62.           'PERMISSION_DENIED,'UNBOUND_ENVIRONMENT_VARIABLE:
  63.           {
  64.             rdbms72 = "%oracle_home%\RDBMS72";
  65.             set_rdbms72 = TRUE;
  66.           }
  67.         ]
  68.  
  69.       {
  70.         set_plsql22 = FALSE;
  71.         plsql22 = v7_translate("PLSQL22");
  72.  
  73.         if (not(exists(plsql22)))
  74.           signal('UNBOUND_ENVIRONMENT_VARIABLE);
  75.       }
  76.         [ 'OS_ERROR,'INVALID_FILE_NAME,
  77.           'PERMISSION_DENIED,'UNBOUND_ENVIRONMENT_VARIABLE:
  78.           {
  79.             plsql22 = "%oracle_home%\PLSQL22";
  80.             set_plsql22 = TRUE;
  81.           }
  82.         ]
  83.  
  84.       /***********************************************************************
  85.          Bind string variables & prompt strings...
  86.       ***********************************************************************/
  87.       installing_scripts = nls("installing_scripts",
  88.                                "Installing %%product_label%% Scripts...");
  89.       installing_executables = nls("installing_executables",
  90.                                "Installing %%product_label%% Executables...");
  91.       installing_dlls = nls("installing_dlls",
  92.                                "Installing %%product_label%% DLLs...");
  93.       installing_msbs = nls("installing_msbs",
  94.                              "Installing %%product_label%% Message Files...");
  95.       installing_resource = nls("installing_resource",
  96.                                "Installing %%product_label%% Resource Files...");
  97.       installing_init = nls("installing_init",
  98.                                "Installing ORACLE7 Initialization File...");
  99.       installing_sql = nls("installing_sql",
  100.                                "Installing %%product_label%% SQL Scripts...");
  101.       installing_demo = nls("installing_demo",
  102.                                "Installing %%product_label%% Demonstration Files...");
  103.       installing_sys = nls("installing_sys",
  104.                                "Installing %%product_label%% System Files...");
  105.       modifying_config = nls("modifying_config",
  106.                                "Modifying Windows 95 Registry...");
  107.       registering = nls("registering","Registering %%product_label%%...");
  108.  
  109.       util72_expl = nls("util72_expl", "Some %%product_label%% components are currently running on this machine. Please close these applications before installing %%product_label%%.
  110.  
  111. Silent mode installation of %%product_label%% terminated.");
  112.       util72_inst = instantiate(nls("util72_inst", "Some %%product_label%% components are currently running on this machine. Please close these applications before installing %%product_label%%.
  113.  
  114. Choose OK after you have closed all Oracle applications and want to resume the installation of %%product_label%%.
  115.  
  116. Choose CANCEL to terminate the installation of %%product_label%%.
  117.       "));
  118.       util72_inst_term = instantiate(nls("util72_inst_term", "%%product_label%% installation terminated."));
  119.       util72_inst_content = instantiate(nls("util72_inst_content", "%%product_label%% Components Running"));
  120.       util72_inst_help = instantiate(nls("util72_inst_help", "The Oracle Installer has detected that some %%product_label%% components are currently running on this machine.  Please close these applications before installing %%product_label%%.
  121.  
  122. Choose OK after you have closed all Oracle applications and want to resume the installation of %%product_label%%.
  123.  
  124. Choose CANCEL to terminate the installation of %%product_label%%.
  125.       "));
  126.  
  127.       win95_sys_dir = windows_system_directory();
  128.       win95_dir = windows_directory();
  129.  
  130.       /* check to see if util72 components are closed */
  131.       done = FALSE;
  132.       while(not(done))
  133.       {
  134.         move_file("%ORACLE_HOME%\bin\sqldba72.exe", "%ORACLE_HOME%\bin\sqldba72.exe");      
  135.         move_file("%ORACLE_HOME%\bin\exp72.exe", "%ORACLE_HOME%\bin\exp72.exe");
  136.         move_file("%ORACLE_HOME%\bin\imp72.exe", "%ORACLE_HOME%\bin\imp72.exe");
  137.         move_file("%ORACLE_HOME%\bin\ocopy72.exe", "%ORACLE_HOME%\bin\ocopy72.exe");
  138.         move_file("%ORACLE_HOME%\bin\sqlldr72.exe", "%ORACLE_HOME%\bin\sqlldr72.exe");
  139.         move_file("%ORACLE_HOME%\bin\tkprof72.exe", "%ORACLE_HOME%\bin\tkprof72.exe");
  140.         done = TRUE;
  141.       }
  142.       [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  143.         {
  144.           if (silent_mode)
  145.             signal('FAILURE, instantiate(util72_expl));
  146.           else
  147.             information_dialog(instantiate(util72_inst), util72_inst_content, instantiate(util72_inst_help));
  148.         }
  149.         'FILE_NOT_FOUND:
  150.           done = TRUE;
  151.       ]
  152.  
  153.       install_parent = FALSE;
  154.       if (member(selected_products, current_product))
  155.     install_parent = TRUE;
  156.  
  157.       total_sum = 0;
  158.       if (install_parent)
  159.       {
  160.       /********************************************
  161.       Determine sibling products to be co-installed
  162.       *********************************************/
  163.       
  164.     sibling_products = all_child_products(product_parent(current_product));
  165.                     
  166.     extract(sibling_products, current_product);             
  167.     /* ALWAYS verify all siblings before parent */
  168.  
  169.     while(not(empty(sibling_products)))
  170.     {
  171.         if (member(selected_products, first(sibling_products)))
  172.             total_sum = total_sum + verify(first(sibling_products));
  173.         sibling_products = rest(sibling_products);
  174.     }
  175.     total_sum = total_sum + verify(product_parent(current_product));
  176.       }
  177.  
  178.  
  179.       /*********************
  180.        Check if system files already exist or if they are old 
  181.        before installing them.
  182.       **********************/
  183.  
  184.       return(verify(w95rsf72) + sum(deinstl,exec,msg,nls_abbreviation,init,sql,demo) + total_sum);
  185.     }
  186.   else
  187.     {
  188.       refresh_map_file = FALSE;
  189.       return(0);
  190.     }
  191. }
  192.