home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / gc25ptch / gui25.vrf < prev    next >
Text File  |  1995-05-02  |  7KB  |  173 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     gui25.vrf - V3 version analysis/product configuration script for
  5.                 GUI Common Files 2.5.
  6.  
  7.   DESCRIPTION
  8.     This script checks dependencies and environment settings for the GUI
  9.     Common Files.
  10.  
  11.   OWNER
  12.     Rajesh Bansal
  13.  
  14.   MODIFIED   MM/DD/YY   Reason
  15.    bsabol    07/01/94   Modified for CDE2 release.
  16.    rbansal   13-MAY-94  Modified
  17.   dgalatin   22-DEC-93  Made 3.0.10.1 compliant.
  18.    akelley   22-OCT-93  Created.
  19. *****************************************************************************/
  20. {
  21.     reinstall_group            = nls("reinstall_group","Version %%installed_version%% of %%product_label%% has already been installed and is up to date.  Do you want to reinstall it?");
  22.     reinstall_group_help    = nls("reinstall_group_help","You selected to install %%product_label%%, which is up to date.  Unless a problem has occurred with %%product_label%%, there is no need to reinstall.  Choose 'No' to skip the reinstallation, or choose 'Yes' if you want to reinstall %%product_label%%.");
  23.     reinstall_group_content   = nls("reinstall_group_content","Up To Date");
  24.  
  25.     { doit = execute("%product_home%\par_vrf.usr"); }
  26.     [ 
  27.         'UNBOUND_VARIABLE: 
  28.         {
  29.     information_dialog("inside vrf");
  30.                 required_version = product_version(windowsinstver);
  31.                 temp             = explode(required_version, ".");
  32.                 required_version = implode(list(first(temp),first(rest(temp)),
  33.                                                 first(rest(rest(temp))),
  34.                                                 first(rest(rest(rest(temp))))), ".");
  35.                 signal('FAILURE, instantiate(nls("instver_too_early1",
  36.                                                  "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.")));
  37.         }
  38.     ]           /* This FAILURE will cause 3.0.9.x installer to exit gracefully. */
  39.  
  40.     if (doit)
  41.     {
  42.         /*************************
  43.            Set Product Name variables
  44.         **************************/
  45.         RSF_PRODUCT = winrsf71;
  46.         
  47.         /**********************************************************************
  48.         Set the VRF-INS script "ratchet"
  49.         ***********************************************************************/
  50.         vrf_ratchet = "2.1.4.1.0";
  51.  
  52.         if(member(products_for_installation,current_product))         /* This cancels the Required Products DLOG */
  53.             extract(products_for_installation,current_product);
  54.                             
  55.         /************************************************
  56.         Create a label with the product, version, and OS
  57.         ************************************************/
  58.         current_version = product_version(current_product);
  59.         version_list    = explode(current_version,".");
  60.         msb_version_list= list(first(version_list),
  61.                                first(rest(version_list)));
  62.     
  63.         display_version = implode(msb_version_list,".");
  64.  
  65. /* LMurphy - 04/12/95 - taken from user.avf for Tools products */
  66.  
  67.         display_product_label   = "%%product_label%% %%display_version%%";
  68.  
  69.     install_dei               = nls("install_dei", "Installing %%product_label%% Installation Scripts...");
  70.     install_exe               = nls("install_exe", "Installing %%product_label%% Executables...");
  71.     install_res               = nls("install_res", "Installing %%product_label%% Resource Files...");
  72.     install_msb               = nls("install_msb", "Installing %%product_label%% Message Files...");
  73.     install_dll               = nls("install_dll", "Installing %%product_label%% Dynamic Link Libraries...");
  74.     modify_variables          = nls("modify_variables", "Modifying %%product_label%% Environment Variables...");
  75.     install_dependencies      = nls("install_dependencies", "Installing %%product_label%% Dependencies...");
  76.     install_register          = nls("install_register", "Registering %%product_label%%...");
  77.     reference_dependencies    = nls("reference_dependencies","Referencing %%product_label%% Dependencies...");
  78.     halt_installation         = nls("halt_installation", "Cancelled installation at user's request...");
  79.     rsf_version_msg           = nls("rsf_version_msg","This product requires the installation of Required Support Files 7.1.4.0.1 or later.  The Required Support Files that you have installed is earlier than this.  Please install Required Support Files 7.1.4.0.1 or later and then proceed with the installation of %%product_label%%.");
  80.  
  81.  
  82.         /**********************************************************************
  83.         Bind path variables...
  84.         ***********************************************************************/
  85.         {
  86.             set_tk21 = false;
  87.             tk21     = v7_translate("tk21");
  88.     
  89.             if (not(exists(tk21)))
  90.                 signal('UNBOUND_ENVIRONMENT_VARIABLE);
  91.         }
  92.         [
  93.         'OS_ERROR,'INVALID_FILE_NAME,
  94.             'PERMISSION_DENIED,'UNBOUND_ENVIRONMENT_VARIABLE:
  95.             {
  96.                 tk21 = "%ORACLE_HOME%\CDE2";
  97.                 set_tk21 = true;
  98.             }
  99.         ]
  100.  
  101.         /***************************************************
  102.         Set tk21_icon variable in oracle.ini for extra icons
  103.         ****************************************************/
  104.         {
  105.             tk21_icon     = "%ORACLE_HOME%\CDE2\ICONS";
  106.             set_tk21_icon = true;
  107.         }
  108.  
  109.         {
  110.             set_mm20 = false;
  111.             mm20 = v7_translate("mm20");
  112.  
  113.             if (not(exists(mm20)))
  114.                 signal('UNBOUND_ENVIRONMENT_VARIABLE);
  115.         }
  116.         [
  117.         'OS_ERROR,'INVALID_FILE_NAME,
  118.             'PERMISSION_DENIED,'UNBOUND_ENVIRONMENT_VARIABLE:
  119.             {
  120.                 mm20 = "%ORACLE_HOME%\CDE2";
  121.                 set_mm20 = true;
  122.             }
  123.         ]
  124.  
  125.         sys_loc   = windows_system_directory();
  126.         prod_loc  = product_location(current_product);
  127.         media_loc = "%product_home%\%prod_loc%";
  128.                
  129.         /* Check CTL3D.DLL */
  130.           ctl3d_file = 0;
  131.         
  132.         new_file = "%media_loc%\ctl3d.dll";
  133.         installed_file = "%sys_loc%\ctl3d.dll";
  134.         install_ctl3d = FALSE;
  135.  
  136.         {
  137.             installed_file_version = windows_file_version(instantiate(installed_file));
  138.         
  139.             if(not(windows_earlier_version(new_file, installed_file_version)))
  140.             {
  141.                 install_ctl3d = TRUE;
  142.                 ctl3d_file = ctl3d_file + sum(ctl3d);
  143.             }
  144.         }
  145.         ['OS_ERROR: install_ctl3d = TRUE;]
  146.  
  147.         /* Check CTL3DV2.DLL */
  148.         ctl3dv2_file = 0;
  149.  
  150.          new_file = "%media_loc%\ctl3dv2.dll";
  151.         installed_file = "%sys_loc%\ctl3dv2.dll";
  152.         install_ctl3dv2 = FALSE;
  153.  
  154.         {
  155.             installed_file_version = windows_file_version(instantiate(installed_file));
  156.         
  157.             if(not(windows_earlier_version(new_file, installed_file_version)))
  158.             {
  159.                 install_ctl3dv2 = TRUE;
  160.                 ctl3dv2_file = ctl3dv2_file + sum(ctl3dv2);
  161.             }
  162.         }
  163.         ['OS_ERROR: install_ctl3dv2 = TRUE;]
  164.  
  165.         return(sum(deinst, exe, dll, res, msg) + ctl3d_file + ctl3dv2_file + verify(RSF_PRODUCT));
  166.     }
  167.     else
  168.     {
  169.         refresh_map_file = FALSE;
  170.         return(0);
  171.     }
  172. }
  173.