/* Copyright (c) Oracle Corporation 1996.  All Rights Reserved */
/*****************************************************************************
  NAME
    owm.vrf -version analysis/product configuration script for Oracle Wallet Manager Tool

  DESCRIPTION
    This script checks dependencies and environment settings for the
    installation of Oracle Wallet Manger Tool

*****************************************************************************/

{

     if(not(registered("w32netclt80")))

      {
             information_dialog(instantiate(netclt_product_required),
                                instantiate(netclt_product_contents),
                                instantiate(netclt_product_help));
             signal('FAILURE, instantiate(halt_installation));  
        }

/*****************************************************************************
   Bind string variables & prompt strings...
*****************************************************************************/
  set_owm = FALSE;
  product = w32owm;

  
  product_label = product_interface_label(product);
  owm_netc80_req_msg =  nls("owm_netc80_req_msg","Oracle Wallet Manager version 2.1 requires Oracle SQL*Net Client version 8.0.6.0.0.
Select <Cancel> to return to the Software Asset Manager now, or select <OK> to continue.");
  owm_netc80_req_content = nls("owm_netc80_req_content", "Oracle SQL*Net Client is not installed");
  owm_netc80_req_help = nls("owm_netc80_req_help", "Oracle SQL*Net Client must be installed before using Wallet Manager.
Select <Cancel> to quit this install session,return to the Oracle Installer Asset Manager window and select Oracle SQL*Net Client for installation, or select <OK> to continue installing other selected Oracle products.");
  owm_rsf80_req_msg =  nls("owm_rsf80_req_msg","Oracle Wallet Manager version 2.0 requires Required Support Files version 8.0.6.0.0.
Select <Cancel> to return to the Software Asset Manager now, or select <OK> to continue.");
  owm_rsf80_req_content = nls("owm_rsf80_req_content", "Required Support Files 8.0.6.0.0 is not installed");
  owm_rsf80_req_help = nls("owm_rsf80_req_help", "Required Support Files 8.0.6.0.0 must be installed before using Wallet Manager.
Select <Cancel> to quit this install session,return to the Oracle Installer Asset Manager window and select Oracle Web Server for installation, or select <OK> to continue installing other selected Oracle products.");

/*****************************************************************************
   Start main logic...
*****************************************************************************/
  ui_product(product_label);
  ui_action("Analyzing %product_label% Dependencies...");

vrf_ratchet = "2.0.4.0.0";

  /***************************************************************************
    Execute the <os>.vrf script for standard version analysis and becuase
    it is required for Shared Oracle.
  ***************************************************************************/
  { doit = execute("%installer_home%\%operating_system%.vrf"); }
  [
   'UNBOUND_VARIABLE:
   {
     required_version = product_version(windowsinstver);
     temp = explode(required_version,".");
     required_version = implode(list(first(temp),first(rest(temp)),
                                     first(rest(rest(temp))),
                                     first(rest(rest(rest(temp))))),".");
     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.")));
   }
  ]

 netc80_ok = TRUE;
 rsf80_ok = TRUE;

 /*
  * If SQL*Net Client not installed and not selected for installation
  
 if(not(netc80_ok))
 {
   information_dialog(owm_netc80_req_msg,owm_netc80_req_content,owm_netc80_req_help);
 }
 else if (not(rsf80_ok))
 {
   information_dialog(owm_rsf80_req_msg,owm_rsf80_req_content,owm_rsf80_req_help); 
 }
 ********/


/*****************************************************************************
   Ready to install Oracle Wallet Manager
*****************************************************************************/

 if (doit && netc80_ok)
 {
    {
      w32owm = v7_translate ("w32owm");
    }
    [ 'UNBOUND_ENVIRONMENT_VARIABLE:
      {
      w32owm="%oracle_home%\owm";
      set_w32owm = TRUE;
      }
    ]
    space_required = sum(deinstl,nls_abbreviation, dlls,nls_abbreviation, libs,nls_abbreviation, exes,nls_abbreviation);
    return(space_required);
 }
 else
 {
   refresh_map_file = FALSE;
   doit = FALSE;
   return(0);
 }
}
