home *** CD-ROM | disk | FTP | other *** search
/ Oracle Video Server 3.0.3.1 / OVS_3031_NT.iso / win32 / install / win32.avf < prev    next >
Encoding:
Text File  |  1997-05-20  |  4.4 KB  |  117 lines

  1. /* Copyright (c) Oracle Corporation 1996.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     win32.avf - V3 ante version analysis script for nt products.
  5.  
  6.   DESCRIPTION
  7.     This script performs ante version analysis functionality.  In particular,
  8.     it initializes the 'products_for_installation' list so that the Installer
  9.     can report which products need to be implicitly installed as a consequence
  10.     of the user's current configuration and product selection.  Also, 'reboot'
  11.     is initialized to allow scriptwriters to specify reasons for a reboot mes-
  12.     sage to be displayed in win32.pin.
  13.  
  14.   CREATED
  15.     Siddhartha Agarwal, July 10, 1996
  16.  
  17.   MODIFIED    MM/DD/YY  Reason
  18.     vrajkuma 01/13/97   Initialize the shared_products_in_use variable to 
  19.                         allow the signal about un-deinstalled products to get 
  20.                         back to a calling program. Disallow installation or
  21.                         deinstallation of products on an OCSM client home.
  22.  
  23. *****************************************************************************/
  24. {
  25.  
  26.  if( installation_mode == 'local )
  27.   if( (user_action == 'install) || (user_action == 'deinstall) )
  28.   {
  29.     invalid_action = nls("invalid_action","Your current Oracle home %%oracle_home%% is an OCSM client installation managed by your system administrator.  You may not install or remove products in this home.");
  30.     signal('FAILURE, instantiate(invalid_action));
  31.   }
  32.  
  33.   if (bootstrap)
  34.   {
  35.     desired_installation = nls("desired_installation",
  36.                    "installation");
  37.     desired_deinstallation = nls("desired_deinstallation",
  38.                     "removal");
  39.     {
  40.       if (user_action == 'install)
  41.       {
  42.         desired_action = desired_installation;
  43.         if (empty(selected_products))
  44.           signal('no_selection);
  45.         all_product_list = all_products();
  46.         desired_products = selected_products;
  47.         invalid_products = list();
  48.         while(not(empty(desired_products)))
  49.         {
  50.           current = first(desired_products);
  51.           if(not(member(all_product_list,current)))
  52.             add(invalid_products,current);
  53.           desired_products = rest(desired_products);
  54.         }
  55.         if(not(empty(invalid_products)))
  56.           signal('invalid_selection);
  57.  
  58.      }
  59.       else if (user_action == 'deinstall)
  60.       {
  61.         desired_action = desired_deinstallation;
  62.         if (empty(selected_registries))
  63.           signal('no_selection);
  64.         desired_products = selected_registries;
  65.         invalid_products = list();
  66.         while(not(empty(desired_products)))
  67.         {
  68.           current = first(desired_products);
  69.           {
  70.             reg = registration(current);
  71.           }
  72.           [
  73.             'UNREGISTERED_PRODUCT:
  74.             add(invalid_products,current);
  75.           ]
  76.           desired_products = rest(desired_products);
  77.         }
  78.         if(not(empty(invalid_products)))
  79.           signal('invalid_selection);
  80.       }
  81.     }
  82.     ['no_selection:
  83.       {
  84.         no_selection_signal = nls("no_selection_signal","No products were selected for %%desired_action%%. User action is aborted.");
  85.         signal('FAILURE, instantiate(no_selection_signal));
  86.       }
  87.      'invalid_selection:
  88.       {
  89.         invalid_selection_string = implode(invalid_products,",");
  90.         invalid_selection_signal = nls("invalid_selection_signal","The following products are not available for %%desired_action%%. User action is aborted.%carriage_return%%carriage_return%%invalid_selection_string%");
  91.         signal('FAILURE, instantiate(invalid_selection_signal));
  92.       }
  93.     ]
  94.   }
  95.  
  96.   if (user_action == 'install)
  97.     {
  98.       products_for_installation = list();
  99.       remove_file("%installer_home%\user.pin");
  100.       failed_dos_client_install = nls("failed_dos_client_install",
  101.                       "DOS client installation failed");
  102.       failed_windows_client_install = nls("failed_windows_client_install",
  103.                       "Windows client installation failed");
  104.       installation_successful = nls("installation_successful","Installation Successful.");
  105.     }
  106.  
  107.   if (user_action == 'deinstall)
  108.     {
  109.       shared_products_in_use = list(); /* This variable is used to hold a list
  110.                       of products that could not be 
  111.                       deinstalled because they are being 
  112.                       used by configurations */
  113.     }
  114.  
  115.   return(0);
  116. }
  117.