home *** CD-ROM | disk | FTP | other *** search
/ Oracle Video Server 3.0.3.1 / OVS_3031_NT.iso / win32 / sqlnet / net23 / client / netc23.ins < prev    next >
Encoding:
Text File  |  1997-10-23  |  7.8 KB  |  225 lines

  1. /* Copyright (c) Oracle Corporation 1992, 1996.  All Rights Reserved */
  2. /***************************************************************************
  3.   NAME
  4.     netc23.ins
  5.  
  6.   DESCRIPTION
  7.     This script performs the installation tasks for the Win32 SQL*Net
  8.     product.
  9.  
  10.   OWNER
  11.     Etna Flores
  12.  
  13.   MODIFIED   DD-MMM-YY  Reason
  14.     mhclau   22-SEP-97  Copy NLS resource.
  15.    dstiefel  22-Feb-96  Merge NT/95
  16.    ljiang        9/95       Modified for Easy Configuration
  17.    dlau      07-AUG-95  Modified for SQLNET 2.2
  18.  **************************************************************************/
  19. {
  20.   if (doit)
  21.   {
  22.     ins_ratchet = "2.3.4.0.0";
  23.  
  24.     execute("%installer_home%\%operating_system%.ins");
  25.  
  26.  
  27. /*--------------------------------------------------------------------------------------------------*/
  28.  
  29.    ################################
  30.    #                              #
  31.    # Install Product Dependencies #
  32.    #                              #
  33.    ################################
  34.  
  35.  
  36.  
  37.    /* Force install RSF and Trace Server */
  38.    install(w32rsf73);
  39.    install(w32traceSvr);
  40.  
  41.  
  42.    /* Force install the Installer.  (Doit will be false if this is not possible) */
  43.    if (not(registered("%prefix%install")))
  44.       install(install_prod);
  45.    else if (earlier_version(registration("%prefix%install"),product_version(instver_prod)))
  46.       install(install_prod);
  47.  
  48.  
  49.    /* Force install the appropriate adapters  LU6.2 and DECNet will only be installable through custom */
  50.    if(install_tcp)
  51.       install(tcp_prod);
  52.    if(install_spx)
  53.       install(spx_prod);
  54.    if(install_nmp)          /* For this release, this will always happen */
  55.       install(nmp_prod);
  56.  
  57.  
  58. /*--------------------------------------------------------------------------------------------------*/
  59.  
  60.    ###############################################
  61.    #                                             #
  62.    # Copy and Configure files for SQL*Net Client #
  63.    #                                             #
  64.    ###############################################
  65.  
  66.  
  67.       ui_product(product_label);
  68.  
  69.       ui_action(instantiate(net2_install_tns));
  70.  
  71.  
  72.       /* sqlnet_in_use is a boolean which it true until the copy(tns) command is succesful. */
  73.       /* This is how we allow the user to stop services and/or applications using sqlnet and continue installing */
  74.       sqlnet_in_use = TRUE;
  75.       while(sqlnet_in_use)
  76.       {
  77.          write_error_occured = FALSE;
  78.          { copy(tns); }
  79.          [  'WRITE_ERROR:
  80.             {
  81.                /* If in silent mode signal an error to avoid an infinite loop. */
  82.                if(silent_mode)
  83.                   signal('CANCEL, app_prompt);
  84.  
  85.                information_dialog(instantiate(app_prompt), app_content, app_help);
  86.                write_error_occured = TRUE;
  87.                continue();
  88.             }
  89.          ]
  90.          if(not(write_error_occured))
  91.          {
  92.             sqlnet_in_use = FALSE;
  93.          }
  94.       }
  95.  
  96.       /* sqlnet_in_use is a boolean which it true until the copy(bequeth) command is succesful. */
  97.       /* This is how we allow the user to stop services and/or applications using sqlnet and continue installing */
  98.       sqlnet_in_use = TRUE;
  99.       while(sqlnet_in_use)
  100.       {
  101.          write_error_occured = FALSE;
  102.          { copy(bequeth, prefix); }
  103.          [  'WRITE_ERROR:
  104.             {
  105.                /* If in silent mode signal an error to avoid an infinite loop. */
  106.                if(silent_mode)
  107.                   signal('CANCEL, app_prompt);
  108.  
  109.                information_dialog(instantiate(app_prompt), app_content, app_help);
  110.                write_error_occured = TRUE;
  111.                continue();
  112.             }
  113.          ]
  114.          if(not(write_error_occured))
  115.          {
  116.             sqlnet_in_use = FALSE;
  117.          }
  118.       }
  119.  
  120.  
  121.  
  122.     ui_action(instantiate(net2_install_script));
  123.     copy(deinstl, nls_abbreviation);
  124.  
  125.     ui_action(instantiate(net2_install_message));
  126.     copy(msb, nls_abbreviation);
  127.  
  128.     ui_action(instantiate(net2_install_sample));
  129.     copy(sample);
  130.  
  131.     /* create default sqlnet.ora if none exists */
  132.     sqlnet_ora = "%oracle_home%\NETWORK\ADMIN\SQLNET.ORA";
  133.     sqlnet_ora_sample = "%oracle_home%\NETWORK\ADMIN\SAMPLE\SQLNET.ORA";
  134.     if (not(exists(sqlnet_ora)))
  135.     {
  136.          copy_file(sqlnet_ora_sample, sqlnet_ora);
  137.     }
  138.     ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'FILE_NOT_FOUND, 'OS_ERROR: continue(); ]
  139.  
  140.  
  141. /*--------------------------------------------------------------------------------------------------*/
  142.  
  143.    ##############################
  144.    #                            #
  145.    # Copy files for Easy Config #
  146.    #                            #
  147.    ##############################
  148.  
  149.     ui_action(instantiate(net2_install_easycfg));
  150.     copy(cfg23);
  151.     copy(cfgico);  /* This group only contains the Easy Config Icon; it is not copied for OCSM installs */
  152.  
  153.    if (platform() == "win95")
  154.    {
  155.       {
  156.          move_file("%ORACLE_HOME%\NETWORK\CFG\NT.PRD","%ORACLE_HOME%\NETWORK\CFG\WIN95.PRD");
  157.       }
  158.       ['DEFAULT: continue(); ]
  159.  
  160.       /* set NET20 here in the registry */
  161.  
  162.       modify("NET20","%oracle_home%\NETWORK", ora_config, (product_filename(current_product)));
  163.    } /* Win 95 */
  164.  
  165.  
  166. /*--------------------------------------------------------------------------------------------------*/
  167.  
  168.    /* Register Product and Dependencies */
  169.  
  170.    ui_action(instantiate(net2_register));
  171.    register(current_product);
  172.    if(member(selected_products,current_product))
  173.       reference(current_product);
  174.  
  175.    reference(w32rsf73, current_product);
  176.    reference(w32traceSvr, current_product);
  177.    if(install_tcp)
  178.       reference(tcp_prod, current_product);
  179.    if(install_spx)
  180.       reference(spx_prod, current_product);
  181.    if(install_nmp)
  182.       reference(nmp_prod, current_product);
  183.  
  184.         /* OCSM Compliance */
  185.         { Win32_register_OCSM_product(); }
  186.         [ 'default: win32_ocsm_register_product(); ]
  187.  
  188.         /* Register the groups in the map file and specify which should get
  189.            copied over under the three OCSM installation modes. */
  190.         win32_register_ocsm_group(deinstl,   nls_abbreviation,  'MAXMODE);
  191.         win32_register_ocsm_group(tns,                          'MAXMODE);
  192.         win32_register_ocsm_group(cfg23,                        'MAXMODE);
  193.         win32_register_ocsm_group(sample,                       'MAXMODE);
  194.         win32_register_ocsm_group(msb,       nls_abbreviation,  'MAXMODE);
  195.  
  196.         win32_register_ocsm_group(deinstl,   nls_abbreviation,  'MEDMODE);
  197.         win32_register_ocsm_group(tns,                          'MEDMODE);
  198.         win32_register_ocsm_group(cfg23,                        'MEDMODE);
  199.         win32_register_ocsm_group(sample,                       'MEDMODE);
  200.         win32_register_ocsm_group(msb,       nls_abbreviation,  'MEDMODE);
  201.  
  202.         win32_register_ocsm_group(deinstl,   nls_abbreviation,  'MINMODE);
  203.         win32_register_ocsm_group(tns,                          'MINMODE);
  204.         win32_register_ocsm_group(cfg23,                        'MINMODE);
  205.         win32_register_ocsm_group(sample,                       'MINMODE);
  206.         win32_register_ocsm_group(msb,       nls_abbreviation,  'MINMODE);
  207.  
  208.         /* Register variables in the map file that are not Installer variables. */
  209.         win32_register_map_variable("oracle_group_name");
  210.  
  211.         /* Register product variables or keys created in the Windows registry by   */
  212.         /* this INS script.  Associated with calls to: modify(...) in this script. */
  213.  
  214.         /* Define the key and subkey. */
  215.         okey    = "HKEY_LOCAL_MACHINE";
  216.         osubkey = "SOFTWARE\ORACLE";
  217.  
  218.         /* Only in Win95 as in the modify(...) call above. */
  219.         if(platform() == "win95")
  220.                 win32_register_key(okey, osubkey, "NET20",   'REPLICATE);
  221.  
  222.         /* End OCSM Compliance */
  223.   }
  224. }
  225.