home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 2 / Giga_Games_2_CD-ROM_Walnut_Creek_April_1995.iso / os2 / othell10.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-02-01  |  3KB  |  92 lines

  1. /* Entertainment Pack for OS/2 Installation */
  2. '@Echo Off'
  3. Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  4. Call SysLoadFuncs
  5. Signal On Failure Name FAILURE
  6. Signal On Halt Name HALT
  7. Signal On Syntax Name SYNTAX
  8. Call SysCls
  9. Say 'Installing Entertainment Pack (Othello, Version 1.0) for OS/2...'
  10. Say ''
  11. Result = SysFileTree( 'OTHELLO.EXE', 'Files', 'F' )
  12. If Files.0 = 0 Then
  13.   Do
  14.   Say 'ERROR: OTHELLO.EXE not found! Installation cancelled.'
  15.   Signal DONE
  16.   End
  17. Result = SysFileTree( 'OTHELLO.HLP', 'Files', 'F' )
  18. If Files.0 = 0 Then
  19.   Do
  20.   Say 'ERROR: OTHELLO.HLP not found! Installation cancelled.'
  21.   Signal DONE
  22.   End
  23. Result = SysFileTree( 'LICENSE.TXT', 'Files', 'F' )
  24. If Files.0 = 0 Then
  25.   Do
  26.   Say 'ERROR: LICENSE.TXT not found! Installation cancelled.'
  27.   Signal DONE
  28.   End
  29. Result = SysFileTree( 'OTHELLO.DOC', 'Files', 'F' )
  30. If Files.0 = 0 Then
  31.   Do
  32.   Say 'ERROR: OTHELLO.DOC not found! Installation cancelled.'
  33.   Signal DONE
  34.   End
  35. Say 'Please enter the full name of the directory to which you want'
  36. Say 'the Entertainment Pack (Othello, Version 1.0) for OS/2'
  37. Say 'installed (default C:\OS2\APPS): '
  38. Pull Directory
  39. If Directory = "" Then Directory = 'C:\OS2\APPS'
  40. Result = SysFileTree( Directory, 'Dirs', 'D' )
  41. If Dirs.0 = 0 Then
  42.   Do
  43.   Result = SysMkDir( Directory )
  44.   if Result == 0 Then
  45.     Do
  46.     End
  47.   Else
  48.     Do
  49.     Say 'ERROR: Unable to create target directory. Installation cancelled.'
  50.     Signal DONE
  51.     End
  52.   End
  53. Say ''
  54. Say 'The program object will be placed in the Games folder...'
  55. Folder = '<WP_GAMES>'
  56. Say ''
  57. Say 'Copying OTHELLO.EXE to' Directory '...'
  58. Copy OTHELLO.EXE Directory                  '1>NUL'
  59. Say 'Copying OTHELLO.HLP to' Directory '...'
  60. Copy OTHELLO.HLP Directory                  '1>NUL'
  61. Say 'Copying LICENSE.TXT to' Directory '...'
  62. Copy LICENSE.TXT Directory                  '1>NUL'
  63. Say 'Copying OTHELLO.DOC to' Directory '...'
  64. Copy OTHELLO.DOC Directory                  '1>NUL'
  65. Say ''
  66. Say 'Creating program object...'
  67. Say ''
  68. Type = 'WPProgram'
  69. Title = 'Othello'
  70. Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\OTHELLO.EXE;STARTUPDIR='Directory';OBJECTID=<OTHELLO>;NOPRINT=YES;'
  71. Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  72. If Result = 1 Then
  73.   Say 'The Entertainment Pack (Othello, Version 1.0) for'
  74.   Say 'OS/2 was successfully installed.'
  75.   Say 'Please read OTHELLO.DOC for additional information.'
  76.   Exit
  77.  
  78. Say 'ERROR: Unable to create object. Installation cancelled.'
  79. Exit
  80.  
  81. FAILURE:
  82. Say 'Installation error.'
  83. Signal DONE
  84. HALT:
  85. Say 'Installation error.'
  86. Signal DONE
  87. SYNTAX:
  88. Say 'Installation error.'
  89. Signal DONE
  90. DONE:
  91. Exit
  92.