/* Copyright (c) Oracle Corporation 1996. All Rights Reserved */ /***************************************************************************** NAME win32.pvf - V3 post version analysis script for Windows 95 and Windows NT products. DESCRIPTION This script performs post version analysis functionality. In particular, it analyzes the 'products_for_installation' list so that the Installer can report which products need to be implicitly installed as a consequence of the user's current configuration and product selection. CREATED Siddhartha Agarwal, July 10, 1996 MODIFIED DD-MMM-YY Reason jewillia 14-FEB-97 Tweak when to display the products list jewillia 06-MAR-96 Modified to display selected and non-selected products *****************************************************************************/ { { ui_graphics("%product_home%\usrad%nls_abbreviation%.bmp"); } ['default: { ui_graphics("%product_home%\adv%nls_abbreviation%.bmp"); } ['default: { ui_graphics("%installer_home%\adv%nls_abbreviation%.bmp"); } [ 'default: { ui_graphics("%installer_home%\advus.bmp"); } ['default: continue();] ] ] ] if (user_action == 'install) { prod_not_empty = not(empty(products_for_installation)); /* these messages are defined in user.avf and should be translated there. But check here to avoid crashing the script. The definition should be the same in both places. */ {all_products_uptodate = all_products_uptodate;} ['UNBOUND_VARIABLE: all_products_uptodate = nls("all_products_uptodate", "All the products that you selected are up to date and do not need to be copied to your machine."); ] {standard_product_prompt2 = standard_product_prompt2;} ['UNBOUND_VARIABLE: standard_product_prompt2 = nls("standard_product_prompt2", "The following product that you selected will be copied to your machine:%carriage_return%%carriage_return%%%standardstring%%"); ] {standard_product_prompt2r = standard_product_prompt2r;} ['UNBOUND_VARIABLE: standard_product_prompt2r = nls("standard_product_prompt2r", "The following product that you selected will be copied to your machine:%carriage_return%%carriage_return%%%standardstring%%%carriage_return%%carriage_return%Click on OK to continue and view the list of additional required products."); ] {standard_products_prompt2 = standard_products_prompt2;} ['UNBOUND_VARIABLE: standard_products_prompt2 = nls("standard_products_prompt2", "The following %%selected_count_products%% products that you selected will be copied to your machine:%carriage_return%%carriage_return%%%standardstring%%"); ] {standard_products_prompt2r = standard_products_prompt2r;} ['UNBOUND_VARIABLE: standard_products_prompt2r = nls("standard_products_prompt2r", "The following %%selected_count_products%% products that you selected will be copied to your machine:%carriage_return%%carriage_return%%%standardstring%%%carriage_return%%carriage_return%Click on OK to continue and view the list of additional required products."); ] {standard_products_prompt2m = standard_products_prompt2m;} ['UNBOUND_VARIABLE: standard_products_prompt2m = nls("standard_products_prompt2m", "The following %%selected_count_products%% products that you selected will be copied to your machine:%carriage_return%%carriage_return%%%standardstring%%%carriage_return%%carriage_return%More follows..."); ] {standard_products_content = standard_products_content;} ['UNBOUND_VARIABLE: standard_products_content = nls("standard_products_content", "Install Products"); ] {required_product_prompt2 = required_product_prompt2;} ['UNBOUND_VARIABLE: required_product_prompt2 = nls("required_product_prompt2", "The following product is required in addition to the ones you selected and will be copied to your machine:%carriage_return%%carriage_return%%%extrastring%%"); ] {required_products_prompt2 = required_products_prompt2;} ['UNBOUND_VARIABLE: required_products_prompt2 = nls("required_products_prompt2", "The following %%required_count_products%% products are required in addition to the ones you selected and will be copied to your machine:%carriage_return%%carriage_return%%%extrastring%%"); ] {required_products_prompt2m = required_products_prompt2m;} ['UNBOUND_VARIABLE: required_products_prompt2m = nls("required_products_prompt2m", "The following %%required_count_products%% products are required in addition to the ones you selected and will be copied to your machine:%carriage_return%%carriage_return%%%extrastring%%%carriage_return%%carriage_return%More follows..."); ] {required_products_content = required_products_content;} ['UNBOUND_VARIABLE: required_products_content = nls("required_products_content", "Required Products"); ] {pfi_help = pfi_help;} ['UNBOUND_VARIABLE: pfi_help = nls("pfi_help","The following %%length_composite%% products will be installed:%carriage_return%%carriage_return%%%compositestring%%"); ] {pfi2_help = pfi2_help;} ['UNBOUND_VARIABLE: pfi2_help = nls("pfi2_help","%%length_selected%% product(s) need to be installed from your list of chosen products.%%length_required%% product(s) are additionally required and will be installed. These dialogs list the products that will be installed onto your machine."); ] /* [jewillia] */ { show_verified_products = show_verified_products; } ['UNBOUND_VARIABLE: show_verified_products = verbose;] if (show_verified_products) { standard = list(); extras = list(); composite = list(); composite_overflow=list(); { if (false) { pfi = list(); union(pfi,products_for_installation); sort(pfi,TRUE); while (not(empty(pfi))) { prod = first(pfi); prodlab = product_interface_label(prod); ver = product_version(prod); add(composite,"%prodlab%"); pfi = rest(pfi); } { compositestring = implode(composite,", "); length_composite = length(composite); } ['STRING_TOO_LONG: { /* assume that it can be done in 2 lots */ lc = length(composite); lc2 = lc/2; while (lc2 > 0) { nextComposite = first(composite); composite = rest(composite); add(composite_overflow,nextComposite); lc2 = lc2 - 1; } compositeoverflowstring = implode(composite_overflow,", "); compositestring = implode(composite,", "); length_compositeoverflow = length(composite_overflow); length_composite = length(composite); /* information_dialog("%length_compositeoverflow% %compositeoverflowstring%"); information_dialog("%length_composite% %compositestring%"); */ } ] } pfi = list(); union(pfi,products_for_installation); while (not(empty(pfi))) { prod = first(pfi); if ((member(selected_products, prod)) || (member(case_selected_products, prod))) { prodlab = product_interface_label(prod); ver = product_version(prod); add(standard,"%prodlab% %ver%"); } else { prodlab = product_interface_label(prod); ver = product_version(prod); add(extras,"%prodlab% %ver%"); } pfi = rest(pfi); } length_selected = length(standard); length_required = length(extras); repeat_to_mark = TRUE; while (repeat_to_mark) { mark { repeat_to_mark = FALSE; if (empty(standard)) information_dialog(instantiate(all_products_uptodate)); if (not(empty(standard))) { { standardstring = implode(standard,", "); if (length(standard) == 1) { if (empty(extras)) information_dialog(instantiate(standard_product_prompt2), instantiate(standard_products_content), instantiate(pfi2_help)); else information_dialog(instantiate(standard_product_prompt2r), instantiate(standard_products_content), instantiate(pfi2_help)); } else { selected_count_products = stringify(length(standard),FALSE); if (empty(extras)) information_dialog(instantiate(standard_products_prompt2), instantiate(standard_products_content), instantiate(pfi2_help)); else information_dialog(instantiate(standard_products_prompt2r), instantiate(standard_products_content), instantiate(pfi2_help)); } } [ 'CANCEL(A,B,C,D): { /* trap a cancel signal and re-issue it since we really mean cancel and do not want to apply the default action. */ signal(A,B); } 'DEFAULT(A,B,C,D): { /*information_dialog("A=%A% B=%B% C=%C% D=%D%"); */ /* most probably a string length blew up - try splitting into 2 */ first_half_standard = list(); second_half_standard = list(); union(second_half_standard,standard); x = (length(standard)+1)/2; while (x > 0) { add(first_half_standard,first(second_half_standard)); second_half_standard = rest(second_half_standard); x = x - 1; } standardstring = implode(first_half_standard,", "); information_dialog(instantiate(standard_products_prompt2m), instantiate(standard_products_content), instantiate(pfi2_help)); standardstring = implode(second_half_standard,", "); if (empty(extras)) information_dialog(instantiate(standard_products_prompt2), instantiate(standard_products_content), instantiate(pfi2_help)); else information_dialog(instantiate(standard_products_prompt2r), instantiate(standard_products_content), instantiate(pfi2_help)); } ] } mark { if (not(empty(extras))) { { required_count_products = stringify(length(extras),FALSE); extrastring = implode(extras,", "); if (length(extras) == 1) { information_dialog(instantiate(required_product_prompt2), instantiate(required_products_content), instantiate(pfi2_help)); } else { information_dialog(instantiate(required_products_prompt2), instantiate(required_products_content), instantiate(pfi2_help)); } } [ 'CANCEL(A,B,C,D): { /* trap a cancel signal and re-issue it since we really mean cancel and do not want to apply the default action. */ signal(A,B); } 'DEFAULT(A,B,C,D): { /* information_dialog("2 A=%A% B=%B% C=%C% D=%D%"); */ if ("%A%" == "'{GB2}") { /* clicking on the BACK button on one of the previous dialogues seems to raise an exception that is caught by this default handler. The details are: A='{GB2} B=%SGVD% C=win32.pvf D=192 Trying to trap this explicitly has failed so trap the value of A instead (this also seems to be the only way to test it) and enclose this whole piece of code in a while loop so it gets repeated. */ repeat_to_mark = TRUE; } else { /* most probably a string length blew up - try splitting into 2 */ first_half_extras = list(); second_half_extras = list(); union(second_half_extras,extras); x = (length(extras)+1)/2; while (x > 0) { add(first_half_extras,first(second_half_extras)); second_half_extras = rest(second_half_extras); x = x - 1; } extrastring = implode(first_half_extras,", "); information_dialog(instantiate(required_products_prompt2m), instantiate(required_products_content), instantiate(pfi2_help)); extrastring = implode(second_half_extras,", "); information_dialog(instantiate(required_products_prompt2), instantiate(required_products_content), instantiate(pfi2_help)); } } ] } } /* end mark */ } /* end mark */ } } [ 'UNBOUND_VARIABLE: continue(); ] /* pfi */ /* could possibly be unbound */ } /* if verbose */ } /* user_action == 'install */ return(0); }