home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / po7_win / db / rdbms71 / rdbms71.ins < prev    next >
Encoding:
Text File  |  1995-03-27  |  7.6 KB  |  280 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2.  
  3. /**************************************************************************** 
  4.   NAME
  5.     rdbms71.ins - Windows V3 installation script for the Personal
  6.           Oracle7 RDBMS.
  7.  
  8.   DESCRIPTION
  9.     This script installs the Personal Oracle7 RDBMS by copying the appropriate
  10.     files and optionally creating a new database by using a "seed" database.
  11.  
  12.   OWNER
  13.     Tony Rodgers
  14.  
  15.   MODIFIED    DD-MMM-YY Reason
  16.    LMurphy     11/29/94 - modified NT RDBMS script for Personal Oracle7
  17.    syau        07/01/94 - 7.1.3
  18.     HA!        04/28/94 - 7.1.2 and 3.0.10.2
  19.    Hartenstine 04/20/93 - WIN_NT: Adapt to Windows NT
  20.     Colello    10/09/92 - DESKTOP: copy demo and doc files AND add
  21.                  DBA_AUTHORIZATION
  22.     trodgers  01-APR-92 Created.
  23. *****************************************************************************/
  24. {
  25.   /************************************************************************** 
  26.         Start main logic...                               
  27.    **************************************************************************/
  28.   if (doit)
  29.     {
  30.       ins_ratchet = "7.1.4.1.0C";
  31.  
  32.       execute("%installer_home%\windows.ins");
  33.  
  34.       install(winrsf70);
  35.       install(winrsf71);
  36.       install(win32rsf71);
  37.       install(windbhlp71);
  38.  
  39.       ui_product(product_label);             
  40.  
  41.       permit_retry_operations = TRUE;        
  42.  
  43. /*
  44.       if (registered("winrdbms70"))          
  45.       {
  46.     if (upgrade)
  47.     {
  48.       ui_action(instantiate(moving_files));       
  49.       permit_retry_operations = FALSE;
  50.  
  51.       ora_files = files("%RDBMS70%\*.ora");
  52.       while (not(empty(ora_files)))
  53.       {
  54.         ora_file = file_name(first(ora_files));
  55.         { move_file("%RDBMS70%\%ora_file%","%RDBMS71%\%ora_file%"); }
  56.         [ 'WRITE_ERROR, 'PERMISSION_DENIED, 'OS_ERROR:
  57.           signal('FAILURE, "Upgrade terminated. Can't move database and log files from %RDBMS70% to %RDBMS71% (identical filenames).");
  58.         ]
  59.         ora_files = rest(ora_files);
  60.       }
  61.       permit_retry_operations = TRUE;
  62.  
  63.     }
  64.     copy(deinstl70);
  65.       }
  66. */
  67.  
  68.       ui_action(instantiate(installing_scripts));
  69.       copy(deinstl);
  70.  
  71.       ui_action(instantiate(installing_executables));    
  72.       copy(exec);
  73.       copy(bin);
  74.       copy(doc);
  75.  
  76.       ui_action(instantiate(installing_dlls));
  77.       copy(dll, nls_abbreviation);
  78.       {
  79.       if (bundle_name == P_O7_E)
  80.     enterprise_install = TRUE;
  81.       else
  82.         enterprise_install = FALSE;
  83.       }
  84.       [ 'UNBOUND_VARIABLE: enterprise_install = FALSE; ]
  85.       if (enterprise_install)
  86.     dll_opt = "DYW";
  87.       if (not(enterprise_install))
  88.         dll_opt = "DNW";
  89.       copy(dllopt, dll_opt);
  90.  
  91. /* LMurphy - version check files going into Windows system directory */
  92.       destination = first(group_files(sys));
  93.       source = implode(list(product_home, product_location(current_product),
  94.                 file_name(destination)), "\");
  95.       pathify(source);
  96.       source_version = windows_file_version(source);
  97.       {
  98.     if ((not(exists(destination))) ||
  99.         (windows_earlier_version(destination,source_version)))
  100.         signal('FILE_NOT_FOUND);
  101.       }
  102.       [ 
  103.     'FILE_NOT_FOUND: continue();
  104.     'DEFAULT: copy_file(source, destination);
  105.       ]
  106.  
  107.       if (update_sndevnts)
  108.     copy(drv);
  109.  
  110.       ui_action(instantiate(installing_oci));
  111.       copy(oci);
  112.  
  113.  
  114.       ui_action(instantiate(installing_admin));
  115.       copy(ini);
  116.       copy(dbs);      
  117.       copy(admin);
  118.  
  119.       ui_action(instantiate(installing_msg));
  120.       copy(msg, nls_abbreviation);
  121.      
  122.       ui_action(instantiate(installing_msg));
  123.       copy(plmsg, nls_abbreviation);     
  124.  
  125.       if (set_rdbms71)
  126.       {
  127.     ui_action(instantiate(modifying_config));
  128.     modify("RDBMS71",rdbms71,ora_config, "Oracle");
  129.       }
  130.  
  131.       if (set_rdbms71_poracle)
  132.       {
  133.     ui_action(instantiate(modifying_config));
  134.     modify("RDBMS71_PORACLE",rdbms71_poracle,ora_config, "Oracle");
  135.       }
  136.  
  137.       if (set_rdbms71_control)
  138.       {
  139.     ui_action(instantiate(modifying_config));
  140.     modify("RDBMS71_CONTROL",rdbms71_control,ora_config, "Oracle");
  141.       }
  142.       if (set_rdbms71_archive)
  143.       {
  144.     ui_action(instantiate(modifying_config));
  145.     modify("RDBMS71_ARCHIVE",rdbms71_archive,ora_config, "Oracle");
  146.       }
  147.       if (set_vs10)
  148.       {
  149.     ui_action(instantiate(modifying_config));
  150.     modify("VS10",vs10,ora_config,"Oracle");
  151.       }
  152.       if (set_local)
  153.       {
  154.     ui_action(instantiate(modifying_config));
  155.     modify("LOCAL",local,ora_config,"Oracle");
  156.       }
  157.       if (set_sqlnet_dbname)
  158.       {
  159.     ui_action(instantiate(modifying_config));
  160.     modify("SQLNET DBNAME oracle7",sqlnet_dbname,ora_config,"Oracle");
  161.       }
  162.       if (set_plsql21)
  163.       {
  164.     ui_action(instantiate(modifying_config));
  165.     modify("PLSQL21",plsql21,ora_config,"Oracle");
  166.       }
  167.  
  168. /* create vs10.ini */
  169.      modify("DEFAULTSRV",defaultsrv,vs10_ini,"CONFIGURATION_DETAILS");
  170.      modify("DEFAULTCONFIG",defaultconfig,vs10_ini,"CONFIGURATION_DETAILS");
  171.      modify("HOST",host,vs10_ini,"LOGON");
  172.      modify("DFT_TBLSPACE",dft_tblspace,vs10_ini,"UMAN");
  173.      modify("TMP_TBLSPACE",tmp_tblspace,vs10_ini,"UMAN");
  174.  
  175.      if (set_password)
  176.      {
  177.     ui_action(instantiate(setting_password));
  178.     permit_retry_operations = FALSE;
  179.  
  180. /* Start Password Manager */
  181.     {
  182.         spawn("%ORACLE_HOME%\bin\vsdpw.exe PASSWORD=%dba_password%", 'MINIMIZE);
  183.     }
  184.     [ 'NO_RESPONSE: continue();
  185.       'INVALID_FILE_NAME, 'OS_ERROR: information_dialog(pwm_err);
  186.     ]
  187.       }
  188.  
  189.  
  190.  
  191.       if (install_seed_database)
  192.       {
  193.     ui_action(instantiate(installing_seed));
  194.     copy(plseed);
  195.  
  196.     /* Set password bypass when starting database */
  197.     modify("DBA_AUTHORIZATION","bypass",ora_config,"Oracle");
  198.     
  199.     /* Startup Database by running a script on SQL*DBA */    
  200.     ui_action(instantiate(starting_up));
  201.     sqldba_run = TRUE;
  202.  
  203.     {
  204.     spawn("%ORACLE_HOME%\bin\sqldba16.exe COMMAND=@%ORACLE_HOME%\DBS\install2.sql", 'MINIMIZE);
  205.     }
  206.     [ 'NO_RESPONSE: continue();
  207.       'INVALID_FILE_NAME, 'OS_ERROR: 
  208.       {
  209.         sqldba_run = FALSE;
  210.         information_dialog(sqldba_err);
  211.       }
  212.     ]
  213. /* Check for errors in build.log */    
  214.     err_seen = FALSE;
  215.     {
  216.     ora_err = translate("ORA", "%RDBMS71%\TRACE\build.log", "-");
  217.     err_seen=TRUE;
  218.     information_dialog(sqldba_fail);    
  219.     }
  220.     [
  221.      'UNBOUND_ENVIRONMENT_VARIABLE: continue();
  222.      'OS_ERROR, 'READ_ERROR, 'INVALID_FILE_NAME, 'DEFAULT:
  223.      {
  224.         err_seen=TRUE;
  225.         information_dialog(no_build_log);
  226.      }
  227.     ]
  228.     {
  229.     if (not(err_seen))
  230.     {
  231.         dba_err = translate("DBA", "%RDBMS71%\TRACE\build.log", "-");
  232.         err_seen=TRUE;
  233.         information_dialog(sqldba_fail);    
  234.     }
  235.     }
  236.     [
  237.      'UNBOUND_ENVIRONMENT_VARIABLE: continue();
  238.      'OS_ERROR, 'READ_ERROR, 'INVALID_FILE_NAME:
  239.      {
  240.         err_seen=TRUE;
  241.         information_dialog(no_build_log);
  242.      }
  243.     ]
  244.     {
  245.     if (not(err_seen))
  246.     {
  247.         inst_err = translate("INST", "%RDBMS71%\TRACE\build.log", "-");
  248.         err_seen=TRUE;
  249.         information_dialog(sqldba_fail);    
  250.     }
  251.     }
  252.     [
  253.      'UNBOUND_ENVIRONMENT_VARIABLE: continue();
  254.      'OS_ERROR, 'READ_ERROR, 'INVALID_FILE_NAME:
  255.         information_dialog(no_build_log);
  256.     ]
  257.     if (sqldba_run)
  258.     {
  259.         p7inst_var = "killicon";
  260.         ora_shutdown = execute("%curr_dir%\p7inst.vrf");
  261.     }
  262.     modify("DBA_AUTHORIZATION","",ora_config,"Oracle");
  263.         permit_retry_operations = TRUE;    
  264.       }
  265.       
  266.       ui_action(instantiate(registering));
  267.     register(current_product, comment);
  268.       if (member(selected_products,current_product))
  269.     reference(current_product);
  270.  
  271.       reference(winrsf70, current_product);
  272.       reference(winrsf71, current_product);
  273.       reference(win32rsf71, current_product);
  274.       { reference(windbhlp71, current_product); }
  275.       [ 'UNREGISTERED_PRODUCT: continue(); ]
  276.  
  277.       permit_retry_operations = FALSE;
  278.     }
  279. }
  280.