/* Copyright (c) Oracle Corporation 1995. All Rights Reserved FILE: template.vrf CONTENTS: Template of various OIS blocks AUTHOR: Athmaraman R DATE: 29/11/95 Warning!!! Modifications to this file may affect all the scripts generated by OIS. */ { /*BEGIN_OIS,VRF_FIRST_BLOCK*/ /*********************************************************************** Set the VRF-INS script ratchet ***********************************************************************/ vrf_ratchet = "1.0.0.0"; { script_os = script_os; } ['UNBOUND_VARIABLE: script_os = operating_system; ] { platform_prefix = platform_prefix; } ['UNBOUND_VARIABLE: platform_prefix = product_prefix; ] { doit = execute("%INSTALLER_HOME%\%script_os%.vrf"); } ['UNBOUND_VARIABLE: { instver_product = evaluate("%operating_system%instver"); required_version = product_version(instver_product); 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(instver_too_early1)); } ] if (not(doit)) { refresh_map_file = FALSE; return(0); } implode_explode_delimiter = ";"; child_products = all_child_products(current_product); is_parent_product = true; if (empty(child_products)) is_parent_product = false; is_child_product = true; { PARENT_PRODUCT = product_parent(current_product); } ['PARENT_NOT_FOUND: is_child_product = FALSE; ] /************************************************ Create a label with the product name, and version *************************************************/ temp_ois_product_location = product_location(current_product); ois_product_location = "%product_home%\%temp_ois_product_location%"; OIS_EXECUTE_SCRIPT = "CREATE_LABEL"; { execute(instantiate("%%ois_product_location%%\toolsois.vrf")); } ['FILE_NOT_FOUND: { sys_file = "toolsois.vrf"; signal('FAILURE,instantiate(no_sys_file)); } ] /************************************************/ if (is_parent_product) { /********************************************************************** parent_in_control = TRUE ==> the complete product needs to be installed parent_in_control = FALSE ==> PARENT called by one of the components ***********************************************************************/ parent_in_control = TRUE; if(not(member(selected_products, current_product))) { child_products = all_child_products(current_product); while(not(empty(child_products))) { next_child = first(child_products); child_products = rest(child_products); if(member(products_for_installation, next_child)) /* PARENT called by one of the components, no need to add PARENT to the list of products to be installed */ parent_in_control = FALSE; } } } else parent_in_control = FALSE; if (is_child_product) { /****************************************************************** child_in_control = TRUE ==> component product called explicitly child_in_control = FALSE ==> component product called by the PARENT *******************************************************************/ child_in_control = TRUE; if( member(products_for_installation, product_parent(current_product) )) child_in_control = FALSE; /**********************************************************************/ /************************* Set Product Name variables **************************/ PARENT_PRODUCT = product_parent(current_product); /*The following statements till else can be removed one parent - child is redefined */ /************************** Determine installation path ***************************/ install_variable = product_filename(parent_product); CDE1_PRODUCT_EXISTS = FALSE; CALLED_BY_DBTABLES = FALSE; if (operating_system == "os2") section_heading = "="; else section_heading = product_filename(current_product); } else { child_in_control = FALSE; /************************** Determine installation path ***************************/ install_variable = product_filename(current_product); CDE1_PRODUCT_EXISTS = FALSE; CALLED_BY_DBTABLES = FALSE; if (operating_system == "os2") section_heading = "="; else section_heading = product_filename(current_product); } default_home = "%ORACLE_HOME%\%install_variable%"; if (directory_popup == true) { directory_ok = false; while(directory_ok == false) { mark { OIS_EXECUTE_SCRIPT = "DETERMINE_PRODUCT_LOCATION"; PROD_HOME = execute(instantiate("%%ois_product_location%%\toolsois.vrf")); if (shared_oracle_compliant == true && prompt_path == true) { prod_home_list = explode(PROD_HOME,"\"); oracle_home_list = explode(ORACLE_HOME,"\"); while(first(oracle_home_list) == first(prod_home_list)) { oracle_home_list = rest(oracle_home_list); if (empty(oracle_home_list)) break(); prod_home_list = rest(prod_home_list); if (empty(prod_home_list)) break(); } if (empty(oracle_home_list) == false) { mark { information_dialog(instantiate(shared_msg)); } } else directory_ok = true; } else directory_ok = true; } } } else { PROD_HOME = default_home; } is_depend_exist = false; /*END_OIS*/ /*BEGIN_OIS,VRF_BIND_VARIABLES_BLOCK*/ OLD_SECTION_HEADING_EXISTS = FALSE; OIS_EXECUTE_SCRIPT = "VERIFY_ENVIRONMENT_VARIABLES"; execute(instantiate("%%ois_product_location%%\toolsois.vrf")); /*END_OIS*/ /*BEGIN_OIS,VRF_DEPENDENCY_BLOCK*/ if (is_depend_exist) { OIS_EXECUTE_SCRIPT = "VERIFY_DEPENDENCIES"; execute(instantiate("%%ois_product_location%%\toolsois.vrf")); } /********************************* Verify PARENT if explicitly called **********************************/ install_parent = FALSE; if(child_in_control) { OIS_EXECUTE_SCRIPT = "VERIFY_PARENT"; install_parent = execute(instantiate("%%ois_product_location%%\toolsois.vrf")); } /*END_OIS*/ /*BEGIN_OIS,VRF_CALCULATE_SUM_BLOCK*/ /* calculate sum of sizes of all group for which the user has specified to write on the target */ depsum = 0; if (is_depend_exist) { OIS_EXECUTE_SCRIPT = "SUM_DEPENDENCIES"; depsum = execute(instantiate("%%ois_product_location%%\toolsois.vrf")); } total_sum = 0; /*********************************************************************** Return total size of files depending upon which options were selected for installation... ************************************************************************/ if (is_child_product) { if(install_parent) total_sum = total_sum + verify(product_parent(current_product)); } SUMALL = SUMALL + total_sum; if(parent_in_control) { OIS_EXECUTE_SCRIPT = "VERIFY_COMPONENTS"; total_sum = total_sum + execute(instantiate("%%ois_product_location%%\toolsois.vrf")); } 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); total_sum = total_sum + size_component; } } } child_products = rest(child_products); } } SUMALL = SUMALL + depsum; return (SUMALL); /*END_OIS*/ }