home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / netdor3.zip / VNDINST / FRNTENDS / 123R3 / PACKINST.CMD < prev    next >
OS/2 REXX Batch file  |  1996-04-04  |  4KB  |  135 lines

  1. /******************************************************************
  2. Description:    123R3 Installation Exec.
  3.  
  4. Details:        This exec is used to install 123R3.
  5.  
  6.                 Installation really only consists of asking the
  7.                 user for a local directory spec in which to
  8.                 store local files.  A little helpful info on running
  9.                 the 123R3 INSTALL program is also give.
  10.  
  11. Dependencies:
  12.    Externals:   RXUTILS.DLL - Part of VENDOR package.
  13.                 LIBEDIT.CMD - Part of VENDOR package.
  14.    Drive(s):    None
  15.    Directories: All DLL and EXE files in same directory.
  16.    Window Type: FS
  17.    App Title:   None
  18.  
  19. Last Updated:   12/9/91
  20. ******************************************************************/
  21. '@ECHO OFF'
  22. trace 'o'
  23.  
  24. /** Load external functions **/
  25. call RxFuncAdd 'RXDIREXIST', 'RXUTILS', 'RXDIREXIST'
  26. call RxFuncAdd 'RXMKDIR',    'RXUTILS', 'RXMKDIR'
  27. call RxFuncAdd 'RXOS2INI',   'RXUTILS', 'RXOS2INI'
  28. call RxFuncAdd 'RXPAUSE',    'RXUTILS', 'RXPAUSE'
  29. call RxFuncAdd 'RXDRIVEINFO','RXUTILS', 'RXDRIVEINFO'
  30. call RxFuncAdd 'RXDRIVEMAP', 'RXUTILS', 'RXDRIVEMAP'
  31.  
  32.  
  33. /** Get/Set misc vars **/
  34. parse source . . drv
  35. drv=left(drv,2)
  36.  
  37. Local.Directory = RxOS2Ini(, 'Directories', '123R3')
  38. if Local.Directory = '$RXERROR' then do
  39.    Local.Directory = RxOS2Ini(, '123R3', 'LOCALDIR')
  40.    if Local.Directory <> '$RXERROR' then do
  41.       call RxOS2Ini , 'Directories', '123R3', Local.Directory
  42.       call RxOS2Ini , '123R3', 'LOCALDIR', '$RXDEL'
  43.    end
  44. end
  45.  
  46.  
  47. /** Give header **/
  48. say
  49. say ' 123/R3 Installation'
  50. say ' -------------------'
  51.  
  52. /***************************************************************/
  53. /** Get the valid local drives, remove the VDISK, prompt user **/
  54. /***************************************************************/
  55.  
  56. DrvMap = RxDriveMap('C:', 'LOCAL' )
  57. parse upper value RxDriveInfo( right(DrvMap,2)) with . 'LABEL='label .
  58. if pos('VDISK', label)<>0 then DrvMap=left(DrvMap, length(DrvMap)-3)
  59.  
  60. /*******************************/
  61. /** Let user change local dir **/
  62. /*******************************/
  63.  
  64. do forever
  65.    if rxDirExist(Local.Directory)=1 then
  66.       say ' Current 123R3 local directory = 'Local.Directory
  67.  
  68.    say
  69.    say ' Lotus 123 files you create will be saved on your workstation.'
  70.    say ' Valid local Drives:' DrvMap
  71.    say
  72.    say ' Enter a local directory where 123R3 files will be saved:'
  73.    say
  74.  
  75.    OK=0
  76.    do until OK=1
  77.       Local.Directory = translate( LINEIN('STDIN') )
  78.       if POS( left(Local.Directory,2), DrvMap) <> 0 then OK=1
  79.    end /* do */
  80.  
  81.    call rxMkDir(Local.Directory)
  82.    if rxDirExist(Local.Directory)=1 then do
  83.      call RxOS2Ini , 'Directories', '123R3', Local.Directory
  84.      leave
  85.    end
  86.    else
  87.      say d2c(7)||' Cannot create directory.  Try again....'
  88. end  /* Do Forever */
  89.  
  90. /**************************************************/
  91. /** Give user info about running install program **/
  92. /**************************************************/
  93.  
  94. say
  95. say ' Important information about 123R3 INSTALL program (Please Read):'
  96. say ' ---------------------------------------------------------------'
  97. say
  98. say ' The 123R3 INSTALL will ask you what you would like to save your'
  99. say ' local configuration file (DCF) as.'
  100. say
  101. say ' At the '"'SPECIFYING YOUR DCF'"' panel make sure to enter the'
  102. say ' following:'
  103. say
  104. say  '          'Local.Directory'\123'
  105. say
  106. call RxPause ' Press any key to run INSTALL program...'
  107.  
  108.  
  109. /** Run the install program **/
  110. say ' Loading 123/R3 Installation Program.  Please Wait...'
  111. 'INSTALL'
  112.  
  113. /****************************************************/
  114. /** Add drive entry to LIBPATH statement if needed **/
  115. /****************************************************/
  116.  
  117. call LIBEDIT drv'\' 'A'    /* External Rexx Exec */
  118. LibEditRC = value('LIBEDIT.RC', , 'OS2ENVIRONMENT')
  119. if LibEditRC=0 then do
  120.   call RxCls
  121.   say d2c(7)
  122.   say ' Important Note:'
  123.   say ' ---------------'; say
  124.   say ' The 'drv'\ entry has just been added to the LIBPATH statement'
  125.   say ' of your CONFIG.SYS file.  You must reboot before 123/R3'
  126.   say ' will run correctly.'; say
  127. end
  128. else do
  129.   call RxCls
  130.   say
  131.   say '123/R3 is ready to run on your PC.'; say
  132. end
  133. call RxPause
  134. 'EXIT'
  135.