#
# $Header: ocommon.ins.pp 7.31 95/04/03 11:22:57 wyim Osd<unix> $ Copyr (c) 1992 Oracle
#

/* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */

/***************************************************************************
NAME
    ocommon.ins.pp

FUNCTION
    Performs the following for the product Ocommon.:
    - Load the product files into ORACLE_HOME.
    - Relink product executables (if applicable).
    - Create product DB objects.

NOTES
    References the following variables in the product name space:

        do_load
                TRUE if product files are to be copied or moved from stage
                home to Oracle home.  FALSE otherwise.
        do_relink
                TRUE if the product executables are to be relinked.
                FALSE otherwise.
        do_db_actions
                TRUE if the product's database objects are to be created
                in the database (For RDBMS, it also means creating
                the database).  FALSE means no database actions.

CREATED
    PKu         07/20/92

MODIFIED 
    ERuben      05/15/93  Add Transferring of util group if this is 
                          For_Development, which is set in unix.zoo.pp.

***************************************************************************/
{mark{
/* Define USE_ULIMIT for ports which have file size restrictions imposed  */
/* by ulimit.  These are usually System V ports. */
/* Define NO_DEVSYS for ports which don't require Software Development System */
/* for installing Oracle */
/* Define OFF_SERVER_ONLY for Office Server only systems. */
/* Define GEN_AS to generate assembly code instead of c code in gen scripts */
/*  The SYSTEM_CHECK macro causes install/system.check, the pre-installation */
/*  configuration test, to be included in INSTALL.DIST.  The intent is that */
/*  this macro will be defined for all platforms (eventually). */
/*  The INCLUDE_CORE macro causes install/CORE.DIST to be included in  */
/*  install/INSTALL.DIST.  CORE.DIST contains a list of files which are  */
/*  required by all products.  They are especially important in the case */
/*  of sites which do not have an RDBMS license but link and use network */
/*  user tools (like SQL*Forms) from a "client" platform.  At some point */
/*  base development will "define" a CORE product and it can replace this */
/*  psydo-product.  */
/*  In 6.0.27.6, USE_BIGORALIB and USE_LIBKNL have been obsoleted.   */
/*  Both libora.a and libknl.a are now used for all ports.  This is  */
/*  done to clean up the suffix makefiles and to separate user and   */
/*  kernel libraries. */
/*  USE_BIGFRMLIB causes the the big forms library libforms.a to be made, */
/*  which is composed of libtm.a, libomm.a and libram.a */
/* Define USE_ROFIX if you want to rofix certain modules for your port.  */
/* Modules to be rofixed are designated in the make suffix files in the  */
/* source directories.  Rofixing (read-only fix) a module means compiling */
/* it in such a way as to move all data in the module from data space into */
/* text space.  Modules to be rofixed should be chosen with care since */
/* rofixing read/write data causes segmentation violations at run time. */
/*  Define LIBMEM if the make command on your port understands library    */
/*  dependency on object files, i.e. the rule: lib.a(obj1.o obj2.o).      */
/*  Define LIBSEP as well if each object file has to be listed separately,*/
/*  i.e. the rule: lib.a(obj1.o) lib.a(obj2.o).  For LIBSEP to be         */
/*  effective, LIBMEM has to be defined first.                            */
/* Define USE_RANLIB if "ranlib" is required after re-archiving the   */
/* library.  This affects the makefiles we ship out to the customers, */
/* not the makefiles in the development system.                       */
/* If you are using GNU make. */
/* Pro*Cobol Macros : Define the appropriate BUILD_* macros for your port. */
/* The code for the macro included below may require some port specific    */
/* modification.                                                           */
/* IDC */
/*
 * $Header: macros.ins.pp 3090000.1 95/09/05 15:17:16 wyim Generic<base> $ Copyr (c) 1992 Oracle
 */


/*
 * $Header: misc.ins.pp 3090000.1 95/09/05 15:17:24 wyim Generic<base> $ Copyr (c) 1992 Oracle
 */








problem_error_info=nls( "problem_error_info","A problem occured trying to process the last error." );
problem_error_info_help=nls( "problem_error_info_help","?html problem_error_info_help" );
problem_error_info_content=nls( "problem_error_info_content","Error Processing Problem" );

problem_dlg_help=nls( "problem_dlg_help","?html problem_dlg_help" );

problem_header_dflt=nls( "problem_header_dflt", "
Platform:	%%operating_system%%
Release:	%%rel_version%%
Product: 	%%pname%%
Version:	%%current_version%%

Area:		(Installation)	

Install information:

	Installer Version:  %%installer_version%%
	Installer Script:   %%_line%% 
	Install Action:     %%Inst_Action%%

	Stage Home	    %%Stage_Home%%
	Oracle_Base	    %%Oracle_Base%%	(%%OFA_Compliant%%)
	Oracle Home	    %%Oracle_Home%%
	Owner		    %%Owner%%
	Log		    %%Install_Log%%

	During installation of the above product the error below is
	encountered:
");




Sys_Macro_Holdfile="%%Oracle_Home%%/orainst/holdfile.log";
Sys_Macro_Help=nls("Sys_Macro_Help", "?html Sys_Macro_Help" );
Sys_Macro_Content=nls( "Sys_Macro_Content", "O/S Error" );
Sys_Macro_Prompt=nls("Sys_Macro_Prompt", "
Error during action '%%_com%%'.

Command:  %%_cmd%%

");
Sys_Macro_Cancel_Prompt=nls("Sys_Macro_Cancel_Prompt", "Installation terminated at user request." );













	No_Make=false;
     
	{ /*_LOG_MSG ( "Entering ocommon.ins" , "" ) */ 
	  _msg = "Entering ocommon.ins" ; 
	  _logfile = "" ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}

/*
 * $Header: pinit.ins.pp 3090000.1 95/09/05 15:17:25 wyim Generic<base> $ Copyr (c) 1992 Oracle
 */
/***************************************************************************
NAME
    pinit.ins

FUNCTION
    Contains common initialization code for *.ins scripts.

NOTES

CREATED
    PKu		07/26/92

MODIFIED 
***************************************************************************/
   { /* pinit.ins */
/*
 * $Header: macros.ins.pp 3090000.1 95/09/05 15:17:16 wyim Generic<base> $ Copyr (c) 1992 Oracle
 */

    ui_product(product_label);
    ui_action("");

    if (Install_Doc_Only) {
      install_cd_doc=true;
       
	{ /*_INST_CD_DOC*/ 
	   if ( OraDoc ) { 
	     _pname = product_name ( product ) ; 
	     _pversion = product_version ( product ) ; 
	     if ( install_cd_doc ) 
	       _dummy = "%_pname% %_pversion%" ; 
	     else 
	       _dummy = "" ; 
	     modify ( "%_pname%_%_pversion%" , _dummy , CD_Doc_Inst_File , "=" ) ; 
	   } 
	}
	    }
	  } /*end of pinit.ins*/
	/*  
	 * Initialize commands
	 */
	OH_lib="%Oracle_Home%/lib";
	ntcontab_make="%MAKE% -f %OH%/network/lib/ins_network.mk ntcontab.o";
	genpsolib="%MAKE% -f ins_rdbms.mk %OH%/rdbms/lib/psoliblist";
	/* 
	 * Initialize messages
	 */
	relinking_error =nls("relinking_error", "Relinking Error.  The executables for %product_label% was not made successfully.  Please check the log file, and repeat the installation procedure for %product_label%.");

    /*
     * Loading files....
     */
    if (do_load) 
    {
	 
	{ /*_BEGIN_SW_INST*/ 
	  _ploc = product_location ( product ) ; 
	  _pfname = product_file_name ( product ) ; 
	  _pSW = "%Stage_Home%/%_ploc%/%_pfname%.SW" ; 
	  if ( not ( Keep_Stage ) && ( exists ( _pSW ) ) ) remove_file ( _pSW ) ; 
	  _bsi_prdname = "%Oracle_Home%/%_ploc%/partial.prdO" ; 
	  if ( not ( Patch_Install ) ) 
	      if ( exists ( _bsi_prdname ) ) remove_file ( _bsi_prdname ) ; 
	}
		/* Remove generated group if doing an upgrade */
		if (do_upgrade)
		{
			ui_action(instantiate(Rm_Gen));
			remove(gen);
		}

		remove_file("%Oracle_Home%/lib/libknlopt.a");
		remove_file("%Oracle_Home%/lib/libstublm.a");

		copy(base);
		copy(onls);

		 
	{ /*_TRANSF ( "Creating directories not under ocommon." , for_dir ) */ 
	  
	{ /*_ACTION ( instantiate ( "Creating directories not under ocommon." ) ) */ 
	  _com = instantiate ( "Creating directories not under ocommon." ) ; 
	  ui_action ( "%_com%" ) ; 
	  
	{ /*_LOG_MSG ( "%_com%" ,  Install_Log ) */ 
	  _msg = "%_com%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	} 
	} 
	  transfer ( for_dir , Keep_Stage ) ; 
	}
      		 
	{ /*_TRANSF ( Load_Admin , instal ) */ 
	  
	{ /*_ACTION ( instantiate ( Load_Admin ) ) */ 
	  _com = instantiate ( Load_Admin ) ; 
	  ui_action ( "%_com%" ) ; 
	  
	{ /*_LOG_MSG ( "%_com%" ,  Install_Log ) */ 
	  _msg = "%_com%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	} 
	} 
	  transfer ( instal , Keep_Stage ) ; 
	}
                if (For_Development)
                {
                     
	{ /*_TRANSF ( Load_Admin , util ) */ 
	  
	{ /*_ACTION ( instantiate ( Load_Admin ) ) */ 
	  _com = instantiate ( Load_Admin ) ; 
	  ui_action ( "%_com%" ) ; 
	  
	{ /*_LOG_MSG ( "%_com%" ,  Install_Log ) */ 
	  _msg = "%_com%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	} 
	} 
	  transfer ( util , Keep_Stage ) ; 
	}
                }
 		 
	{ /*_TRANSF ( Load_Bin , bin ) */ 
	  
	{ /*_ACTION ( instantiate ( Load_Bin ) ) */ 
	  _com = instantiate ( Load_Bin ) ; 
	  ui_action ( "%_com%" ) ; 
	  
	{ /*_LOG_MSG ( "%_com%" ,  Install_Log ) */ 
	  _msg = "%_com%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	} 
	} 
	  transfer ( bin , Keep_Stage ) ; 
	}
		 
	{ /*_TRANSF ( Load_Mesg , mesg_dflt ) */ 
	  
	{ /*_ACTION ( instantiate ( Load_Mesg ) ) */ 
	  _com = instantiate ( Load_Mesg ) ; 
	  ui_action ( "%_com%" ) ; 
	  
	{ /*_LOG_MSG ( "%_com%" ,  Install_Log ) */ 
	  _msg = "%_com%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	} 
	} 
	  transfer ( mesg_dflt , Keep_Stage ) ; 
	}
		 
	{ /*_TRANSF_NLS ( mesg ) */ 
	  if ( All_Languages ) 
	  { 
	    
	{ /*_ACTION ( instantiate ( Load_Mesg ) ) */ 
	  _com = instantiate ( Load_Mesg ) ; 
	  ui_action ( "%_com%" ) ; 
	  
	{ /*_LOG_MSG ( "%_com%" ,  Install_Log ) */ 
	  _msg = "%_com%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	} 
	} 
	    transfer ( mesg , Keep_Stage ) ; 
	  } 
	  else 
	  { 
	    
	{ /*_ACTION ( instantiate ( Load_Mesg_NLS ) ) */ 
	  _com = instantiate ( Load_Mesg_NLS ) ; 
	  ui_action ( "%_com%" ) ; 
	  
	{ /*_LOG_MSG ( "%_com%" ,  Install_Log ) */ 
	  _msg = "%_com%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	} 
	} 
	    transfer ( mesg , Keep_Stage , NLS_Subgroup ) ; 
	  } 
	}
		libsqlnet = "%Oracle_Home%/lib/libsqlnet.a";
	    	 
	{ /*_TRANSF ( Load_Lib , lib ) */ 
	  
	{ /*_ACTION ( instantiate ( Load_Lib ) ) */ 
	  _com = instantiate ( Load_Lib ) ; 
	  ui_action ( "%_com%" ) ; 
	  
	{ /*_LOG_MSG ( "%_com%" ,  Install_Log ) */ 
	  _msg = "%_com%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	} 
	} 
	  transfer ( lib , Keep_Stage ) ; 
	}
        /* Append product's root install file to root.install */
/*
        APPEND_ROOT_INSTALL("%Oracle_Home%/ocommon/install/ocommon.root")
 */

    } /* do_load */

    /*
     * Relink executables...
     */
	if (not(No_Make))
	{
    	if (do_relink)
    	{
/*
 * $Header: pinitlk.ins 3090000.1 95/09/05 15:17:15 wyim Generic<base> $ Copyr (c) 1992 Oracle
 */
/***************************************************************************
NAME
    initlk.ins
FUNCTION
    Contains common initialization code for *lk.ins scripts.
NOTES
CREATED
    PKu		07/26/92
MODIFIED 
***************************************************************************/
   { /* initlk.ins */
    ui_product(product_label);
    ui_action(instantiate(Relinking_Msg));
   } /* end of initlk.ins */

 			/* SYS("make ...") to relink executables.  May need to 
 	   	       instantiate "make..." string in dealing w/ collected 
 	   	       link options */


			change_directory("%Oracle_Home%/rdbms/lib");
			ui_action("Creating rdbms/lib/sysliblist");
			 
	{ /*_SYS ( "gensyslib" , "Creating rdbms/lib/sysliblist" ) */ 
	  _cmd = "gensyslib" ; _exe = "gensyslib" ; _com = "Creating rdbms/lib/sysliblist" ; _help = Sys_Macro_Help ; 
	  
	{ /*_LOG_SEL ( _cmd ,  _log_file ) */ 
	    _log_file = OS_Log ; 
	   if ( contains ( _cmd , "bin/sqldba" ) || contains ( _cmd , "bin/sqlplus" ) || contains ( _cmd , "bin/svrmgrl" ) ) 
	      _log_file = Sql_Log ; 
	   if ( contains ( _cmd , "make " ) ) 
	      _log_file = Make_Log ; 
	} 
	  
	  { { /*_SYS_RETRY*/ 
	    _result = "Retry" ; 
	    _log_file = _log_file ; 
	    problem_holdfile = instantiate ( Sys_Macro_Holdfile ) ; 
	    while ( _result == "Retry" ) { 
	      problem_holdfile = instantiate ( Sys_Macro_Holdfile ) ; 
	      modify ( "" , log_divider ( ) , _log_file ) ; 
	      modify ( "" , "Action:  %_com%" , _log_file ) ; 
	      modify ( "" , "Command: (%_cmd%), Out,Err=%_log_file%" , _log_file ) ; 
	      remove_file ( problem_holdfile ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      _stat = spawn ( _exe , problem_holdfile , problem_holdfile ) ; 
	      modify ( "" , "Status:  %_stat%" , _log_file ) ; 
	      if ( _stat != 0 ) { 
	      modify ( "" , "(( OIERR-SYS: %_cmd% ))" , _log_file ) ; 
	      } 
	      _s = _stat ; _result = "Ok" ; 
	      while ( ( _s != 0 ) || ( Sys_Option_ProcessDflt && ( _result == "Process" ) ) ) { 
	        _result = full_retry_dialog ( instantiate ( Sys_Macro_Prompt ) , 
	  	      problem_holdfile , true , Sys_Option_Ignore , true , 
	  	      instantiate ( Sys_Macro_Content ) , instantiate ( _help ) ) ; 
	        if ( Sys_Option_ProcessDflt && ( _result == "Process" ) ) 
	          
		  { /*_SYS_PROCESS_ERROR*/ 
		    { problem_header  = instantiate ( Problem_Header_Dflt ) ; 
	  	      problem_text    = instantiate ( Sys_Macro_Prompt ) ; 
	    	      problem_action  = _com ; 
		      execute ( "problem.ins" ) ; 
		    } 
		    [ 'DEFAULT : { information_dialog ( problem_error_info , problem_error_info_content , problem_error_info_help ) ; } ] 
		  } /*End SYS_PROCESS_ERROR*/ 
	        _s = 0 ; 
	      } 
	      
	    { modify ( "" , "{" , _log_file ) ; 
	      create_file ( problem_holdfile ) ; /*To stop sed raising error*/ 
	      _pfx = "OIERR-SYS" ; if ( _result == "Ok" ) _pfx = "Ok" ; 
	      spawn ( instantiate ( "sed -e 's/^/| %%_pfx%%: /' < %%problem_holdfile%% >>%%_log_file%%" ) ) ; 
	      modify ( "" , "}" , _log_file ) ; } 
	    [ 'DEFAULT : { } ]  
	      modify ( "" , instantiate ( "Result:  %%_result%%" ) , _log_file ) ; 
	    } 
	    modify ( "" , log_divider ( ) , _log_file ) ; 
	    Sys_Option_Ignore = true ; 
	    Sys_Option_ProcessDflt = true ; 
	   } 
	   [ 'CANCEL : { modify ( "" , "Result:  Cancel" , _log_file ) ; 
	      		signal ( 'CANCEL , Sys_Macro_Cancel_Prompt ) ; } ] 
	  } /*End _SYS_RETRY*/ 
	} /*End SYS*/
			ui_action("Creating ntcontab.o ...");
			ntcontab_c="%Oracle_Home%/rdbms/lib/ntcontab.c";
			if (exists(ntcontab_c))
			{
				remove_file(ntcontab_c);
			}
			status = _result;
                         
	{ /*_SYS ( ntcontab_make , "Creating ntcontab.o" ) */ 
	  _cmd = ntcontab_make ; _exe = ntcontab_make ; _com = "Creating ntcontab.o" ; _help = Sys_Macro_Help ; 
	  
	{ /*_LOG_SEL ( _cmd ,  _log_file ) */ 
	    _log_file = OS_Log ; 
	   if ( contains ( _cmd , "bin/sqldba" ) || contains ( _cmd , "bin/sqlplus" ) || contains ( _cmd , "bin/svrmgrl" ) ) 
	      _log_file = Sql_Log ; 
	   if ( contains ( _cmd , "make " ) ) 
	      _log_file = Make_Log ; 
	} 
	  
	  { { /*_SYS_RETRY*/ 
	    _result = "Retry" ; 
	    _log_file = _log_file ; 
	    problem_holdfile = instantiate ( Sys_Macro_Holdfile ) ; 
	    while ( _result == "Retry" ) { 
	      problem_holdfile = instantiate ( Sys_Macro_Holdfile ) ; 
	      modify ( "" , log_divider ( ) , _log_file ) ; 
	      modify ( "" , "Action:  %_com%" , _log_file ) ; 
	      modify ( "" , "Command: (%_cmd%), Out,Err=%_log_file%" , _log_file ) ; 
	      remove_file ( problem_holdfile ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      _stat = spawn ( _exe , problem_holdfile , problem_holdfile ) ; 
	      modify ( "" , "Status:  %_stat%" , _log_file ) ; 
	      if ( _stat != 0 ) { 
	      modify ( "" , "(( OIERR-SYS: %_cmd% ))" , _log_file ) ; 
	      } 
	      _s = _stat ; _result = "Ok" ; 
	      while ( ( _s != 0 ) || ( Sys_Option_ProcessDflt && ( _result == "Process" ) ) ) { 
	        _result = full_retry_dialog ( instantiate ( Sys_Macro_Prompt ) , 
	  	      problem_holdfile , true , Sys_Option_Ignore , true , 
	  	      instantiate ( Sys_Macro_Content ) , instantiate ( _help ) ) ; 
	        if ( Sys_Option_ProcessDflt && ( _result == "Process" ) ) 
	          
		  { /*_SYS_PROCESS_ERROR*/ 
		    { problem_header  = instantiate ( Problem_Header_Dflt ) ; 
	  	      problem_text    = instantiate ( Sys_Macro_Prompt ) ; 
	    	      problem_action  = _com ; 
		      execute ( "problem.ins" ) ; 
		    } 
		    [ 'DEFAULT : { information_dialog ( problem_error_info , problem_error_info_content , problem_error_info_help ) ; } ] 
		  } /*End SYS_PROCESS_ERROR*/ 
	        _s = 0 ; 
	      } 
	      
	    { modify ( "" , "{" , _log_file ) ; 
	      create_file ( problem_holdfile ) ; /*To stop sed raising error*/ 
	      _pfx = "OIERR-SYS" ; if ( _result == "Ok" ) _pfx = "Ok" ; 
	      spawn ( instantiate ( "sed -e 's/^/| %%_pfx%%: /' < %%problem_holdfile%% >>%%_log_file%%" ) ) ; 
	      modify ( "" , "}" , _log_file ) ; } 
	    [ 'DEFAULT : { } ]  
	      modify ( "" , instantiate ( "Result:  %%_result%%" ) , _log_file ) ; 
	    } 
	    modify ( "" , log_divider ( ) , _log_file ) ; 
	    Sys_Option_Ignore = true ; 
	    Sys_Option_ProcessDflt = true ; 
	   } 
	   [ 'CANCEL : { modify ( "" , "Result:  Cancel" , _log_file ) ; 
	      		signal ( 'CANCEL , Sys_Macro_Cancel_Prompt ) ; } ] 
	  } /*End _SYS_RETRY*/ 
	} /*End SYS*/
                        if ((not(status=="Ok")) || (not(_result=="Ok")))
			{
				 
	{ /*_SYS_ERR ( instantiate ( relinking_error ) ) */ 
	      _com = instantiate ( relinking_error ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	      modify ( "" , "Action:  %_com%" , Install_Log ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	}
				SIGNAL('CANCEL, instantiate(relinking_error));
			}
    	}
	}

	if (do_load || do_relink || do_db_actions)
	{
        /* Register the product */
         
	{ /*_REG_PROD*/ 
	  
	{ /*_ACTION ( instantiate ( Register_Prompt ) ) */ 
	  _com = instantiate ( Register_Prompt ) ; 
	  ui_action ( "%_com%" ) ; 
	  
	{ /*_LOG_MSG ( "%_com%" ,  Install_Log ) */ 
	  _msg = "%_com%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	} 
	} 
	  register ( product , File_Loaded_Msg ) ; 
	}
        if (not(internally_called)) reference(product);
	}

    /* Change back to the Stage Home directory (change to default
 	   directory (i.e., orainst/) in case Stage_Home is a relative path).
     */
    change_directory();
 	change_directory(Stage_Home);

     
	{ /*_LOG_MSG ( "Leaving ocommon.ins" , "" ) */ 
	  _msg = "Leaving ocommon.ins" ; 
	  _logfile = "" ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
}}
 
