home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / po7_win / install / user.stp < prev    next >
Text File  |  1995-03-06  |  18KB  |  354 lines

  1. /* Copyright (c) Oracle Corporation 1994.  All Rights Reserved */
  2.  
  3. /************************************************************************
  4.   NAME
  5.     user.stp - user-defined .stp script for Personal Oracle7
  6.  
  7.   DESCRIPTION
  8.     This script allows users access to their own customizable .stp script.
  9.     It can be used to bypass the installer window and perform a predefined
  10.     installation (e.g. complete, typical, minimal, or custom)
  11.     It initializes boolean 'web_install', string 'install_type', and
  12.     string 'bundle_name' (Personal Oracle7,Personal Oracle7 Entreprise,
  13.     Workgroup Oracle7 Nt, Workgroup Oracle7 Netware, Entreprise Oracle7 Nt,
  14.     and Entreprise Oracle7 Netware).
  15.  
  16.   MODIFIED    MM/DD/YY  Reason
  17.     LMurphy   02/21/95  Added License Agreement check
  18.     zzerhoun  01/06/95  Remove Chained Install Type handling
  19.     zzerhoun  01/04/95  Set Bundle_name back
  20.     awinarsk  01/03/95  Altered default bundle name for testing purposes.
  21.     zzerhoun  12/23/94  Updated New bundle names
  22.     zzerhoun  12/19/94  Incorporate clients for all bundles
  23.     zzerhoun  12/12/94  Created.
  24. **************************************************************************/
  25.  
  26. {
  27. /*************************************************************************/
  28. /*  Generic Section: Across Bundles                                      */
  29. /*  Initialize name variables for each product bundle                    */
  30. /*************************************************************************/
  31.  
  32.   P_O7 = "Personal Oracle7 for Windows";
  33.   P_O7_E = "Personal Oracle7 for Windows Enterprise Edition";
  34.   W_O7_W_NT = "Oracle7 Workgroup for Windows NT";
  35.   W_O7_NW = "Oracle7 Workgroup for Netware";
  36.   E_O7_W_NT = "Oracle7 Enterprise for Windows NT";
  37.   E_O7_NW = "Oracle7 Enterprise for Netware";
  38.  
  39.  
  40.  
  41. /*************************************************************************/
  42. /*  Specific Section                                                     */
  43. /*  Specify if web installation or not: default FALSE                    */
  44. /*  Specify what product bundle is being shipped: default ""             */
  45. /*  Initialize name variables for each product in the bundle             */
  46. /*************************************************************************/
  47.  
  48.   /* Installation to the web; by default, assume FALSE */
  49.   web_install = TRUE;
  50.  
  51.   bundle_name = P_O7;
  52.  
  53.   rdbms = "Oracle7 Database";
  54.   dbtools = "Database Administration Tools";
  55.   sqlplus = "SQL*Plus";
  56.   odbc = "Oracle7 ODBC Driver";
  57.   objects = "Oracle Objects for OLE";
  58.   sqlnet = "SQL*Net Protocol";
  59.   docserver = "Oracle7 Server Doc.";
  60.   docsqlnet = "SQL*Net Protocol Doc.";
  61.   
  62. /*************************************************************************/
  63. /* Display license agreement in case of web install                      */
  64. /*************************************************************************/
  65.  
  66. license_not_agreed = instantiate(nls("license_not_agreed", "Oracle 90-day Products License Agreement not accepted.  Installation terminated."));
  67.  
  68.   { web_install = web_install; }
  69.   [ 'UNBOUND_VARIABLE: web_install = FALSE; ]
  70.  
  71.   { 
  72.     if (web_install)
  73.     display_file_dialog("license.txt");
  74.   }
  75.   [ 'CANCEL: signal('FAILURE, license_not_agreed); ]
  76.  
  77.  
  78.  
  79. /*************************************************************************/
  80. /*  Generic Section: Across Platforms                                    */
  81. /*  Initialize nls strings for all (6) possible install types            */
  82. /*  Initialize nls strings for install_type help messages                */
  83. /*                                                                       */
  84. /*  Initialize nls strings for protocol types                            */
  85. /*  Initialize nls strings for protocol_type help messages               */
  86. /*************************************************************************/
  87.   ui_action(nls("install_type_action","Checking Type of Installation..."));
  88.  
  89.   /* Define install_type NLS scripts */
  90.   /* Install Type Strings */
  91.   install_type_prompt = instantiate(nls("install_type_prompt",
  92.                             "Please choose the type of %%bundle_name%% installation you would like to perform:"));
  93.  
  94.   install_type_complete = nls("install_type_complete","Complete Install");
  95.   install_type_typical = nls("install_type_Typical","Typical Install");
  96.   install_type_minimal = nls("install_type_minimal","Minimal Install");
  97.   install_type_develop = nls("install_type_develop","Developer Install");
  98.   install_type_dba = nls("install_type_dba","Database Administrator Install");
  99.   install_type_custom = nls("install_type_custom","Custom Install");
  100.   install_type_chained = nls("install_type_chained","Chained Install");
  101.  
  102.   install_type_content = nls("install_type_content",
  103.                              "Installation Options");
  104.  
  105.   install_type_helpa = instantiate(nls("install_type_helpa",
  106.                            "'%%install_type_complete%%' installs%carriage_return%%%install_type_lista%%"));
  107.   install_type_helpt = instantiate(nls("install_type_helpt",
  108.                            "'%%install_type_typical%%' installs%carriage_return%%%install_type_listt%%"));
  109.   install_type_helpm = instantiate(nls("install_type_helpm",
  110.                            "'%%install_type_minimal%%' installs%carriage_return%%%install_type_listm%%"));
  111.   install_type_helpd = instantiate(nls("install_type_helpd",
  112.                            "'%%install_type_develop%%' installs%carriage_return%%%install_type_listd%%"));
  113.   install_type_helpb = instantiate(nls("install_type_helpb",
  114.                            "'%%install_type_dba%%' installs%carriage_return%%%install_type_listb%%"));
  115.   install_type_helpc = instantiate(nls("install_type_helpc",
  116.                            "'%%install_type_custom%%' allows you to choose which products to install, or de-install"));
  117.  
  118.   /* Protocol Type Strings */
  119.   protocol_type_prompt = nls("protocol_type_prompt",
  120.                              "Please choose the default Oracle network protocol you would like to install:");
  121.  
  122.   protocol_type_tcp = nls("protocol_type_tcp","TCP/IP");
  123.   protocol_type_nmp = nls("protocol_type_nmp","Named Pipes");
  124.   protocol_type_spx = nls("protocol_type_spx","SPX");
  125.  
  126.   protocol_type_content = nls("protocol_type_content",
  127.                               "Network Protocol Options");
  128.  
  129.   protocol_type_helpt = instantiate(nls("protocol_type_helpt",
  130.                             "'%%protocol_type_tcp%%' installs SQL*Net %%protocol_type_tcp%%"));
  131.   protocol_type_helpx = instantiate(nls("protocol_type_helpx",
  132.                             "'%%protocol_type_spx%%' installs SQL*Net %%protocol_type_spx%%"));
  133.   protocol_type_helpp = instantiate(nls("protocol_type_helpp",
  134.                             "'%%protocol_type_nmp%%' installs SQL*Net %%protocol_type_nmp%%"));
  135.  
  136.  
  137. /*************************************************************************/
  138. /*  Specific Section                                                     */
  139. /*  Specify install types to offer user                                  */
  140. /*  Specify corresponding,overall  help message                          */
  141. /*************************************************************************/
  142.  
  143.   if (bundle_name == P_O7)
  144.   {
  145.     install_type_choices = list(install_type_complete,
  146.                                 install_type_minimal,
  147.                                 install_type_custom);
  148.     install_type_default = install_type_complete;
  149.  
  150.     install_type_lista = implode(list("    %rdbms%",
  151.                                       "    %dbtools%",
  152.                                       "    %odbc%",
  153.                                       "    %objects%",
  154.                                       "    %sqlplus%"),
  155.                                  carriage_return);
  156.     install_type_listm = implode(list("    %rdbms%",
  157.                                       "    %dbtools%"),
  158.                                  carriage_return);
  159.      install_type_help = instantiate(instantiate(nls("install_type_help","Select the type of installation you would like to perform:%carriage_return%%%install_type_helpa%%%carriage_return%%%install_type_helpm%%%carriage_return%%%install_type_helpc%%.")));
  160.   }
  161.   else if (bundle_name == P_O7_E)
  162.   {
  163.     install_type_choices = list(install_type_typical,
  164.                                 install_type_minimal,
  165.                                 install_type_custom);
  166.     install_type_default = install_type_typical;
  167.  
  168.     install_type_listt = implode(list("    %rdbms%",
  169.                                       "    %dbtools%",
  170.                                       "    %odbc%",
  171.                                       "    %objects%",
  172.                                       "    %sqlplus%",
  173.                                       "    %sqlnet%"),
  174.                                  carriage_return);
  175.     install_type_listm = implode(list("    %rdbms%",
  176.                                       "    %dbtools%",
  177.                                       "    %sqlnet%"),
  178.                                  carriage_return);
  179.     install_type_help = instantiate(instantiate(nls("install_type_help","Select the type of installation you would like to perform:%carriage_return%%%install_type_helpt%%%carriage_return%%%install_type_helpm%%%carriage_return%%%install_type_helpc%%.")));
  180.  }
  181.   else if (member(list(W_O7_W_NT,W_O7_NW,E_O7_W_NT,E_O7_NW),bundle_name))
  182.  
  183.   /*   "Workgroup Oracle7 Windows NT"   */
  184.   /*   "Workgroup Oracle7 Netware"      */
  185.   /*   "Enterprise Oracle7 Windows NT"  */
  186.   /*   "Enterprise Oracle7 Netware"     */
  187.   {
  188.     install_type_choices = list(install_type_typical,
  189.                                 install_type_develop,
  190.                                 install_type_dba,
  191.                                 install_type_custom);
  192.     install_type_default = install_type_typical;
  193.  
  194.     install_type_listt = implode(list("    %dbtools%",
  195.                                       "    %odbc%",
  196.                                       "    %objects%",
  197.                                       "    %sqlplus%",
  198.                                       "    %sqlnet%",
  199.                                       "    %docserver%"),
  200.                                  carriage_return);
  201.     install_type_listd = implode(list("    %odbc%",
  202.                                       "    %objects%",
  203.                                       "    %sqlplus%",
  204.                                       "    %sqlnet%",
  205.                                       "    %docserver%"),
  206.                                  carriage_return);
  207.     install_type_listb = implode(list("    %dbtools%",
  208.                                       "    %sqlplus%",
  209.                                       "    %sqlnet%",
  210.                                       "    %docserver%"),
  211.                                  carriage_return);
  212.     install_type_help = instantiate(instantiate(nls("install_type_help","Select the type of installation you would like to perform:%carriage_return%%%install_type_helpt%%%carriage_return%%%install_type_helpd%%%carriage_return%%%install_type_helpb%%%carriage_return%%%install_type_helpc%%.")));
  213.   }
  214.  
  215. /*************************************************************************/
  216. /*  Generic Section: Across Platforms                                    */
  217. /*  Get user selection of install type                                   */
  218. /*  Skip user selection if chained installation                          */
  219. /*************************************************************************/
  220.  
  221.   {
  222.     if (install_type != install_type_chained)  
  223.       signal('UNBOUND_VARIABLE);
  224.   }
  225.   ['UNBOUND_VARIABLE: 
  226.     {
  227.       install_type = single_selection_dialog(install_type_prompt,
  228.                                              install_type_choices,
  229.                                              install_type_default,
  230.                                              install_type_content,
  231.                                              install_type_help);
  232.       continue();
  233.     }
  234.   ]
  235.  
  236.  
  237.   if (install_type != install_type_custom)
  238.   {
  239.     bootstrap = TRUE;
  240.  
  241. /*************************************************************************/
  242. /*  Specific Section                                                     */
  243. /*  Interpret user selection on install type                             */
  244. /*  If custom install, always terminate (bring up installer window)      */
  245. /*  Otherwise always set bootstrap to TRUE                               */
  246. /*  Specify 'selected_products' based on 'bundle_name' & 'install_type'  */
  247. /*************************************************************************/
  248.  
  249.     if (bundle_name == P_O7)
  250.     {
  251.       if (install_type == install_type_complete)
  252.         selected_products = list("winrdbms71","windbtool71","winplus31","winsodbc11","winobject10");
  253.       else if (install_type == install_type_minimal)
  254.         selected_products = list("winrdbms71","windbtool71"); 
  255.     }
  256.     else if (bundle_name == P_O7_E)
  257.     {
  258.       if (install_type == install_type_typical)
  259.         selected_products = list("winrdbms71","windbtool71","winplus31","winsodbc11","winobject10");
  260.       else if (install_type == install_type_minimal)
  261.         selected_products = list("winrdbms71","windbtool71");
  262.     }
  263.     else if (member(list(W_O7_W_NT,W_O7_NW,E_O7_W_NT,E_O7_NW),bundle_name))
  264.     /*   "Workgroup Oracle7 Windows NT"   */
  265.     /*   "Workgroup Oracle7 Netware"      */
  266.     /*   "Enterprise Oracle7 Windows NT"  */
  267.     /*   "Enterprise Oracle7 Netware"     */
  268.     {
  269.       if (member(list(W_O7_W_NT,E_O7_W_NT),bundle_name))
  270.         v1_doc = "ntnettoc11";
  271.       else
  272.         v1_doc = "nwnettoc11";
  273.  
  274.       if (install_type == install_type_chained)
  275.         selected_products = list("windbtool71","winplus31","winsodbc11","winobject10");
  276.       else if (install_type == install_type_typical)
  277.         selected_products = list("windbtool71","winplus31","winsodbc11","winobject10");
  278.       else if (install_type == install_type_develop)
  279.         selected_products = list("winplus31","winsodbc11","winobject10","windbhlp71",v1_doc);
  280.       else if (install_type == install_type_dba)
  281.         selected_products = list("windbtool71","winplus31",v1_doc);
  282.     }
  283.  
  284. /*************************************************************************/
  285. /*  Generic Section: Across Platforms                                    */
  286. /*  Get user selection of protocol type                                  */
  287. /*  Skip user selection if chained installation                          */
  288. /*************************************************************************/
  289.  
  290.     if (bundle_name == P_O7)
  291.       protocol_type = "";
  292.     else
  293.     {
  294.       ui_action(nls("protocol_type_action","Checking Network Protocol..."));
  295.       protocol_list = explode(protocols,",");
  296.       while(not(empty(protocol_list)))
  297.       {
  298.         protocol_type = first(protocol_list);
  299.         if (protocol_type == protocol_type_tcp)
  300.           add(selected_products,"wintcp11");
  301.         else if (protocol_type == protocol_type_spx)
  302.           add(selected_products,"winspx11");
  303.         else if (protocol_type == protocol_type_nmp)
  304.           add(selected_products,"winnmp11");
  305.         else
  306.           signal('unknown_protocol,"%protocol_type% is not a valid protocol name");
  307.  
  308.         protocol_list = rest(protocol_list);
  309.       }
  310.  
  311.       protocol_type = "";
  312.     }
  313.     ['UNBOUND_VARIABLE: 
  314.       {
  315.         if (bundle_name == P_O7_E)
  316.         {
  317.           protocol_type_choices = list(protocol_type_tcp,
  318.                                        protocol_type_spx,
  319.                                        protocol_type_nmp);
  320.           protocol_type_help = instantiate(nls("protocol_type_help","Select the default network protocol you would like to use for %%bundle_name%%:%carriage_return%%%protocol_type_helpt%%%carriage_return%%%protocol_type_helpx%%%carriage_return%%%protocol_type_helpp%%."));
  321.         }
  322.         else if (member(list(W_O7_W_NT,E_O7_W_NT),bundle_name))  /* WINDOWS NT */
  323.         {
  324.           protocol_type_choices = list(protocol_type_nmp,
  325.                                        protocol_type_tcp);
  326.           protocol_type_help = instantiate(nls("protocol_type_help","Select the default network protocol you would like to use for %%bundle_name%%:%carriage_return%%%protocol_type_helpt%%%carriage_return%%%protocol_type_helpp%%."));
  327.         }
  328.         else if (member(list(W_O7_NW,E_O7_NW),bundle_name)) /* NETWARE */
  329.         {
  330.           protocol_type_choices = list(protocol_type_spx,
  331.                                        protocol_type_tcp);
  332.           protocol_type_help = instantiate(nls("protocol_type_help","Select the default network protocol you would like to use for %%bundle_name%%:%carriage_return%%%protocol_type_helpt%%%carriage_return%%%protocol_type_helpx%%."));
  333.         }
  334.  
  335.         protocol_type = single_selection_dialog(
  336.                                          protocol_type_prompt,
  337.                                          protocol_type_choices,
  338.                                          protocol_type_content,
  339.                                          protocol_type_help);
  340.       }
  341.     ]
  342.  
  343.     if (protocol_type == protocol_type_tcp)
  344.       add(selected_products,"wintcp11");
  345.     else if (protocol_type == protocol_type_spx)
  346.       add(selected_products,"winspx11");      
  347.     else if (protocol_type == protocol_type_nmp)
  348.       add(selected_products,"winnmp11");      
  349.  
  350.     add(selected_products,"wininstall"); 
  351.   }
  352. }
  353.  
  354.