/* Copyright (c) Oracle Corporation 1995. All Rights Reserved */ /******************************************************************************* NAME toolsvrf.usr - External script for Tools Products' Verifications scripts DESCRIPTION This external script is a Library of Routines (like Functions/Procedures). Each Routine is a block of code that is being used by more than one Installer script. Each routine is uniquely identified by a global variable that needs to be set by the product script calling this script, and a roman numeral (for ease of locating the desired Routine). Following is a list of all the routines in this Library: I. CREATE_LABEL & Bind Installation Variables Create a label with the product name, version II. VERIFY_COMPONENTS Verify all the components of the PARENT III. VERIFY_PARENT Check if Parent needs to be installed IV. CHECK_COMPONENT_PRODUCT Check if COMPONENT_PRODUCT needs to be installed V. SET_BOOKSHELVES_VARIABLES Setup environment variables for creating Bookshelves VI. CHECK_REQUIRED_PRODUCT Check if REQUIRED_PRODUCT needs to be installed VII. CHECK_FORMS_RUNTIME_PRODUCT Check if Forms Runtime needs to be installed VII. VERIFY_DEPENDENCIES Check if dependencies in verify_dependency_list need to be installed IX. VERIFY_DRIVER_VERSIONS For use with INTERSOLV drivers only. Compares version of driver installed to what user has selected for installation. OWNER Tools Integration, Installation & Release Team (TOOLSIIR) MODIFIED MM/DD/YY REASON aharriso 01/02/96 Added FILE_NOT_FOUND handler to TRANSLATE call for win32 scripts. rbansal 09/28/95 Modified MODIFY_ORACLE_INI routine for change in section heading from the previous release rbansal 04/18/95 ORACLE.INI variables for product DEMOS ********************************************************************************/ { /******************************************************************** I. Create a label with the product name, version *********************************************************************/ if (EXECUTE_SCRIPT == "CREATE_LABEL") { if((not(doit)) && (member(selected_products, current_product))) ui_action(instantiate(halt_installation)); current_version = product_version(current_product); version_list = explode(current_version,"."); msb_version_list= list(first(version_list), first(rest(version_list))); display_version = implode(msb_version_list,"."); /********************************** Bind variables for Installation ***********************************/ TOOLS_HOME = "%ORACLE_HOME%%dir_separator%TOOLS"; if (not(exists(TOOLS_HOME))) make_directory(TOOLS_HOME); DOC60 = "%TOOLS_HOME%%dir_separator%DOC60"; if (not(exists(DOC60))) make_directory(DOC60); /**********************************/ return(0); } /********************************************************************/ /******************************************************************** II. Verify all the components of the PARENT *********************************************************************/ if (EXECUTE_SCRIPT == "VERIFY_COMPONENTS") { /* explicitly called; verify all components */ size_files = 0; if( parent_in_control ) { size_verified_child = 0; child_products = all_child_products(current_product); child_products_to_install = list(); while(not(empty(child_products))) { next_child = first(child_products); if(not(member(products_for_installation, next_child))) { size_verified_child = verify(next_child); if(size_verified_child != 0) { size_files = size_files + size_verified_child; add(child_products_to_install, next_child); } } child_products = rest(child_products); } } else { child_products = all_child_products( current_product ); selected_components_list = list(); size_component = 0; while (not(empty(child_products))) { next_child = first(child_products); if (member(selected_products, next_child)) { if (not(member(products_for_installation, next_child))) { size_component = verify(next_child); if ( size_component != 0 ) { add(selected_components_list, next_child); size_files = size_files + size_component; } } } child_products = rest( child_products ); } } return(size_files); } /********************************************************************/ /******************************************************************** III. Check to see if parent needs to be installed *********************************************************************/ if (EXECUTE_SCRIPT == "VERIFY_PARENT") { /* verify parent */ /*************** Check for Parent ****************/ install_parent = TRUE; /* always install parent version matching with the component product version */ if(registered(product_name(product_parent(current_product)))) { parent_registry = registration(product_name(product_parent(current_product))); parent_version = product_version(product_parent(current_product)); if(same_version(parent_registry, parent_version)) install_parent = FALSE; /* parent is up-to-date; don't install */ } return(install_parent); } /********************************************************************/ /******************************************************************** IV. Check if COMPONENT_PRODUCT needs to be installed *********************************************************************/ if (EXECUTE_SCRIPT == "CHECK_COMPONENT_PRODUCT") { /* check if COMPONENT_PRODUCT needs to be installed */ /************************** Check for COMPONENT_PRODUCT ***************************/ install_component = TRUE; /* always install COMPONENT_PRODUCT version matching with the product in control */ if(registered(product_name(COMPONENT_PRODUCT))) { component_registry = registration(product_name(COMPONENT_PRODUCT)); component_version = product_version(COMPONENT_PRODUCT); if(same_version(component_registry, component_version)) install_component = FALSE; /* COMPONENT_PRODUCT is up-to-date; don't install */ } return(install_component); } /********************************************************************/ /******************************************************************** V. Setup environment variables for creating Bookshelves *********************************************************************/ if (EXECUTE_SCRIPT == "SET_BOOKSHELVES_VARIABLES") { doc_files_list = group_files(doc); doc_files_list_with_quotes = list(); subtract(doc_files_list, files_to_extract); while(not(empty(doc_files_list))) { next_file = first(doc_files_list); add(doc_files_list_with_quotes, "%quote_mark%FS:%next_file%%quote_mark%"); doc_files_list = rest(doc_files_list); } doc_files = implode(doc_files_list_with_quotes, ", "); bs_var = " (%doc_files%)"; id_set = implode(id_list, ", "); id_var = " (%id_set%)"; return(0); } /********************************************************************/ /******************************************************************** VI. Check if REQUIRED_PRODUCT needs to be installed *********************************************************************/ if (EXECUTE_SCRIPT == "CHECK_REQUIRED_PRODUCT") { /* check if REQUIRED_PRODUCT needs to be installed */ /************************* Check for REQUIRED_PRODUCT **************************/ install_required_product = TRUE; /* REQUIRED_PRODUCT is out-of-date or not installed; install */ if(registered(product_name(REQUIRED_PRODUCT))) { required_product_registry = registration(product_name(REQUIRED_PRODUCT)); required_product_version = product_version(REQUIRED_PRODUCT); if(not(earlier_version(required_product_registry, required_product_version))) install_required_product = FALSE; /* REQUIRED_PRODUCT is up-to-date or would be downgraded; don't install */ } return(install_required_product); } /********************************************************************/ /******************************************************************** VII. Check if Forms Runtime needs to be installed *********************************************************************/ if (EXECUTE_SCRIPT == "CHECK_FORMS_RUNTIME_PRODUCT") { /* check if Forms Runtime needs to be installed */ /****************************** Check for Forms Runtime Product *******************************/ install_forms_runtime = FALSE; /* Runtime is up-to-date or Parent is in the list od products to install */ if(not(member(products_for_installation, product_parent(FORMS_RUNTIME_PRODUCT)))) { install_forms_runtime = TRUE; /* Forms Runtime is not installed or out-of-date, install */ if(registered(product_name(FORMS_RUNTIME_PRODUCT))) { runtime_registry = registration(product_name(FORMS_RUNTIME_PRODUCT)); runtime_version = product_version(FORMS_RUNTIME_PRODUCT); if(not(same_version(runtime_registry, runtime_version))) add(products_for_installation, FORMS_RUNTIME_PRODUCT); /* add Forms Runtime to the list of products to install */ } } return(install_forms_runtime); } /********************************************************************/ /******************************************************************** VIII. Check if dependencies in verify_dependency_list() need to be installed *********************************************************************/ if (EXECUTE_SCRIPT == "VERIFY_DEPENDENCIES") { size_current_dependency = 0; size_dependencies = 0; while(not(empty(verify_dependency_list))) { current_dependency = first(verify_dependency_list); verify_dependency_list = rest(verify_dependency_list); size_current_dependency = verify(current_dependency); if(size_current_dependency != 0) { add(install_dependency_list, current_dependency); size_dependencies = size_dependencies + size_current_dependency; } } return(size_dependencies); } /********************************************************************/ /******************************************************************** IX. For INTERSOLV Drivers ONLY: Check if drivers selected for installation are already installed and up to date. This is normally handled in the .vrf script, but it can't be handled there for INTERSOLV because of the new installation setup. *********************************************************************/ if (EXECUTE_SCRIPT == "VERIFY_DRIVER_VERSIONS") { mark if (registered(product_name(current_product))) { product_label = product_interface_label(current_product); registry = registration(product_name(current_product)); current_version = product_version(current_product); installed_version = registry_version(registry); if (earlier_version(registry,current_version)) { version_status = 'upgrade; if (verbose) install_product = yesno_dialog(instantiate(reinstall_prompt01),TRUE, instantiate(reinstall_content01), instantiate(reinstall_help01)); else install_product = TRUE; if (not(install_product)) if (internally_called) information_dialog(instantiate(reinstall_prompt02), instantiate(reinstall_content02), instantiate(reinstall_help02)); } else { if (later_version(registry,current_version)) version_status = 'downgrade; else version_status = 'reinstall; if (version_status == 'downgrade) install_product = yesno_dialog(instantiate(reinstall_prompt03),FALSE, instantiate(reinstall_content03), instantiate(reinstall_help03)); else { install_product = yesno_dialog(instantiate(reinstall_prompt04),FALSE, instantiate(reinstall_content04), instantiate(reinstall_help04)); } } } else { version_status = 'new_install; install_product = TRUE; } return(install_product); } /********************************************************************/ }