home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a525 / 12.ddi / INSTALL.ORI < prev    next >
Encoding:
Text File  |  1993-02-15  |  29.0 KB  |  957 lines

  1. #-------------------------------------------------------------------------
  2. #
  3. # FILE
  4. #       INSTALL.ORI
  5. #       V2 installation script language interpreter file.
  6. #
  7. # DESCRIPTION
  8. #       Installation file for the DOS SQL*ReportWriter disk.
  9. #
  10. # MODIFIED
  11. #       Alyn Kelley   2-12-93  NLS18
  12. #-------------------------------------------------------------------------
  13. # Generate symbols for Disk Volume label and Jacket label for disks.
  14. #-------------------------------------------------------------------------
  15. .LABELGEN
  16. u
  17. V60 SRW%u
  18. SQL*ReportWriter Disk %u
  19.  
  20. .FILES -NOCOPY
  21. INSTALL.ORI       29663
  22.  
  23. # **********************************************************************
  24. # Initialize variables ...
  25. # **********************************************************************
  26. .DISK_USAGE=83
  27. .PRODUCT_NAME=SQL*ReportWriter
  28. .PRODUCT_VERSION=1.1.14.6.1
  29. .PRODUCT_NUMBER=13
  30. .UTIL_REQUIRED=1.0.10.0.1
  31. .PLUS_REQUIRED=3.0.12.1.1
  32.  
  33. # **********************************************************************
  34. # Check the Oracle register for required product versions ...
  35. # **********************************************************************
  36. .CHECKREG %PRODUCT_NUMBER%
  37.  PRODUCT
  38.  VERSION
  39.  
  40. .CHECKREG 2
  41.  UTILS
  42.  UTIL_VERSION
  43.  
  44. .IF (%UTILS%=="" || %UTIL_VERSION% < %UTIL_REQUIRED%)
  45.  .MESSAGE
  46.   %WARNING%
  47.  
  48.   You have not installed Tools Utilities %UTIL_REQUIRED%.
  49.   Please install Tools Utilities %UTIL_REQUIRED% or later
  50.   and then install %PRODUCT_NAME%.
  51.  
  52.  .PAUSE
  53.  .EXIT
  54. .ENDIF
  55.  
  56. .CHECKREG 1
  57.  RDBMS
  58.  RDBMS_VERSION
  59.  
  60. .CHECKREG 4
  61.  PLUS
  62.  PLUS_VERSION
  63.  
  64.   .IF (%PLUS%=="" || %PLUS_VERSION% < %PLUS_REQUIRED%)
  65.   .MESSAGE
  66.   %WARNING%
  67.  
  68.   You have not installed SQL*Plus %PLUS_REQUIRED%.  Please install
  69.   SQL*Plus %PLUS_REQUIRED% or later and then install %PRODUCT_NAME%.
  70.  
  71.     .PAUSE
  72.    .EXIT
  73.  
  74.   .ENDIF
  75.  
  76. # **********************************************************************
  77. # Find out how much space there is on %ORACLE_DISK%
  78. # **********************************************************************
  79. .<CHECK_INST>
  80.  
  81. .IF (%INSTALL_CHECKED%!=1)
  82.  .IF (%PRODUCT%=="")
  83.   .IF (%DISK_USAGE% > %FREE_SPACE%)
  84.  
  85.    .SELECTPROMPT
  86.     USER_RESP
  87.     There is insufficient disk space on drive %ORACLE_DISK%:
  88.     to install this product.  Would you like to attempt to install anyway?
  89.     <DISK_SPACE_HELP>
  90.     1     No
  91.     2     Yes
  92.  
  93.    .IF (%USER_RESP%==1 || %USER_RESP%==999)
  94.     .EXIT
  95.    .ENDIF
  96.   .ENDIF
  97.  
  98.  .ELSE
  99.  
  100.   .SELECTPROMPT
  101.    USER_RESP
  102.    %PRODUCT_NAME% has already been installed.
  103.    Would you like to reinstall it?
  104.    <REINSTALL_HELP>
  105.    1     No
  106.    2     Yes
  107.  
  108.   .IF (%USER_RESP%==1 || %USER_RESP%==999)
  109.    .EXIT
  110.   .ENDIF
  111.  .ENDIF
  112. .ENDIF
  113.  
  114. # **********************************************************************
  115. # Find out if the user wants to install example files
  116. # **********************************************************************
  117. .<BEGIN>
  118. .SELECTPROMPT
  119.  USER_RESP
  120.  This procedure installs SQL*ReportWriter, ORACLE's menu-driven report
  121.  generation program, which allows you to create single- and multiple-
  122.  query reports in many complex and versatile formats.
  123.  The interactive help system of SQL*ReportWriter shows you how to
  124.  create a number of example report types.  The corresponding example
  125.  report files are provided with the SQL*ReportWriter installation disks.
  126.  Do you wish to copy the SQL*ReportWriter example files?
  127.  <HELP1>
  128.  1       Yes
  129.  2       No
  130.  
  131. .IF (%USER_RESP%==999)
  132.  .IF (%INSTALL_CHECKED%!=1 && (%DISK_USAGE%>%FREE_SPACE% || %PRODUCT%!=""))
  133.   .GOTO <CHECK_INST>
  134.  .ELSE
  135.   .EXIT
  136.  .ENDIF
  137. .ELSE
  138.  .SAMPLE=%USER_RESP%
  139. .ENDIF
  140.  
  141. # **********************************************************************
  142. # Find out if the user wants userexit support installed
  143. # **********************************************************************
  144. .<RUNEXITL>
  145. .SELECTPROMPT
  146.  RUNEXIT
  147.  Included with the report-building software are files necessary
  148.  to build a customized report containing user exits, which may
  149.  be written in protected mode with C.  It is not necessary to
  150.  install this capability unless it is specifically desired.  It
  151.  is possible to create complex reports without the use of user
  152.  exits.  You will also need to install the User Exit Support disk
  153.  in order to take advantage of this capability.
  154.  <RUNEXITHELP>
  155.  1 Install user exit support
  156.  2 Do not install user exit support
  157.  
  158. .IF (%RUNEXIT%==999)
  159.  .GOTO <BEGIN>
  160. .ENDIF
  161.  
  162. # **********************************************************************
  163. # Find out if this is a LAN Install, if so skip building tables
  164. # **********************************************************************
  165.  
  166. .CLEARSCREEN
  167.  
  168. .IF (%LAN_INST%=="YES")
  169.  .MESSAGE
  170.  %NORMAL% You are installing your Oracle Tools onto a LAN.  This install
  171.  will copy the SRWINS.CMD file to the %ORACLE_HOME%\BIN directory.  This
  172.  file builds the %PRODUCT_NAME% tables in the database.  You
  173.  will need to set the ORACLE_HOME parameter in your environment and
  174.  the LOCAL parameter in CONFIG.ORA before running this file.
  175.  
  176.  .PAUSE
  177.  
  178.  .APPLTABS=0
  179.  .GOTO <MONITOR>
  180. .ENDIF
  181.  
  182. # **********************************************************************
  183. # Find out if the user wants to build SQL*Reportwriter tables in the database
  184. # **********************************************************************
  185.   .<APPLTABSL>
  186.   .APPLTABS=0
  187.  
  188. .IF (%RDBMS%!="" && %RDBMS_VERSION%>=6 && %PLUS%!="")
  189.  .CLEARSCREEN
  190.  .MESSAGE
  191.   %NORMAL% SQL*ReportWriter requires that special tables be added to your
  192.   database if you will be designing reports and developing applications.
  193.   If you have previously installed SQL*ReportWriter and these tables
  194.   already exist in your database, they may need to be upgraded to work
  195.   with this version of SQL*ReportWriter.
  196.  
  197.   If you are installing SQL*ReportWriter with a local ORACLE database,
  198.   and the local ORACLE database has already been installed on this
  199.   machine, this installation process can automatically add or
  200.   modify these tables as necessary.
  201.  
  202.   If you would like to add these tables yourself, or if you are
  203.   accessing a remote ORACLE database using SQL*Net, please see the
  204.   section on SQL*ReportWriter in the User's Guide.
  205.  
  206.  .PAUSE
  207.  .SELECTPROMPT
  208.   APPLTABS
  209.   Do you want this installation procedure to automatically update or
  210.   add the tables to your database?
  211.   <APPLTABSHELP>
  212.   1 Update / Add the tables to the database
  213.   2 Do NOT add the tables to the database
  214.  
  215.  .IF (%APPLTABS%==999)
  216.   .GOTO <RUNEXITL>
  217.  .ENDIF
  218. .ENDIF
  219.  
  220. # **********************************************************************
  221. # Find out which monitor type will be used
  222. # **********************************************************************
  223. .<MONITOR>
  224.  
  225. .SELECTPROMPT
  226.  USER_RESP
  227.  Will you be using a Color or Monochrome monitor?
  228.  <HELP2>
  229.  1       Color
  230.  2       Monochrome
  231.  
  232. .IF (%USER_RESP%==999)
  233.  .IF (%RDBMS%!="" && %RDBMS_VERSION%>=6 && %PLUS%!="")
  234.   .GOTO <APPLTABSL>
  235.  .ENDIF
  236.  .GOTO <RUNEXITL>
  237. .ENDIF
  238.  
  239. .MONITOR=%USER_RESP%
  240.  
  241. .CLEARSCREEN
  242.  
  243. # **********************************************************************
  244. # Create the required directories ...
  245. # **********************************************************************
  246. .MESSAGE
  247. %NORMAL% Creating directory %ORACLE_HOME%\SRW...
  248.  
  249. .MKDIR
  250. %ORACLE_HOME%\SRW
  251.  
  252. .MKDIR
  253. %ORACLE_HOME%\SRW\ADMIN
  254.  
  255. .MKDIR
  256. %ORACLE_HOME%\SRW\TERMINAL
  257.  
  258. .MKDIR
  259. %ORACLE_HOME%\SRW\PRINTERS
  260.  
  261. # **********************************************************************
  262. # Begin copying and decompressing the distribution files ...
  263. # **********************************************************************
  264. .MESSAGE
  265. %NORMAL% Copying SQL*ReportWriter Executables into %ORACLE_HOME%\PBIN...
  266.  
  267. .FILES -COMPRESS
  268. PRINTYPE.EXE      31615   %ORACLE_HOME%\BIN\PRINTYPE.EXE
  269. LOADREP.PXE      514197   %ORACLE_HOME%\PBIN\LOADREP.PXE
  270. PRINTDEF.PXE     471449   %ORACLE_HOME%\PBIN\PRINTDEF.PXE
  271. MOVEREP.PXE      387093   %ORACLE_HOME%\PBIN\MOVEREP.PXE
  272. TERMDEF.PXE      395983   %ORACLE_HOME%\PBIN\TERMDEF.PXE
  273. GENREP.PXE       650144   %ORACLE_HOME%\PBIN\GENREP.PXE
  274. RUNREP.PXE       794111   %ORACLE_HOME%\PBIN\RUNREP.PXE
  275. DUMPREP.PXE      524531   %ORACLE_HOME%\PBIN\DUMPREP.PXE
  276. SQLREP.PXE      1044289   %ORACLE_HOME%\PBIN\SQLREP.PXE
  277.  
  278. # **********************************************************************
  279. # Copy PLOADER.COM for all .PXE files
  280. # **********************************************************************
  281. .SYSCALL -QUIET
  282. COPY %ORACLE_HOME%\PBIN\PLOADR.COM %ORACLE_HOME%\PBIN\DUMPREP.COM >NUL
  283.  
  284. .SYSCALL -QUIET
  285. COPY %ORACLE_HOME%\PBIN\PLOADR.COM %ORACLE_HOME%\PBIN\GENREP.COM >NUL
  286.  
  287. .SYSCALL -QUIET
  288. COPY %ORACLE_HOME%\PBIN\PLOADR.COM %ORACLE_HOME%\PBIN\LOADREP.COM >NUL
  289.  
  290. .SYSCALL -QUIET
  291. COPY %ORACLE_HOME%\PBIN\PLOADR.COM %ORACLE_HOME%\PBIN\PRINTDEF.COM >NUL
  292.  
  293. .SYSCALL -QUIET
  294. COPY %ORACLE_HOME%\PBIN\PLOADR.COM %ORACLE_HOME%\PBIN\RUNREP.COM >NUL
  295.  
  296. .SYSCALL -QUIET
  297. COPY %ORACLE_HOME%\PBIN\PLOADR.COM %ORACLE_HOME%\PBIN\SQLREP.COM >NUL
  298.  
  299. .SYSCALL -QUIET
  300. COPY %ORACLE_HOME%\PBIN\PLOADR.COM %ORACLE_HOME%\PBIN\MOVEREP.COM >NUL
  301.  
  302. .SYSCALL -QUIET
  303. COPY %ORACLE_HOME%\PBIN\PLOADR.COM %ORACLE_HOME%\PBIN\TERMDEF.COM >NUL
  304.  
  305. .MESSAGE
  306. %NORMAL% Copying message files into %ORACLE_HOME%\DBS...
  307.  
  308. .FILES -COMPRESS
  309. SRWUS.MSB         28160   %ORACLE_HOME%\DBS\SRWUS.MSB
  310. SR.A              99328   %ORACLE_HOME%\SRW\ADMIN\SR.A
  311. SR.E             131072   %ORACLE_HOME%\SRW\ADMIN\SR.E
  312. SR.H            1704448   %ORACLE_HOME%\SRW\ADMIN\SR.H
  313.  
  314. .MESSAGE
  315. %NORMAL% Copying SQL Scripts into %ORACLE_HOME%\SRW\ADMIN...
  316.  
  317. .FILES -COMPRESS
  318. SRW_ICEN.SQL      15627   %ORACLE_HOME%\SRW\ADMIN\SRW_ICEN.SQL
  319. SRW_ILOC.SQL      12754   %ORACLE_HOME%\SRW\ADMIN\SRW_ILOC.SQL
  320. SRW_PUP.SQL        4354   %ORACLE_HOME%\SRW\ADMIN\SRW_PUP.SQL
  321. SRW_GRNT.SQL       1669   %ORACLE_HOME%\SRW\ADMIN\SRW_GRNT.SQL
  322. SRW_RVKE.SQL       1394   %ORACLE_HOME%\SRW\ADMIN\SRW_RVKE.SQL
  323. SRW_CMDN.SQL       5394   %ORACLE_HOME%\SRW\ADMIN\SRW_CMDN.SQL
  324. SRW_LMT.SQL        1306   %ORACLE_HOME%\SRW\ADMIN\SRW_LMT.SQL
  325. SRW_PRAC.SQL        929   %ORACLE_HOME%\SRW\ADMIN\SRW_PRAC.SQL
  326. SRW_DLOC.SQL       1072   %ORACLE_HOME%\SRW\ADMIN\SRW_DLOC.SQL
  327. SRW_DR10.SQL        800   %ORACLE_HOME%\SRW\ADMIN\SRW_DR10.SQL
  328. SRW_DROP.SQL       2300   %ORACLE_HOME%\SRW\ADMIN\SRW_DROP.SQL
  329. SRW_DCEN.SQL       1634   %ORACLE_HOME%\SRW\ADMIN\SRW_DCEN.SQL
  330. PUBLIC.TXT           15   %ORACLE_HOME%\SRW\ADMIN\PUBLIC.TXT
  331. SRW_UCEN.SQL       2019   %ORACLE_HOME%\SRW\ADMIN\SRW_UCEN.SQL
  332. SRW_ULOC.SQL       2040   %ORACLE_HOME%\SRW\ADMIN\SRW_ULOC.SQL
  333.  
  334. .MESSAGE
  335. %NORMAL% Copying Terminal Definitions into %ORACLE_HOME%\SRW\TERMINAL...
  336.  
  337. .FILES -COMPRESS
  338. PCTERM.KDF         4664   %ORACLE_HOME%\SRW\TERMINAL\PCTERM.KDF
  339. TERMDEF.DAT       19577   %ORACLE_HOME%\SRW\TERMINAL\TERMDEF.DAT
  340.  
  341. .FILES
  342. PCCOLOR            1536   %ORACLE_HOME%\SRW\TERMINAL\PCCOLOR
  343. PCMONO             1536   %ORACLE_HOME%\SRW\TERMINAL\PCMONO
  344.  
  345. .IF (%MONITOR%==1)
  346.  .FILES
  347. PCCOLOR            1536   %ORACLE_HOME%\SRW\TERMINAL\PCTERM
  348. .ELSE
  349.  .FILES
  350. PCMONO             1536   %ORACLE_HOME%\SRW\TERMINAL\PCTERM
  351. .ENDIF
  352.  
  353. .MESSAGE
  354. %NORMAL% Copying Printer Definitions into %ORACLE_HOME%\SRW\PRINTERS...
  355.  
  356. .FILES -COMPRESS
  357. DEFAULT             512   %ORACLE_HOME%\SRW\PRINTERS\DEFAULT
  358. WIDE                512   %ORACLE_HOME%\SRW\PRINTERS\WIDE
  359. WIDE180             512   %ORACLE_HOME%\SRW\PRINTERS\WIDE180
  360. PRINTDEF.DAT       7785   %ORACLE_HOME%\SRW\PRINTERS\PRINTDEF.DAT
  361. PSTSCRPT.DAT       4736   %ORACLE_HOME%\SRW\PRINTERS\PSTSCRPT.DAT
  362. FX286E              512   %ORACLE_HOME%\SRW\PRINTERS\FX286E
  363. FX86E               512   %ORACLE_HOME%\SRW\PRINTERS\FX86E
  364. HPINK               512   %ORACLE_HOME%\SRW\PRINTERS\HPINK
  365. HPLWIDE             512   %ORACLE_HOME%\SRW\PRINTERS\HPLWIDE
  366. HPLASER             512   %ORACLE_HOME%\SRW\PRINTERS\HPLASER
  367. IBMPRO              512   %ORACLE_HOME%\SRW\PRINTERS\IBMPRO
  368. LBP8II              512   %ORACLE_HOME%\SRW\PRINTERS\LBP8II
  369. OKI292              512   %ORACLE_HOME%\SRW\PRINTERS\OKI292
  370. OKIWIDE             512   %ORACLE_HOME%\SRW\PRINTERS\OKIWIDE
  371. PSPOR80             512   %ORACLE_HOME%\SRW\PRINTERS\PSPOR80
  372. PSPOR132            512   %ORACLE_HOME%\SRW\PRINTERS\PSPOR132
  373. PSLAN80             512   %ORACLE_HOME%\SRW\PRINTERS\PSLAN80
  374. PSLAN132            512   %ORACLE_HOME%\SRW\PRINTERS\PSLAN132
  375. PSLAN180            512   %ORACLE_HOME%\SRW\PRINTERS\PSLAN180
  376.  
  377. # **********************************************************************
  378. # Find out if this is a LAN Install, write LAN .BAT file
  379. # **********************************************************************
  380. .IF (%LAN_INST%=="YES")
  381.  
  382. .WRITEFILE
  383. %ORACLE_HOME%\BIN\SRWINS.BAT
  384. @ECHO OFF
  385. ECHO  
  386. rem
  387. rem  Usage: SRWINS SYSTEM SYSTEM_PASSWORD
  388. rem
  389. IF NOT .%%2 == . GOTO SRWINS
  390. ECHO Usage: SRWINS SYSTEM SYSTEM_Password
  391. GOTO EXIT
  392. :SRWINS
  393. IF NOT EXIST %%ORACLE_HOME%%\SRW\ADMIN\SRW_PUP.SQL GOTO ABORT
  394. IF NOT EXIST %%ORACLE_HOME%%\SRW\ADMIN\SRW_PRAC.SQL GOTO ABORT
  395. IF NOT EXIST %%ORACLE_HOME%%\SRW\ADMIN\SRW_ICEN.SQL GOTO ABORT
  396. IF NOT EXIST %%ORACLE_HOME%%\SRW\ADMIN\SRW_GRNT.SQL GOTO ABORT
  397. ECHO 
  398. ECHO Loading the SQL*ReportWriter definition tables.  This will take
  399. ECHO a few minutes.  Please wait...
  400. ECHO 
  401.  
  402. INSTLOAD %%1/%%2 %%ORACLE_HOME%%\SRW\ADMIN\SRW_PUP.SQL %%ORACLE_HOME%%\SRW\ADMIN\SRW_PUP.LOG
  403. INSTLOAD %%1/%%2 %%ORACLE_HOME%%\SRW\ADMIN\SRW_PRAC.SQL %%ORACLE_HOME%%\SRW\ADMIN\SRW_PRAC.LOG
  404. INSTLOAD %%1/%%2 %%ORACLE_HOME%%\SRW\ADMIN\SRW_ICEN.SQL %%ORACLE_HOME%%\SRW\ADMIN\SRW_ICEN.LOG
  405. SQLPLUS %%1/%%2 @%%ORACLE_HOME%%\SRW\ADMIN\SRW_GRNT.SQL <%%ORACLE_HOME%%\SRW\ADMIN\PUBLIC.TXT >%ORACLE_HOME%\SRW\ADMIN\SRW_GRNT.LOG
  406. IF NOT ERRORLEVEL 1 GOTO ENDING
  407. ECHO 
  408. ECHO Error - Could not run one of the following files:
  409. ECHO 
  410. ECHO %%ORACLE_HOME%%\SRW\ADMIN\SRW_PUP.SQL
  411. ECHO %%ORACLE_HOME%%\SRW\ADMIN\SRW_PRAC.SQL
  412. ECHO %%ORACLE_HOME%%\SRW\ADMIN\SRW_ICEN.SQL
  413. ECHO %%ORACLE_HOME%%\SRW\ADMIN\SRW_GRNT.SQL
  414. ECHO 
  415. ECHO See the related %%ORACLE_HOME%%\SRW\SRW_*.LOG files for more info.
  416. GOTO EXIT
  417.  
  418. :ABORT
  419. ECHO Unable to access one or more of the following files:
  420. ECHO 
  421. ECHO %%ORACLE_HOME%%\SRW\ADMIN\SRW_PUP.SQL
  422. ECHO %%ORACLE_HOME%%\SRW\ADMIN\SRW_PRAC.SQL
  423. ECHO %%ORACLE_HOME%%\SRW\ADMIN\SRW_ICEN.SQL
  424. ECHO %%ORACLE_HOME%%\SRW\ADMIN\SRW_GRNT.SQL
  425. ECHO 
  426. ECHO Terminating procedure.
  427. ECHO 
  428. GOTO EXIT
  429.  
  430. :ENDING
  431. ECHO SQL*ReportWriter definition tables are successfully installed.
  432. ECHO Access to them has been granted to ALL users; use SRW_RVKE.SQL
  433. ECHO and SRW_GRNT.SQL to grant access only to specific users.
  434. :EXIT
  435.  
  436.  .GOTO <SAMPLEL>
  437. .ENDIF
  438.  
  439. # **********************************************************************
  440. # Create BAT files for non-LAN install
  441. # **********************************************************************
  442. .WRITEFILE
  443. %ORACLE_HOME%\BIN\SRWINS.BAT
  444. @ECHO OFF
  445. ECHO  
  446. rem
  447. rem  Usage: SRWINS SYSTEM SYSTEM_PASSWORD
  448. rem
  449. IF NOT .%%2 == . GOTO SRWINS
  450. ECHO Usage: SRWINS SYSTEM SYSTEM_Password
  451. GOTO EXIT
  452. :SRWINS
  453. IF NOT EXIST %ORACLE_HOME%\SRW\ADMIN\SRW_PUP.SQL GOTO ABORT
  454. IF NOT EXIST %ORACLE_HOME%\SRW\ADMIN\SRW_PRAC.SQL GOTO ABORT
  455. IF NOT EXIST %ORACLE_HOME%\SRW\ADMIN\SRW_ICEN.SQL GOTO ABORT
  456. IF NOT EXIST %ORACLE_HOME%\SRW\ADMIN\SRW_GRNT.SQL GOTO ABORT
  457. ECHO 
  458. ECHO Loading the SQL*ReportWriter definition tables.  This will take
  459. ECHO a few minutes.  Please wait...
  460. ECHO 
  461.  
  462. INSTLOAD %%1/%%2 %ORACLE_HOME%\SRW\ADMIN\SRW_PUP.SQL %ORACLE_HOME%\SRW\ADMIN\SRW_PUP.LOG
  463. INSTLOAD %%1/%%2 %ORACLE_HOME%\SRW\ADMIN\SRW_PRAC.SQL %ORACLE_HOME%\SRW\ADMIN\SRW_PRAC.LOG
  464. INSTLOAD %%1/%%2 %ORACLE_HOME%\SRW\ADMIN\SRW_ICEN.SQL %ORACLE_HOME%\SRW\ADMIN\SRW_ICEN.LOG
  465. SQLPLUS %%1/%%2 @%ORACLE_HOME%\SRW\ADMIN\SRW_GRNT.SQL <%ORACLE_HOME%\SRW\ADMIN\PUBLIC.TXT >%ORACLE_HOME%\SRW\ADMIN\SRW_GRNT.LOG
  466. IF NOT ERRORLEVEL 1 GOTO ENDING
  467. ECHO 
  468. ECHO Error - Could not run one of the following files:
  469. ECHO 
  470. ECHO %ORACLE_HOME%\SRW\ADMIN\SRW_PUP.SQL
  471. ECHO %ORACLE_HOME%\SRW\ADMIN\SRW_PRAC.SQL
  472. ECHO %ORACLE_HOME%\SRW\ADMIN\SRW_ICEN.SQL
  473. ECHO %ORACLE_HOME%\SRW\ADMIN\SRW_GRNT.SQL
  474. ECHO 
  475. ECHO See the related %ORACLE_HOME%\SRW\SRW_*.LOG files for more info.
  476. GOTO EXIT
  477.  
  478. :ABORT
  479. ECHO Unable to access one or more of the following files:
  480. ECHO 
  481. ECHO %ORACLE_HOME%\SRW\ADMIN\SRW_PUP.SQL
  482. ECHO %ORACLE_HOME%\SRW\ADMIN\SRW_PRAC.SQL
  483. ECHO %ORACLE_HOME%\SRW\ADMIN\SRW_ICEN.SQL
  484. ECHO %ORACLE_HOME%\SRW\ADMIN\SRW_GRNT.SQL
  485. ECHO 
  486. ECHO Terminating procedure.
  487. ECHO 
  488. GOTO EXIT
  489.  
  490. :ENDING
  491. ECHO SQL*ReportWriter definition tables are successfully installed.
  492. ECHO Access to them has been granted to ALL users; use SRW_RVKE.SQL
  493. ECHO and SRW_GRNT.SQL to grant access only to specific users.
  494. :EXIT
  495.  
  496. # **********************************************************************
  497. # Copy and decompress Example Report files if chosen by the user
  498. # **********************************************************************
  499. .<SAMPLEL>
  500. .IF (%SAMPLE%==1)
  501.  .MKDIR
  502.   %ORACLE_HOME%\SRW\EXAMPLES
  503.  
  504.  .MESSAGE
  505.   %NORMAL% Copying Example Reports into %ORACLE_HOME%\SRW\EXAMPLES...
  506.  
  507.  .FILES -COMPRESS
  508. ADVANCED.REX     239936   %ORACLE_HOME%\SRW\EXAMPLES\ADVANCED.REX
  509. ADVANCED.SQL      63436   %ORACLE_HOME%\SRW\EXAMPLES\ADVANCED.SQL
  510. EXAMPLE.REX      136283   %ORACLE_HOME%\SRW\EXAMPLES\EXAMPLE.REX
  511. SRW132.REX        66544   %ORACLE_HOME%\SRW\EXAMPLES\SRW132.REX
  512. SRW175.REX        67228   %ORACLE_HOME%\SRW\EXAMPLES\SRW175.REX
  513. SRW80.REX         65279   %ORACLE_HOME%\SRW\EXAMPLES\SRW80.REX
  514.  
  515. .ENDIF
  516.  
  517. # **********************************************************************
  518. # Create the directories for userexits if chosen by the user
  519. # **********************************************************************
  520. .IF (%RUNEXIT%==1)
  521.  .MESSAGE
  522.   %NORMAL% Copying User Exit software into %ORACLE_HOME%\PRO...
  523.  
  524.  .MKDIR
  525.   %ORACLE_HOME%\PRO
  526.  
  527.  .MKDIR
  528.   %ORACLE_HOME%\PRO\LIB
  529.  
  530.  .MKDIR
  531.   %ORACLE_HOME%\PRO\EXIT
  532.  
  533. # **********************************************************************
  534. # Begin copying and decompressing the userexit files ...
  535. # **********************************************************************
  536.  .FILES -COMPRESS
  537. RUNMAI.OBJ          500   %ORACLE_HOME%\PRO\LIB\RUNMAI.OBJ
  538. ALLYRR.LIB       549537   %ORACLE_HOME%\PRO\LIB\ALLYRR.LIB
  539. ALLYDOS.LIB       22695   %ORACLE_HOME%\PRO\LIB\ALLYDOS.LIB
  540. RW6.LIB           26699   %ORACLE_HOME%\PRO\LIB\RW6.LIB
  541. RWRR.LIB         152225   %ORACLE_HOME%\PRO\LIB\RWRR.LIB
  542. RWCST1.OBJ          523   %ORACLE_HOME%\PRO\LIB\RWCST1.OBJ
  543. RWCSTF.OBJ          241   %ORACLE_HOME%\PRO\LIB\RWCSTF.OBJ
  544. RWXTBNUL.OBJ        260   %ORACLE_HOME%\PRO\LIB\RWXTBNUL.OBJ
  545. RWXTBDEF.OBJ        432   %ORACLE_HOME%\PRO\LIB\RWXTBDEF.OBJ
  546. RWXIT.LIB         18509   %ORACLE_HOME%\PRO\LIB\RWXIT.LIB
  547. RWXITF.LIB        17459   %ORACLE_HOME%\PRO\LIB\RWXITF.LIB
  548. CALLRUN.OBJ         566   %ORACLE_HOME%\PRO\LIB\CALLRUN.OBJ
  549.  
  550. .ENDIF
  551.  
  552. # **********************************************************************
  553. # **********************************************************************
  554. # Build application tables in the database if chosen by user
  555. # **********************************************************************
  556. # **********************************************************************
  557. .IF (%APPLTABS%==1)
  558.  .CLEARSCREEN
  559.  .DBA_FOUND=1
  560.  
  561. # **********************************************************************
  562. # Find the DBA authorization password and start up the database
  563. # **********************************************************************
  564.  .TRANSLATE
  565.   %DBA_AUTHORIZATION%
  566.   DBA_AUTHORIZATION
  567.  
  568.  .IF (%DBA_AUTHORIZATION%=="")
  569.  
  570.   .DBA_FOUND=0
  571.   .<DBAL>
  572.   .STRINGPROMPT QUIET 6 32
  573.    DBA_AUTHORIZATION
  574.    Please enter your DBA authorization password.
  575.    <DBA_HELP>
  576.  
  577.   .IF (%DBA_AUTHORIZATION%==999)
  578.    .GOTO <DBAL>
  579.   .ENDIF
  580.   .IF (%DBA_AUTHORIZATION%=="!TOOSHORT")
  581.    .MESSAGE
  582.     %WARNING%
  583.     Error - password must be at least six characters.
  584.  
  585.    .GOTO <DBAL>
  586.   .ENDIF
  587.  .ENDIF
  588.  
  589.  .MESSAGE
  590.   %HILITE%
  591.   Starting up the database...
  592.  
  593.  .SYSCALL -QUIET
  594.   SQLPME >NUL
  595.  
  596.  .SYSCALL -QUIET
  597.   ORACLE6 >NUL
  598.  
  599.  .SPAWN
  600.   SQLDBA STARTUP AUTHORIZATION=%DBA_AUTHORIZATION%
  601.  
  602.  .IF (%SPAWNRET%!=0)
  603.   .MESSAGE
  604.    %HILITE% Error - unable to start the ORACLE database using SQLDBA.
  605.             SQL*ReportWriter application tables will NOT be installed.
  606.  
  607.   .SYSCALL -QUIET
  608.    REMPME >NUL
  609.  
  610.   .PAUSE
  611.   .GOTO <INSTEND>
  612.  .ENDIF
  613.  
  614. # **********************************************************************
  615. # OK so far; make sure we have the right password for the SYSTEM account.
  616. # **********************************************************************
  617.  .PASSWD=MANAGER
  618.  
  619.  .<LOOP>
  620.  .SPAWN
  621.   CHKALL -SRW SYSTEM %PASSWD%
  622.  .IF (%SPAWNRET%<0)
  623.   .MESSAGE
  624.    %HILITE% Error - unable to spawn CHKALL.
  625.             SQL*ReportWriter application tables will NOT be installed.
  626.  
  627.   .SYSCALL -QUIET
  628.    REMPME >NUL
  629.  
  630.   .PAUSE
  631.   .GOTO <INSTEND>
  632.  .ENDIF
  633. # **********************************************************************
  634. # Since we don't have a logical AND, we figure out the flags manually...
  635. # **********************************************************************
  636.  
  637.  .IF (%SPAWNRET%>=128)
  638.   .UNKNOWN_ERR=1
  639.   .SPAWNRET=%SPAWNRET%-128
  640.  .ELSE
  641.   .UNKNOWN_ERR=0
  642.  .ENDIF
  643.  
  644.  .IF (%SPAWNRET%>=64)
  645.   .DB_DOWN=1
  646.   .SPAWNRET=%SPAWNRET%-64
  647.  .ELSE
  648.   .DB_DOWN=0
  649.  .ENDIF
  650.  
  651.  .IF (%SPAWNRET%>=32)
  652.   .USAGE_ERR=1
  653.   .SPAWNRET=%SPAWNRET%-32
  654.  .ELSE
  655.   .USAGE_ERR=0
  656.  .ENDIF
  657.  
  658.  .IF (%SPAWNRET%>=16)
  659.   .NEED_CAT=1
  660.   .SPAWNRET=%SPAWNRET%-16
  661.  .ELSE
  662.   .NEED_CAT=0
  663.  .ENDIF
  664.  
  665.  .IF (%SPAWNRET%>=8)
  666.   .FORMS_23=1
  667.   .SPAWNRET=%SPAWNRET%-8
  668.  .ELSE
  669.   .FORMS_23=0
  670.  .ENDIF
  671.  
  672.  .IF (%SPAWNRET%>=4)
  673.   .FULL=1
  674.   .SPAWNRET=%SPAWNRET%-4
  675.  .ELSE
  676.   .FULL=0
  677.  .ENDIF
  678.  
  679.  .IF (%SPAWNRET%>=2)
  680.   .PARTIAL=1
  681.   .SPAWNRET=%SPAWNRET%-2
  682.  .ELSE
  683.   .PARTIAL=0
  684.  .ENDIF
  685.  
  686.  .IF (%SPAWNRET%==1)
  687.   .USER_GOOD=1
  688.  .ELSE
  689.   .USER_GOOD=0
  690.  .ENDIF
  691.  
  692. # **********************************************************************
  693. # Now, evaluate codes
  694. # **********************************************************************
  695.  
  696. .IF (%UNKNOWN_ERR%==1)
  697. .MESSAGE
  698. %WARNING% An unexpected error occurred.
  699. The SQL*Reportwriter tables will NOT be installed.
  700. .PAUSE
  701. .GOTO <INSTEND>
  702. .ELSE
  703.  
  704.  .IF (%DB_DOWN%==1)
  705.   .MESSAGE
  706. %WARNING% The database is down.
  707. The SQL*Reportwriter tables will NOT be installed.
  708. .PAUSE
  709. .GOTO <INSTEND>
  710.  .ELSE
  711.  
  712.   .IF (%USAGE_ERR%==1)
  713.    .MESSAGE
  714. %WARNING% A usage error occurred.
  715. The SQL*Reportwriter tables will NOT be installed.
  716. .PAUSE
  717. .GOTO <INSTEND>
  718.   .ELSE
  719.  
  720.    .IF (%NEED_CAT%==1)
  721.     .MESSAGE
  722. %WARNING% CATALOG.SQL has not been run.  This file builds the ORACLE data
  723. dictionary views.  The SQL*Reportwriter tables will NOT be installed.
  724. .PAUSE
  725. .GOTO <INSTEND>
  726.    .ELSE
  727.  
  728.     .IF (%FORMS_23%==1)
  729.      .MESSAGE
  730. %WARNING% You have not installed SQL*Forms 3.0.
  731. The SQL*Reportwriter tables will NOT be installed.
  732. .PAUSE
  733. .GOTO <INSTEND>
  734.     .ENDIF
  735.    .ENDIF
  736.   .ENDIF
  737.  .ENDIF
  738. .ENDIF
  739.  
  740.  .IF (%USER_GOOD%==0)
  741.   .CLEARSCREEN
  742.   .<PASSWDL>
  743.   .STRINGPROMPT
  744.    PASSWD
  745.    Please enter the current password for the SYSTEM account.
  746.    <PASSWDHELP>
  747.    %PASSWD%
  748.  
  749.   .IF (%PASSWD%=="999")
  750.    .GOTO <PASSWDL>
  751.   .ENDIF
  752.   .GOTO <LOOP>
  753.  .ENDIF
  754.  
  755.  .CORRECT_PARTIAL=0
  756.  .IF (%PARTIAL%==1)
  757.   .SELECTPROMPT
  758.    CORRECT_PARTIAL
  759.    It appears that the SQL*ReportWriter Designer tables have been partially
  760.    installed in this database sometime in the past.  Do you wish to
  761.    remove these tables and install the complete set?  Any applications
  762.    stored in these tables will be lost.
  763.    <PARTIAL_HELP>
  764.    1 Remove current tables and reinstall complete set
  765.    2 Leave tables as they are
  766.  
  767.   .IF (%CORRECT_PARTIAL%==1)
  768.    .GOTO <FULL_JUMP>
  769.   .ENDIF
  770.   .IF (%CORRECT_PARTIAL%==2)
  771.    .GOTO <INSTEND>
  772.   .ENDIF
  773.   .IF (%CORRECT_PARTIAL%==999)
  774.    .GOTO <PASSWDL>
  775.   .ENDIF
  776.  
  777.  .ELSE
  778.  
  779. # **********************************************************************
  780. # Begin building the SQL*Reportwriter tables in the database
  781. # **********************************************************************
  782.   .IF (%FULL%==0)
  783.    .<FULL_JUMP>
  784.    .CLEARSCREEN
  785.    .MESSAGE
  786.     %NORMAL% Adding SQL*ReportWriter Designer tables to the database...
  787.  
  788.    .SYSCALL
  789.     %ORACLE_DISK%:
  790.  
  791.    .SYSCALL
  792.     CD %ORACLE_HOME%\SRW\ADMIN
  793.  
  794.    .SPAWN
  795.     INSTLOAD SYSTEM/%PASSWD% SRW_PUP.SQL SRW_PUP.LOG
  796.    .IF (%SPAWNRET%!=0)
  797.     .GOTO <NOINTERACT>
  798.    .ENDIF
  799.  
  800.    .SPAWN
  801.     INSTLOAD SYSTEM/%PASSWD% SRW_PRAC.SQL SRW_PRAC.LOG
  802.    .IF (%SPAWNRET%!=0)
  803.     .GOTO <NOINTERACT>
  804.    .ENDIF
  805.  
  806.    .SPAWN
  807.     INSTLOAD SYSTEM/%PASSWD% SRW_ICEN.SQL SRW_ICEN.LOG
  808.    .IF (%SPAWNRET%!=0)
  809.     .GOTO <NOINTERACT>
  810.    .ENDIF
  811.  
  812.    .SYSCALL
  813.     SQLPLUS SYSTEM/%PASSWD% @SRW_GRNT.SQL <PUBLIC.TXT >SRW_GRNT.LOG
  814.  
  815.   .ELSE
  816.    .MESSAGE
  817.     %NORMAL% SQL*ReportWriter Designer tables present and verified.
  818.  
  819.   .ENDIF
  820.  .ENDIF
  821.  .GOTO <SHUTDOWN>
  822.  
  823.  .<NOINTERACT>
  824.   .MESSAGE
  825.   %WARNING% Cannot build SQL*Reportwriter tables using INSTLOAD.
  826.   SQL*Reportwriter tables will need to be installed manually
  827.   after this install.
  828.  
  829. # **********************************************************************
  830. # Shut down the database
  831. # **********************************************************************
  832. .<SHUTDOWN>
  833.  .MESSAGE
  834.   %HILITE% Shutting down the database...
  835.  
  836.  .SYSCALL -QUIET
  837.   SQLDBA SHUTDOWN AUTHORIZATION=%DBA_AUTHORIZATION% >NUL
  838.  
  839. .SYSCALL
  840.  REMPME >NUL
  841.  
  842. .ENDIF
  843.  
  844. .<INSTEND>
  845. .<PRINT>
  846. .MESSAGE
  847.  %NORMAL%
  848.  SQL*ReportWriter must know which Oracle-certified printer it will
  849.  be using.  This selection process is administered by a utility
  850.  called PRINTYPE.  This utility will be run now to allow you to
  851.  select your printer type during installation.  You can also run
  852.  this utility at any time from the command line by typing PRINTYPE.
  853.  
  854. .PAUSE
  855.  
  856. .SPAWN
  857.  PRINTYPE %ORACLE_HOME%
  858.  
  859. .IF (%SPAWNRET%!=0)
  860.  .SYSCALL -QUIET
  861.   COPY %ORACLE_HOME%\SRW\PRINTERS\DEFAULT %ORACLE_HOME%\SRW\PRINTERS\DFLT >NUL
  862. .ENDIF
  863.  
  864. # **********************************************************************
  865. # Update the registration information in register.ora
  866. # **********************************************************************
  867. .MESSAGE
  868.  %NORMAL% Updating registration information...
  869.  
  870. .REGISTERFILE
  871.  %PRODUCT_NUMBER% %PRODUCT_NAME%
  872.  %PRODUCT_VERSION%
  873.  <DEINSTALL>
  874.  
  875. .EXIT
  876.  
  877. # **********************************************************************
  878. # Help panels ...
  879. # **********************************************************************
  880. .<DISK_SPACE_HELP>
  881. %PRODUCT_NAME% requires %DISK_USAGE%00K to install.  There is
  882. %FREE_SPACE%00K free on drive %ORACLE_DISK%:.  You may try to
  883. proceed anyway.  Unless you plan to install only a portion of
  884. it or you are reinstalling after an unsuccessful installation,
  885. ORAINST will probably terminate abnormally.
  886.  
  887. .<REINSTALL_HELP>
  888. %PRODUCT_NAME% has an entry in REGISTER.ORA, indicating that it has
  889. been installed previously.  You may either abort this installation and
  890. save the version you have already installed, or you may reinstall and
  891. overwrite the existing version.  Entry in REGISTER.ORA follows.
  892.  
  893. Product:  %PRODUCT%
  894. Version:  %VERSION%
  895.  
  896. .<HELP1>
  897. Choosing Yes will cause this install to copy sample reports into
  898. %ORACLE_HOME%\SRW\EXAMPLES.
  899.  
  900. .<HELP2>
  901. The monitor driver you choose will be copied to
  902. %ORACLE_HOME%\SRW\TERMINAL\PCTERM.
  903.  
  904. .<RUNEXITHELP>
  905. If you have a C compiler you can create programs which can be called by
  906. your SQL*ReportWriter applications.  You must install Pro*C in order to
  907. compile and link these programs successfully.  You can still build and
  908. run complex reports without the use of user exits.
  909.  
  910. .<DBA_HELP>
  911. The install program needs to know the DBA authorization password for
  912. your local database in order to start ORACLE.  This is a password at
  913. least six characters long which was chosen when the RDBMS was installed.
  914. If you do not know this password, please check with your ORACLE DBA.
  915.  
  916. Note:  Pressing <ESC> will NOT take you back to the previous prompt from
  917. this point.
  918.  
  919. .<APPLTABSHELP>
  920. In order to design reports, you must have certain tables installed in your
  921. ORACLE database.  If you have already installed a local database, this
  922. install can automatically create these tables (or update them if they are
  923. from an older version of SQL*ReportWriter).  Choose Yes if you would like
  924. these tables to be automatically created/updated.  If you do not have a
  925. local database installed, or would like to create the tables at a later
  926. time, choose No.
  927.  
  928. .<PASSWDHELP>
  929. This installation procedure needs to know the SYSTEM account's password
  930. in order to install the designer tables.
  931.  
  932. .<PARTIAL_HELP>
  933. Some, but not all, of the tables required by the SQL*ReportWriter designer
  934. are present in your database.  The designer will not work unless all of
  935. them are present.  If you wish to correct this, this install can remove
  936. the tables currently present and replace them with a full set.  Any data
  937. in the tables will be lost.  Alternatively, you can run SRWINS.BAT.
  938.  
  939. # **********************************************************************
  940. # Update filelist.ora with filenames not found in .FILES commands
  941. # **********************************************************************
  942. .<DEINSTALL>
  943. %ORACLE_HOME%\PBIN\DUMPREP.COM
  944. %ORACLE_HOME%\PBIN\GENREP.COM
  945. %ORACLE_HOME%\PBIN\LOADREP.COM
  946. %ORACLE_HOME%\PBIN\PRINTDEF.COM
  947. %ORACLE_HOME%\PBIN\RUNREP.COM
  948. %ORACLE_HOME%\PBIN\SQLREP.COM
  949. %ORACLE_HOME%\PBIN\MOVEREP.COM
  950. %ORACLE_HOME%\PBIN\TERMDEF.COM
  951. %ORACLE_HOME%\SRW\PRINTERS\DFLT
  952. %ORACLE_HOME%\SRW\ADMIN\SRW_PUP.LOG
  953. %ORACLE_HOME%\SRW\ADMIN\SRW_PRAC.LOG
  954. %ORACLE_HOME%\SRW\ADMIN\SRW_ICEN.LOG
  955. %ORACLE_HOME%\SRW\ADMIN\SRW_GRNT.LOG
  956.  
  957.