home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tstngn.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1995-03-08  |  5KB  |  123 lines

  1. /* Version of 95/03/07 by Peter Kanis */
  2. /************************************************************************
  3. *  Project     : Test Engine/2            Date    : 94/08/24            *
  4. *  Module      : INSTALL DEMO                                           *
  5. *  Filename    : INSTALL.CMD              Author  : Peter Kanis         *
  6. *************************************************************************
  7. *                                                                       *
  8. *  Description: OS/2 Command interface launcher for Test Engine/2       *
  9. *                installation.                                            *
  10. *                                                                       *
  11. *  Export:                                                              *
  12. *                                                                       *
  13. *  Intenal:                                                             *
  14. *                                                                       *
  15. *  Locals:      none                                                    *
  16. *                                                                       *
  17. *  Revisions:   none                                                    *
  18. *                                                                       *
  19. *************************************************************************
  20. *                                                                       *
  21. *  (c) ADD Consulting  All Rights Reserved                              *
  22. *                                                                       *
  23. *************************************************************************/
  24.  
  25. '@echo off'
  26. address cmd
  27.  
  28. /***** Load system functions ********************************************/
  29.  
  30. if RxFuncQuery( 'SysLoadFuncs') <> 0 then do
  31.     call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
  32.     call SysLoadFuncs
  33. end
  34.  
  35. parse arg rsp_file
  36.  
  37. /***** Get the install directory ****************************************/
  38.  
  39. parse source s1 s2 s3
  40.  
  41. s1 = filespec( 'D', s3)
  42. s2 = filespec( 'P', s3)
  43.  
  44. p = pos( '\', s2)
  45. lp = lastpos( '\', s2)
  46.  
  47. if lp <> p then
  48.     inst_path =  s1 || substr( s2, 1, lp)
  49. else
  50.     inst_path =  s1 || s2
  51.  
  52. /***** Find the boot drive for installation *****************************/
  53.  
  54. set_path = VALUE( 'PATH', , 'OS2ENVIRONMENT');
  55. bootdrive = substr( set_path, pos( '\OS2\SYSTEM', set_path ) -2, 2);
  56.  
  57. /***** Install 32 bit unzip freeware ************************************/
  58.  
  59. say 'copying installation files...'
  60.  
  61. 'unpack' inst_path || 'unzip.ex@' bootdrive || '\os2\install'
  62.  
  63. /***** Check for VX-REXX in environment *********************************/
  64.  
  65. vxrexx = ''
  66. vxrexx = VALUE( 'VXREXX',, 'OS2ENVIRONMENT');
  67.  
  68. /***** Check for VX-REXX from previous install **************************/
  69.  
  70. if (vxrexx = '') then
  71.        vxrexx = bootdrive || '\OS2\DLL'
  72.  
  73. vxrexxdll = vxrexx || "\VROBJ.DLL"
  74.  
  75. /***** Check file dates to ensure right version *************************/
  76.  
  77. if stream( vxrexxdll, 'c', 'query exists') <> '' then do
  78.  
  79.     call SysFileTree vxrexxdll, 'file.', 'FT'
  80.  
  81.     if word( file.1, 1) < '94/08/10/17/17' then do
  82.         say word( file.1, 1) '94/08/10/17/17'
  83.         say 'Copying VX-REXX run-time version 2.1 (c) WATCOM...'
  84.         'unzip -joqq' inst_path || 'disk1.zip vrobj.dll -d' vxrexx
  85.     end
  86.     
  87. end
  88.  
  89. /***** If no VX-REXX unpack runtime dll *********************************/
  90.  
  91. else do
  92.     say 'Copying VX-REXX run-time version 2.1 (c) WATCOM...'
  93.     'unzip -joqq' inst_path || 'disk1.zip vrobj.dll -d' vxrexx
  94. end
  95.  
  96. /***** copy Install program help ***************************************/
  97.  
  98. say 'please be patient...'
  99. 'unzip -joqq' inst_path || 'disk1.zip qainst.inf -d' bootdrive || '\os2\book'
  100.  
  101. /***** copy installation program ***************************************/
  102.  
  103. 'unzip -joqq' inst_path || 'disk1.zip toolbox.ico -d' bootdrive || '\os2\install'
  104. 'unzip -joqq' inst_path || 'disk1.zip tbopen.ico -d' bootdrive || '\os2\install'
  105. say 'Install program will start in a moment...'
  106. 'unzip -joqq' inst_path || 'disk1.zip tstngen.ico -d' bootdrive || '\os2\install'
  107. 'unzip -joqq' inst_path || 'disk1.zip qainst.exe -d' bootdrive || '\os2\install'
  108.  
  109. /***** start the installation program ***********************************/
  110.  
  111. cmdstr = bootdrive || '\os2\install\qainst' inst_path rsp_file
  112. cmdstr
  113.  
  114. exit
  115.  
  116. /************************************************************************/
  117. /*                                                                      */
  118. /*                         (c) ADD Consulting 1994/5                    */
  119. /*                                                                      */
  120. /*                               END OF FILE.                           */
  121. /*                                                                      */
  122. /************************************************************************/
  123.