{ /* library of scripts called from Designer/2000 VRF scripts */ /* entry points: EXECUTE_SCRIPT == "START.VRF"; EXECUTE_SCRIPT == "INSTVER.VRF"; EXECUTE_SCRIPT == "DES2_UPG.VRF" EXECUTE_SCRIPT == "VERIFY_DEPENDENCIES.VRF" EXECUTE_SCRIPT == "DES2_HOME.VRF" EXECUTE_SCRIPT == "VERIFY_CHILDREN.VRF"; EXECUTE_SCRIPT == "END.VRF"; entry points found in des2k_72.cmn EXECUTE_SCRIPT == "TRANSLATE_VARIABLES.CMN" EXECUTE_SCRIPT == "DES2_BB.DIS" EXECUTE_SCRIPT == "DES2_BB.REM" EXECUTE_SCRIPT == "FILASSOC.VRF" */ /************************************************************************** Check that all variables we might use are instantiated **************************************************************************/ {debug_script = debug_script;} ['UNBOUND_VARIABLE: {debug_script = false;}] /* used for script call monitoring */ {debug_values = debug_values;} ['UNBOUND_VARIABLE: {debug_values = false;}] /* used for looking at script values */ {filename = filename;} ['UNBOUND_VARIABLE: {filename = "unknown file";}] filename2 = first(reverse(explode(current_script,"\/"))); /* allow unix and dos/os2 seperators */ filename2 = "%filename%->%filename2%"; /* ... information_dialog("%filename2% %EXECUTE_SCRIPT%"); ... */ /************************************************************************** Values to signal script completion **************************************************************************/ script_completed = "completed"; script_failed = "failed"; script_return_value = 0; return_at_end = true; vrf_script_ratchet = "7.2.96.5.6"; /************************************************************************** Start the different entry points **************************************************************************/ if ( (EXECUTE_SCRIPT == "TRANSLATE_VARIABLES.CMN") || (EXECUTE_SCRIPT == "DES2_BB.DIS") || (EXECUTE_SCRIPT == "DES2_BB.REM") || (EXECUTE_SCRIPT == "FILASSOC.VRF") ) { script_return_value = execute("%product_home%\des2k_72.cmn"); if (return_at_end) return(script_return_value); } if (EXECUTE_SCRIPT == "START.VRF") { /* start.vrf */ /* start the vrf script */ /* inputs: start_vrf_list : product_script, product_debug (atom) outputs: filename : string gobal: returns: */ { filename = first(reverse(explode(first(start_vrf_list),"\/"))); /* allow unix and dos/os2 seperators */ filename2 = first(reverse(explode(current_script,"\/"))); /* allow unix and dos/os2 seperators */ filename2 = "%filename%->%filename2%"; {debug_list = debug_list;} ['UNBOUND_VARIABLE: debug_list = list();] debug_script = member(debug_list,'DEBUG_VRF); debug_values = member(debug_list,first(rest(start_vrf_list))); if (debug_script) information_dialog("Starting %filename%..."); case_graphics_file = DESIGNER01_GRAPHICS_FILE; EXECUTE_SCRIPT = "DES2_BB.DIS"; if (false) execute("%product_home%\des2k_72.cmn"); EXECUTE_SCRIPT = script_completed; script_return_value = 0; if (return_at_end) return(script_return_value); } } if (EXECUTE_SCRIPT == "INSTVER.VRF") { /* instver.vrf */ /* check the version of the installer and also checks to see if user is forcing a reinstall or downgrade of Designer/2000 components (or other header product eg Mentor series) */ /* inputs: outputs: doit : boolean gobal: returns: */ { /* as an optimisation put the start.vrf code here to avoid calling this library file lots of times */ if (not(perform_start_vrf)) { filename = first(reverse(explode(first(start_vrf_list),"\/"))); /* allow unix and dos/os2 seperators */ filename2 = first(reverse(explode(current_script,"\/"))); /* allow unix and dos/os2 seperators */ filename2 = "%filename%->%filename2%"; {debug_list = debug_list;} ['UNBOUND_VARIABLE: debug_list = list();] debug_script = member(debug_list,'DEBUG_VRF); debug_values = member(debug_list,first(rest(start_vrf_list))); if (debug_script) information_dialog("Starting %filename%..."); } SHARED_ORACLE_COMPLIANT = TRUE; /* for 16 bit OCSM */ case_designer_products_moh = evaluate("case_designer_products_moh",'GLOBAL); moh_product_list = list(desrep61_product, cksr40_product /* , desbs61_product */ ); if ((member(moh_product_list,current_product)) || (case_designer_products_moh == TRUE)) multiple_home_installation = TRUE; else multiple_home_installation = FALSE; { doit = execute("%installer_home%\%operating_system%.vrf"); } [ 'UNBOUND_VARIABLE(A,B,C,D): { 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))))), "."); required_version_info = instantiate(nls("instver_too_early", "The version of the Installer currently running is %%installer_version%%. The installation you have chosen requires version %%required_version%% or later.%carriage_return% Please run version %%required_version%% or later in order to perform this installation.")); required_version_help = instantiate(nls("instver_too_early_error","Error %B% whilst installing %product_label%")); required_version_content = instantiate(nls("instver_too_early_content","Installer verion mismatch")); required_version_failure = instantiate(nls("instver_too_early_failure","Installation terminated with Installer version mismatch.")); information_dialog(required_version_info, required_version_content, required_version_help, 'NOCANCEL); signal('FAILURE, required_version_failure); /* signal('FAILURE, required_version_info); */ } ] /* This FAILURE will cause 3.0.9.x installer to exit gracefully. */ if (not((member(moh_product_list,current_product)) || (case_designer_products_moh == TRUE))) execute("%PRODUCT_HOME%\regnmoh.vrf"); /* Create a label with the product, version, and OS */ /* current version set in windows.vrf only if product already installed */ current_name = product_name(current_product); current_version = product_version(current_product); display_version = ""; if (not(current_version == "")) { version_list = explode(current_version,"."); msb_version_list = list(first(version_list), first(rest(version_list))); display_version = implode(msb_version_list,"."); } forced_install = FALSE; if ((member(selected_products,current_product)) && (not(empty(case_selected_products))) && (BOOTSTRAP == TRUE) && (doit == FALSE)) { /* The current product is one the user selected but is up to date and therefore will not get installed. There are additional selected products but these are in case_selected_products. There are 2 things we can do - transfer all the products from case_selected_products to products (but this does not seem to work) or just get this current product to install itself. */ if (true) { doit = TRUE; /* remember we are forcing the install */ /* forced_install = FALSE; */ forced_install = TRUE; } else { while (not(empty(case_selected_products))) { next_selected_product = first(case_selected_products); case_selected_products = rest(case_selected_products); add(selected_products,next_selected_product); } } } /* now check to see if patchset install bundle and not first install of product */ if (doit) { if (patch_installation) { if (version_status == 'NEW_INSTALL) { /* can not have a patchset bundle and a new install */ doit = FALSE; extract(products_for_installation,current_product); current_label = product_interface_label(current_product); current_version = product_version(current_product); if (verbose) information_dialog(instantiate(patchset_new_install)); } /* ... else if ((version_status == 'UPGRADE) || (version_status == 'DOWNGRADE) || (version_status == 'REINSTALL)) { } ... */ } } EXECUTE_SCRIPT = script_completed; script_return_value = 0; if (return_at_end) return(script_return_value); } } if (EXECUTE_SCRIPT == "VERIFY_DEPENDENCIES.VRF") { /* verify_dependencies.vrf */ /* 1) decide the calling hierarchy between parent and child and which children should be installed (actual verify and install done later) 2) sets the reference_list to install products references 3) verifies dependencies and parent */ /* inputs: verify_list : list (products) outputs: language_subgroup : string global: total_size : integer case_selected_products : list (products) case_dependent_products : list (products) children_verify_list : list (products) install_list : list (products) header_product : product header_products : list (products) */ { ui_product(product_label); ui_action(instantiate(analyze_strategy)); /************************************************************************** Set the header product so that child-parent lists can be set find all children (including children's children etc) of this product and of the ultimate parent (the header) and all your parents (up to and including the header product). These are used in a number of places later on **************************************************************************/ /* find out if we are des2000, odd, doc, help, or online mentor */ { header_product = current_product; while (not(member(header_products,header_product))) { header_product = product_parent(header_product); } } ['PARENT_NOT_FOUND: header_product = current_product; ] /* all children etc of current product excluding current product */ my_children_list = list(); children_list = all_child_products(current_product); while (not(empty(children_list))) { next_child = first(children_list); children_list = rest(children_list); grandchild_list = all_child_products(next_child); union(children_list,grandchild_list); add(my_children_list,next_child); } /* all children etc of header product including header product */ header_children_list = list(header_product); children_list = all_child_products(header_product); while (not(empty(children_list))) { next_child = first(children_list); children_list = rest(children_list); grandchild_list = all_child_products(next_child); union(children_list,grandchild_list); add(header_children_list,next_child); } /* all parents etc of current product excluding current product but stop at header product */ my_parent_list = list(); possible_parent = current_product; { while (not(possible_parent == header_product)) { possible_parent = product_parent(possible_parent); add(my_parent_list, possible_parent); } } ['PARENT_NOT_FOUND: continue();] /***************************************************************************** Some checks to be performed only once *****************************************************************************/ {case_upgrade_check = evaluate("case_upgrade_check",'GLOBAL);} ['UNBOUND_VARIABLE: set("case_upgrade_check", FALSE,'GLOBAL);] if (evaluate("case_upgrade_check",'GLOBAL) == FALSE) { set("case_upgrade_check", TRUE, 'GLOBAL); /***************************************************************************** once only NLS check, results used later by each invocation *****************************************************************************/ /* this script sets the language subgroup that will be used for installation. If the subgroup differs from the nls abbreviation then it means that different (ie american) files will be installed in preference to the ones asked for. Tell the user. The script will be called again later as part of the standard order of install. It is only repeared here so that the message can be issued early on. */ /* previous release supported english(us), french(f), german(d), spanish(e), italian(i) */ /* now only english */ /* special version for japanese(ja) */ /* the nls files have subgroups fields us, f, d, e, i, and the sum and copy commands only act on a subgroup %language_subgroup% so set this variable */ /* there must be a more efficient way of checking that the language is set to one of those supported by the code (?). Maybe a string lookup table? For this small subset it probably does not matter. */ language_subgroup = "us"; /* the default */ case_allow_nls_support = false; /* set false if only english (us) supported */ if (case_allow_nls_support) { if ("%nls_abbreviation%" == "ja") language_subgroup = "ja"; /*... if ("%nls_abbreviation%" == "us") language_subgroup = "us"; if ("%nls_abbreviation%" == "f") language_subgroup = "f"; if ("%nls_abbreviation%" == "d") language_subgroup = "d"; if ("%nls_abbreviation%" == "e") language_subgroup = "e"; if ("%nls_abbreviation%" == "i") language_subgroup = "i"; ... */ } if (not("%nls_abbreviation%" == language_subgroup)) { if (verbose) { information_dialog(instantiate(lang_not_supported)); } } set("case_language_subgroup", language_subgroup, 'GLOBAL); } /***************************************************************************** End of some checks to be performed only once *****************************************************************************/ /***************************************************************************** set NLS variable in each local namespace *****************************************************************************/ {language_subgroup = evaluate("case_language_subgroup", 'GLOBAL);} ['UNBOUND_VARIABLE: language_subgroup = "us";] /************************************************************************** Code for checking whether parent product is called directly or by child and determining which child products should be verified **************************************************************************/ /* The list products_for_installation is a list of products that have been verified. The list selected_products is a list of the products that the user selected from the custom install or were selected by the user startup script. The list case_selected_products is a list of (case or other) products selected for installation by the user startup script in addition to the selected_products list. This additional list is used so selected_products only needs to contain des2_72 (the case parent). This avoids problems with the namespace(s) disappearing and makes for a neater install. The list case_selected_products is treated just like selected products in the .vrf file (modified for case). The list case_dependent_products is a list of (case or other) products that are to be called as dependencies. If you are in this list then install all your children. Any product can add a case product to this list. For R2.1 - R2.1.2: In particular note that forms, reports, graphics install scripts have been modified to include the following code: if(not(member(case_dependent_products, current_product))) if(not(member(selected_products, current_product))) ... parent_in_control = FALSE; ... to determine if the parent product is in control. */ /* 1) if any of current product's children (or children's children) are in products_for_installation then this script for current product must have been called from a child otherwise you are in charge and must install all your children. The situation parent verifies child verifies parent can not happen since the installer stops a verification script running twice. Where a child is called from one selected product and its parent is called from another selected product (in that order) then the second of these dependencies indicates that the whole product (all children) is required. But the first dependency will already have resulted in the child and its parent being verified and this parent verification will have not resulted in all the other children being verified. There is no easy solution to this !! The case_selected_products list is a partial attempt to get around this for when case is called as a dependency. When calling other products we may have to massage the verification list a bit depending on what else is selected. 2) if you are selected (in the lists selected_products or case_selected_products) or in case_dependent_products ('selected' by virtue of being a dependency) then always install all your children as the whole product is required. There is a special case when the case parent is selected from the user startup script to install only the selected children (they will be in case_selected_products) rather than all its children. */ /************************************************************************** decide which children to install **************************************************************************/ /* there is the special case when called from the startup script to install only the children that are in case_selected_products and not all the children (unless none are specified) */ if ((member(selected_products,current_product)) && (not(empty(case_selected_products))) && (BOOTSTRAP == TRUE)) { install_all_children = FALSE; } else if (member(selected_products,current_product)) { install_all_children = true; } else if (member(case_selected_products, current_product)) { my_children_in_case_selected_products = list(); union(my_children_in_case_selected_products,case_selected_products); intersect(my_children_in_case_selected_products,my_children_list); install_all_children = (empty(my_children_in_case_selected_products)); /* actually in user.stp we add in any children we need and the comment is to the effect that adding a product to case_selected_products does not imply all children get added. */ install_all_children = FALSE; } else if ((member(case_dependent_products, current_product))) { install_all_children = true; } else { call_list = list(); /* use children and children's children etc since des2_72 product must know if it was called from ANY sub-child */ union(call_list, my_children_list); intersect(call_list, products_for_installation); install_all_children = empty(call_list); } if (debug_values) information_dialog("%current_name% install_all_children = %install_all_children%"); /************************************************************************** maintain the list of case products that will be installed **************************************************************************/ /* now that we have tested case_dependent products we can add to it. No need to add current product (all checking if current product is in case_dependent_products has been done) since we may not be installing all of it and its children. Add in the verify_list since it may contain other case products. */ /* union(case_dependent_products, list(current_product)); */ union(case_dependent_products, verify_list); /************************************************************************** add the children we are going to install to the children_verify_list **************************************************************************/ children_verify_list = list(); if (install_all_children == TRUE) { /* add all children to verify_list. Do not add children's children since this could could result in the namespace error. Instead add children's children to case_dependent_products which is safer. */ /* union(children_verify_list, my_children_list); */ union(children_verify_list, all_child_products(current_product)); /* let everyone else know that each child is to be installed in full */ union(case_dependent_products, my_children_list); } else { /* called from a child product (or from a parent when current product is in case_selected_products). Take over the verify/install of any other child products that are in selected_products or any other child products that are in case_selected_products or any other child products that are in case_dependent_products */ /* verify children's children that meet the criteria only if their parent product is not in the list. This will ensure that all children are verified before the namespace disappears. Rather than trundling through the hierarchy of each product just make sure you verify your immediate children that are in this list first (before non immediate children). */ full_children_verify_list = list(); union(full_children_verify_list,case_selected_products); union(full_children_verify_list,selected_products); union(full_children_verify_list,case_dependent_products); intersect(full_children_verify_list,my_children_list); union(children_verify_list, full_children_verify_list); /* full_children_verify_list now contains all children to be verified as does children_verify_list (a copy). To order children_verify_list so that immediate children are first, exctract non immediate children by intesecting the list with a list of immediate children and then add in (at the end of the list) all the products that were removed by this intersection. */ intersect(children_verify_list, all_child_products(current_product)); subtract(full_children_verify_list, children_verify_list); /* full_children_verify_list now contains only children's children */ union(children_verify_list, full_children_verify_list); } /* if the current_product is des2_72 then there is an optimum order of children_verify_list (that also obeys the above rules) (we can also order the children of cgen72) */ { /* if (current_product == des2_72_product) */ { /* there is no optimum order for the generators provided they are after cgen72_product but set one anyway */ optimum_order = list(creq72_product, chelp72_product, descom61_products, repadm61_product, ctutx72_product, repman61_product, sysdes61_product, sysmod61_product, pmod61_product, cgen72_product, cgens72_product, cgenf61_product, cgenr61_product, cgeng30_product, cgenq30_product, cgenh61_product, cgenp20_product, cgenv61_product, cgenw61_product); optimum_order = reverse(optimum_order,'NOMUTATE); while (not(empty(optimum_order))) { next_optimum_product = first(optimum_order); optimum_order = rest(optimum_order); if (member(children_verify_list, next_optimum_product)) { extract(children_verify_list, next_optimum_product); children_verify_list = cons(next_optimum_product, children_verify_list); } } } } ['UNBOUND_VARIABLE: continue();] /************************************************************************** Set the reference list **************************************************************************/ /* precaution as verify list should not include parents or children who are verified by the scripts later on. */ subtract(verify_list,my_children_list); subtract(verify_list,my_parent_list); reference_list = list(); union(reference_list,verify_list); /************************************************************************** Fiddle the verify list to overcome install bug **************************************************************************/ /* if forms/reports/graphic generators will be installed then install the whole of forms/reports/graphics and remove the run time components from the verify list. Note that the reference list is already set and will not change. */ /* To ensure ALL the children of these products are installed add the products to the case_dependent_products list. Note that forms50.vrf, reports30.vrf, and graph30.vrf must be modified to check if the product is in the list when setting the parent_in_control variables. An alternative is to add these products to the list selected_products if they are not already in it but this involves modifying a system set variable and these products also then appear as user selected (which they are not). */ /* build a temporary list of what we expect to be installed */ temp_selected_products = list(); union(temp_selected_products,selected_products); union(temp_selected_products,case_selected_products); union(temp_selected_products,case_dependent_products); /* add in the children of temp selected products for those cases we know exist unless they are selected by virtue of selection from user.stp when only the children in case_selected_products need to be added (there is a similar check earlier on) */ { if (member(temp_selected_products, header_product)) { if (not((member(selected_products,header_product)) && (not(empty(case_selected_products))) && (BOOTSTRAP == TRUE))) { /* the header product (des2_72) is selected so all children will be installed */ union(temp_selected_products,header_children_list); } } } [ 'UNBOUND_VARIABLE : continue();] { if (member(temp_selected_products, cgen72_product)) { if (not((member(selected_products,cgen7_product)) && (not(empty(case_selected_products))) && (BOOTSTRAP == TRUE))) { /* the generators parent is selected so all the generators will be installed */ union(temp_selected_products,all_child_products(cgen72_product)); } } } [ 'UNBOUND_VARIABLE : continue();] union(temp_selected_products,products_for_installation); { if (member(temp_selected_products, creq72_product)) { union(temp_selected_products, creq72_dependency_list); } if (member(temp_selected_products, cgeng30_product)) { extract(verify_list, grun30_product); extract(verify_list, gdes30_product); if (case_install_dev2000_dependencies) { add(verify_list, graph30_product); union(case_dependent_products, list(graph30_product)); } } if (member(temp_selected_products, cgenf61_product)) { extract(verify_list, frun50_product); extract(verify_list, fdes50_product); if (case_install_dev2000_dependencies) { add(verify_list, forms50_product); union(case_dependent_products, list(forms50_product)); } } /* since reports runtime (and hence the whole product) now has a dependency on report builder then we may as well install the whole of reports as a dependency on creq72. */ /* if (member(temp_selected_products, cgenr61_product)) { extract(verify_list, rrun30_product); extract(verify_list, rdes30_product); if (case_install_dev2000_dependencies) { add(verify_list, report30_product); union(case_dependent_products, list(report30_product)); } } */ } ['UNBOUND_VARIABLE: continue(); ] /************************************************************************** end fiddle the verify list **************************************************************************/ /************************************************************************** perform verification of parent/header product **************************************************************************/ total_size = 0; ui_product(product_label); ui_action(instantiate(analyze_verify)); copy_verify_list = list(); if (not(member(header_products,current_product))) { { next_product = product_parent(current_product); if (not(next_product == header_product)) { add(copy_verify_list, next_product); } } ['PARENT_NOT_FOUND: continue();] add(copy_verify_list, header_product); } while(not(empty(copy_verify_list))) { next_product = first(copy_verify_list); copy_verify_list = rest(copy_verify_list); verify_size = verify(next_product); if (verify_size != 0) { add(install_list,next_product); total_size = total_size + verify_size; } ui_product(product_label); ui_action(instantiate(analyze_verify)); } /************************************************************************** end perform verification of parent/header product **************************************************************************/ /************************************************************************** perform verification of dependencies **************************************************************************/ copy_verify_list = list(); union(copy_verify_list,verify_list); while(not(empty(copy_verify_list))) { next_product = first(copy_verify_list); copy_verify_list = rest(copy_verify_list); if (debug_values) information_dialog("%filename2%%carriage_return%%current_name% verifying %next_product%"); verify_size = verify(next_product); if (verify_size != 0) { add(install_list,next_product); total_size = total_size + verify_size; } ui_product(product_label); ui_action(instantiate(analyze_verify)); } /************************************************************************** end perform verification of dependencies **************************************************************************/ case_graphics_file = DESIGNER01_GRAPHICS_FILE; EXECUTE_SCRIPT = "DES2_BB.DIS"; if (false) execute("%product_home%\des2k_72.cmn"); /************************************************************************** Return the install_all result **************************************************************************/ EXECUTE_SCRIPT = script_completed; script_return_value = 0; if (return_at_end) return(script_return_value); } } if (EXECUTE_SCRIPT == "END_VERIFY_DEPENDENCIES.VRF") { /* end_verify_dependencies.vrf */ /* inputs: outputs: gobal: returns: */ { if (forced_install) { /* the .vrf for this product ran to see if it would bring in any products in case_selected_products. See if they will be installed */ case_products_for_installation = list(); union(case_products_for_installation,case_selected_products); intersect(case_products_for_installation,products_for_installation); /* remember to subtract the size of the current product when looking to see if total_size is 0 */ /* if (not(empty(case_products_for_installation))) */ if ((not(empty(case_products_for_installation))) || ((total_size - install_size) > 0)) { /* keep doit==TRUE to run the .ins to install the case_selected_products */ /* next 4 lines copied from windows.vrf, where they would not have been executed because at that stage doit equalled FALSE */ if (not(member(products_for_installation,current_product))) add(products_for_installation,current_product); if (installation_mode == 'shared) add(products_for_configuration,product_name(current_product)); } else { doit = FALSE; total_size = total_size - install_size; } } /* graphics file will have been displayed in verify_dependencies.vrf */ case_graphics_file = DESIGNER01_GRAPHICS_FILE; EXECUTE_SCRIPT = "DES2_BB.REM"; if (false) execute("%product_home%\des2k_72.cmn"); EXECUTE_SCRIPT = script_completed; script_return_value = 0; if (return_at_end) return(script_return_value); } } if (EXECUTE_SCRIPT == "DES2_HOME.VRF") { /* des2_home.vrf */ /* asks the user for the destination of the product based on the the default and whether it has already been set. This is the same result as des2_var except the global namespace is accessed directly. */ /* inputs: case_home_list : structured list comprising - case_variable : string case_default : string case_prompt : string case_accept_default : boolean gobal: the variable name : list returns: case_value : string */ { case_variable = first(case_home_list); case_default = first(rest(case_home_list)); case_prompt = first(rest(rest(case_home_list))); case_accept_default = first(rest(rest(rest(case_home_list)))); if (debug_values) information_dialog("%filename2% - translating: variable : %case_variable% default : %case_default% prompt : %case_prompt% accept_default : %case_accept_default% "); /* search Oracle configuration file */ { case_ini_section = case_variable; case_translate_list = list(case_variable,ora_config,case_ini_section); EXECUTE_SCRIPT = "TRANSLATE_VARIABLES.CMN"; case_config_value = execute("%product_home%\des2k_72.cmn"); if (debug_values) information_dialog("value returned from Oracle configuration file - %case_variable% = %case_config_value%"); /* check that this is a valid directory name in case soemone has manually deleted the directory and not cleared up the in file or registry. */ if (not(exists(case_config_value))) { if (debug_values) information_dialog("%case_config_value% is not an existing directory - ignoring it"); case_config_value = ""; } } ['UNBOUND_ENVIRONMENT_VARIABLE: { if (debug_values) information_dialog("no value returned from Oracle configuration file"); case_config_value = ""; } ] { case_value = evaluate(case_variable,'GLOBAL); if (debug_values) information_dialog("value returned from global namespace - %case_variable% = %case_value%"); } ['UNBOUND_VARIABLE: { if (debug_values) information_dialog("global value for %case_variable% not found"); case_value = ""; } ] if (debug_values) { information_dialog("case_value=%case_value% case_config_value=%case_config_value% case_default=%case_default% case_accept_default=%case_accept_default% quick_install=%quick_install% "); } /* if the home variable has already been defined in the global namespace then use that value as the default if we need one as this route (or equivalent) has already been taken. If the home variable hasn't been defined and the product is installed then the default must be where the install placed the product files. In these 2 cases overwrite the value of case_default and ignore any value passed by the calling funtion. */ if (not(case_value == "")) { case_default = case_value; } else if (not(case_config_value == "")) { case_default = case_config_value; } /* do not ask the user to confirm/enter the path if: 1) the home variable has already been defined in the global namespace 2) there is a valid default and we must use it (case_accept_default = TRUE) 3) there is a valid default and quick_install is true (quick_install = TRUE) */ if (case_value == "") { if ((not(case_default == "")) && ((case_accept_default == TRUE) || (evaluate("quick_install",'GLOBAL) == TRUE))) { /* use the default */ case_value = case_default; } else { /* prompt the user */ makedir_default_dir = instantiate(case_default); makedir_select_dir_prompt = instantiate(case_prompt); current_product_il=product_interface_label(current_product); makedir_root_allowed = true; makedir_help = instantiate(case_makedir_help); /* defined in user.avf as an nls string */ ask_complete = FALSE; while (not(ask_complete)) { ask_complete = TRUE; case_value = ""; mark { /* check if we have come back to the mark and if so try to remove the directory that would have been created by makedir.vrf if it wasn't in existance before hand */ if ((case_value != case_config_value) && (case_config_value != "") && (case_value != "")) { { remove_directory(case_value); } [ 'DEFAULT: continue(); ] } { case_value = execute("%installer_home%\makedir.vrf"); } [ 'CANCEL: { /* defined in user.avf */ cancel_message = instantiate(cancel_message); cancel_prompt = instantiate(cancel_prompt); cancel_content = instantiate(cancel_content); cancel_help = instantiate(cancel_help); cancel_now = instantiate(cancel_now); cancel_proceed = instantiate(cancel_proceed); cancel_proceed2 = instantiate(cancel_proceed2); cancel_default = cancel_now; cancel_choices = list(cancel_now, cancel_proceed, cancel_proceed2); cancel_type = single_selection_dialog(cancel_prompt, cancel_choices, cancel_default, cancel_content, cancel_help); if (cancel_type == cancel_now) signal('CANCEL,cancel_message); if (cancel_type == cancel_proceed2) { case_value = makedir_default_dir; /* variables set using var = value in the user.avf scripts do not seem to be in the GLOBAL namespace because they can not be manipulated by set(,,'GLOBAL) statements inside product verification scripts. So use the set(,,'GLOBAL) instead so they can be manipulated here. */ set("quick_install", true,'GLOBAL); } if (cancel_type == cancel_proceed) ask_complete = FALSE; } ] mark { if ((ask_complete == TRUE) && (case_value != case_config_value) && (case_config_value != "")) { case_lost_files_message = instantiate(case_lost_files_message); /* defined in user.avf */ information_dialog(instantiate(case_lost_files_message),'NO_CANCEL); } } } } if (debug_values) information_dialog("value returned from file dialogue - %case_variable% = %case_value%"); } } /* now add/overwrite to global namespace */ set(case_variable,case_value,'GLOBAL); if (debug_values) information_dialog("returning translation - %case_variable% = %case_value%"); EXECUTE_SCRIPT = script_completed; script_return_value = case_value; if (return_at_end) return(script_return_value); } } if (EXECUTE_SCRIPT == "VERIFY_CHILDREN.VRF") { /* verify_children.vrf */ /* verify the children */ /* inputs: children_verify_list : list (products) outputs: none global: total_size : integer children_install_list : list (products) */ { ui_product(product_label); ui_action(instantiate(analyze_children)); copy_verify_list = list(); union(copy_verify_list,children_verify_list); while(not(empty(copy_verify_list))) { next_product = first(copy_verify_list); copy_verify_list = rest(copy_verify_list); verify_size = verify(next_product); ui_product(product_label); ui_action(instantiate(analyze_children)); if (verify_size != 0) { add(children_install_list,next_product); total_size = total_size + verify_size; } } EXECUTE_SCRIPT = script_completed; script_return_value = 0; if (return_at_end) return(script_return_value); } } if (EXECUTE_SCRIPT == "END.VRF") { /* end.vrf */ /* end the vrf script */ /* inputs: outputs: gobal: returns: */ { case_graphics_file = DESIGNER01_GRAPHICS_FILE; EXECUTE_SCRIPT = "DES2_BB.REM"; if (false) execute("%product_home%\des2k_72.cmn"); if (debug_script) information_dialog("Ending %filename%..."); EXECUTE_SCRIPT = script_completed; script_return_value = 0; if (return_at_end) return(script_return_value); } } /************************************************************************** Check the completion status **************************************************************************/ if (EXECUTE_SCRIPT == script_failed) { information_dialog("%filename2% internal error: script incorrectly called. Processing will continue."); } else if (not(EXECUTE_SCRIPT == script_completed)) { information_dialog("%filename2% internal error: script incorrectly called. Entry point %EXECUTE_SCRIPT% not found"); } return(script_return_value); }