/* Copyright (c) Oracle Corporation 1992. All Rights Reserved */ /***************************************************************************** NAME update61.vrf - V3.1.2 version analysis/product configuration script for checking update status DESCRIPTION This script checks dependencies and environment settings for the update of all products OWNER Jeremy Williams MODIFIED DD-MMM-YY Reason jewillia 03-NOV-94 Created *****************************************************************************/ { /***************************************************************************** Local variables... *****************************************************************************/ /* local install flags and variables */ total_size = 0; version_list = list(); msb_version_list = list(); display_version = ""; display_product_label = ""; verify_list = list(); install_list = list(); reference_list = list(); check_list = list(); extras = list(); install_all = ""; dll_version_string = ""; /***************************************************************************** Product name and version strings... *****************************************************************************/ /* * Create a label with the product, version, and OS */ 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,"."); /***************************************************************************** NLS Prompt strings... *****************************************************************************/ display_product_label = nls("ui_product", "%product_label% Version %display_version%"); installing_product = nls("installing_product","Starting Installation of %%product_label%%"); installing_deinstl = nls("installing_deinstl","Installing %%product_label%% Installation scripts..."); installing_patchset = nls("installing_patchset","Installing %%product_label%% patchset file..."); getting_products = nls("getting_products","Getting list of installed products..."); analyzing_product = nls("analyzing_product","Analyzing %%next_product_label%%..."); removing_old = nls("removing_old","Removing obsolete files from previous versions of %%product_label%%..."); registering_product = nls("registering_product","Registering %%product_label%%..."); modify_environment = nls("modify_environment","Modifying %%product_label%% Environment Variables..."); updateable_products_prompt = nls("updateable_products_prompt","The following installed product(s) can be updated:%carriage_return%%carriage_return%%%extrastring%%"); updateable_products_prompt2 = nls("updateable_products_prompt2","The following installed product(s) can be updated (page %%page_string%%/%%total_page_string%%):%carriage_return%%carriage_return%%%extrastring%%"); updateable_products_prompt3 = nls("updateable_products_prompt3","The products on your machine will now be updated. Select OK to start the installation. Select Cancel to abort the installation."); updateable_products_content = nls("updateable_products_content","Required Products"); updateable_products_help = nls("updateable_products_help","The product list is a list of products that are currently installed on your machine and can be updated by installing newer versions from the distribution medium. There may be other products installed on your machine that are not on this distribution medium or other products on the distribution medium that are not currently installed. None of these products will be updated. "); old_updateable_products_help = nls("updateable_products_help","The product list is a list of products that are currently installed on your machine and can be updated by installing newer versions from the distribution medium. There may be other products installed on your machine that are not on this distribution medium or other products on the distribution medium that are not currently installed. None of these products will be updated. The following system DLLs can be installed by installing the System Support Files product. %%dll_version_string%%"); noupdateable_products_prompt = nls("noupdateable_products_prompt","The products currently installed on your machine are all up to date."); other_products_failure = nls("other_products_failure","%%product_label%% is a script which checks to see if the products currently installed into %%oracle_home%% can be updated by products on this installation medium. As such it it not designed to be run with any other products selected for installation and which may be part way through installing. Please re-run the installation of this product (on its own) after you have completed the installation of the other selected products. Select the OK button to continue with the installation of the other selected products. Select the Cancel button to abort the current installation. "); /***************************************************************************** Start main logic... *****************************************************************************/ /***************************************************************************** Check Installer and Product version *****************************************************************************/ { SHARED_ORACLE_COMPLIANT = TRUE; { 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_v ersion%% or later in order to perform this installation."))); } ] /* This FAILURE will cause 3.0.9.x installer to exit gracefully. */ /***************************** Set the VRF-INS script ratchet ******************************/ vrf_ratchet = "7.2.96.5.6"; other_selected_products = list(); union(other_selected_products,selected_products); extract(other_selected_products, current_product); /* also remove from this list any selected products that are not currently installed */ copy_other_selected_products = list(); union(copy_other_selected_products, other_selected_products); while(not(empty(copy_other_selected_products))) { next_selected_product = first(copy_other_selected_products); copy_other_selected_products = rest(copy_other_selected_products); next_selected_product_name = product_name(next_selected_product); if (not(registered(next_selected_product_name))) { extract(other_selected_products, next_selected_product); } } if ((doit) && (not(empty(other_selected_products)))) { information_dialog(instantiate(other_products_failure)); doit = false; } if( (not(doit)) && (member(selected_products, current_product)) ) ui_action(instantiate(halt_installation)); } /***************************************************************************** Now check the system DLLs *****************************************************************************/ if (doit) { if (false) { ui_action(instantiate(analyze_depend)); win_loc = windows_directory(); win_sys_loc = windows_system_directory(); ssf20_prod_loc = product_location(ssf20_product); ssf20_media_loc = "%product_home%\%ssf20_prod_loc%"; spawn_dir = windows_directory(); dll_file_list = list( "COMPOBJ.DLL", "OLE2.DLL", "OLE2CONV.DLL", "OLE2DISP.DLL", "OLE2NLS.DLL", "OLE2PROX.DLL", "TYPELIB.DLL", "STORAGE.DLL", "VSHARE.386", "MFC250.DLL", "MFCD250.DLL", "MFCO250.DLL", "MFCOLEUI.DLL", "CTL3D.DLL", "CTL3DV2.DLL", "COMMDLG.DLL", "MSOLEVBX.DLL", "VBOA300.DLL" ); dll_version_list = list(); while(not(empty(dll_file_list))) { next_dll = first(dll_file_list); dll_file_list = rest(dll_file_list); installed_file = instantiate("%win_sys_loc%\%next_dll%"); distributed_file = instantiate("%ssf20_media_loc%\%next_dll%"); { installed_version = ""; if (exists(installed_file)) { installed_version = windows_file_version(installed_file); } } ['INVALID_FILE_NAME,'PERMISSION_DENIED,'OS_ERROR, 'FILE_NOT_FOUND: installed_version = "";] { distributed_version = ""; if (exists(distributed_file)) { distributed_version = windows_file_version(distributed_file); } } ['INVALID_FILE_NAME,'PERMISSION_DENIED,'OS_ERROR, 'FILE_NOT_FOUND: distributed_version = "";] info_string = "%next_dll% %installed_version% --> %distributed_version%"; add(dll_version_list,info_string); } dll_version_string = implode(dll_version_list,carriage_return); } ['UNBOUND_VARIABLE: dll_version_string = "";] } /***************************************************************************** Now check which products need to be updated *****************************************************************************/ if (doit) { ui_action(instantiate(getting_products)); check_list = all_products(); /* bug?? the list is longer than it should be and contains duplicates */ sort(check_list,TRUE); while(not(empty(check_list))) { next_product = first(check_list); check_list = rest(check_list); next_product_name = product_name(next_product); next_product_version = product_version(next_product); next_product_label = product_interface_label(next_product); /* ui_action(instantiate(analyzing_product)); */ /* see if it is an 'unused' product, ie not really present except for .prd entry. Should also check for other types eg hidden. */ parent_product = next_product; { while (TRUE) { new_parent_product = product_parent(parent_product); parent_product = new_parent_product; } } ['PARENT_NOT_FOUND: continue();] if (parent_product != unused) { if (registered(product_name(next_product))) { next_product_registry = registration(next_product_name); next_product_registry_label = registry_interface_label(next_product_registry); if (earlier_version(next_product_registry, next_product_version)) { add(verify_list,next_product); add(extras,next_product_registry_label); } } } } /* now display list to user */ mark { mark { if (not(empty(extras))) { { extrastring = implode(extras,", "); information_dialog(instantiate(updateable_products_prompt), instantiate(updateable_products_content), instantiate(updateable_products_help)); } [ 'LEXICAL_ERROR, 'STRING_TOO_LONG: { /* probably blew a string length - try splitting up the list */ all_pages_extras = list(); page_extras = list(); page_count = 1; product_count = 0; total_page_count = 999; /* assume no more pages than this */ total_page_string = stringify(total_page_count,FALSE); copy_extras = list(); union(copy_extras, extras); while (not(empty(copy_extras))) { next_product = first(copy_extras); product_count = product_count + 1; add(page_extras,next_product); { extrastring = implode(page_extras,", "); page_string = stringify(page_count,FALSE); dummy = instantiate(updateable_products_prompt2); copy_extras = rest(copy_extras); } [ 'LEXICAL_ERROR, 'STRING_TOO_LONG: { extract(page_extras,next_product); add(all_pages_extras,page_extras); page_extras = list(); page_count = page_count + 1; } ] } /* remember to add in this last page */ add(all_pages_extras,page_extras); page_count = page_count + 1; /* now display the complete list */ total_page_count = page_count - 1; total_page_string = stringify(total_page_count,FALSE); page_count = 1; while (not(empty(all_pages_extras))) { display_extras = first(all_pages_extras); all_pages_extras = rest(all_pages_extras); extrastring = implode(display_extras,", "); page_string = stringify(page_count,FALSE); information_dialog(instantiate(updateable_products_prompt2), instantiate(updateable_products_content), instantiate(updateable_products_prompt2)); page_count = page_count + 1; } } ] /* information_dialog(instantiate(updateable_products_prompt3)); */ } else { information_dialog(instantiate(noupdateable_products_prompt), instantiate(updateable_products_content), instantiate(updateable_products_help)); } } /* end mark */ } /* end mark */ } /***************************************************************************** Return total size of files depending upon which options were selected for installation ... *****************************************************************************/ if (doit) { ui_action(instantiate(analyze_depend)); total_size = 0; while(not(empty(verify_list))) { next_product = first(verify_list); verify_list = rest(verify_list); verify_size = verify(next_product); ui_product(product_label); ui_action(instantiate(analyze_depend)); if (verify_size != 0) { add(install_list,next_product); } total_size = total_size + verify_size; } } /***************************************************************************** Return sum including this prodct *****************************************************************************/ if (doit) { product_size = sum(deinstl); total_size = total_size + product_size; return(total_size); } else { refresh_map_file = FALSE; return(0); } }