home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rexxedit.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-12-24  |  5KB  |  127 lines

  1. /***************************************************************************\
  2.  **                                                                       **
  3.  ** INSTALL.CMD : install Rexx Editor v1.0 for OS/2                       **
  4.  **                                                                       **
  5. \***************************************************************************/
  6.  CALL RxFuncAdd 'SysLoadFuncs' , 'RexxUtil' , 'SysLoadFuncs'
  7.  CALL SysLoadFuncs
  8.  
  9.  CALL SysCurState 'OFF'
  10.  CALL SysCls
  11.  CALL InfoBox 'Install Rexx Editor v1.0 ╕ MB Products'
  12.  CALL SysSleep 1
  13.  
  14.  CALL InfoBox 'Copy BPMCC.DLL to C:\OS2\DLL'
  15.  'COPY BPMCC.DLL C:\OS2\DLL'
  16.  IF rc \= 0 THEN DO
  17.    CALL Beep 460, 250
  18.    CALL InfoBox 'Could not copy BPMCC.DLL to C:\OS2\DLL, installation aborted!'
  19.    SIGNAL End
  20.  END
  21.  
  22.  CALL InfoBox 'Using current directory as your program directory? (Y/N)'
  23.  key = SysGetKey('NOECHO')
  24.  IF ((key = 'Y') | (key = 'y')) THEN DO
  25.    Rexxdir = DIRECTORY() 
  26.  END
  27.  ELSE DO UNTIL Dir.0 > 0
  28.    Rexxdir=AskBox('Give program directory :')
  29.    IF RexxDir <> "" THEN
  30.      CALL SysFileTree RexxDir, dir, 'D'
  31.    ELSE
  32.      Dir.0 = 0
  33.  END
  34.  DROP Dir.
  35.  
  36.  CALL InfoBox 'Using current directory as your startup directory? (Y/N)'
  37.  key = SysGetKey('NOECHO')
  38.  IF ((key = 'Y') | (key = 'y')) THEN DO
  39.    Startupdir = DIRECTORY() 
  40.  END
  41.  ELSE DO UNTIL Dir.0 > 0
  42.    Startupdir=AskBox('Give startup directory :')
  43.    IF StartupDir <> "" THEN
  44.      CALL SysFileTree StartupDir, dir, 'D'
  45.    ELSE
  46.      Dir.0 = 0
  47.  END
  48.  
  49.  CALL InfoBox 'Write program directory to OS2.INI'
  50.  Result = SysIni('USER', 'RexxEditor', 'Directory', Rexxdir)
  51.  IF Result = 'ERROR:' THEN DO
  52.    CALL Beep 460, 250
  53.    CALL InfoBox 'There was a problem while setting the Profile for RexxEditor !'
  54.    SIGNAL End
  55.  END
  56.  CALL InfoBox 'Create Object on your desktop'
  57.  IF SysCreateObject('WPProgram','Rexx Editor','<WP_DESKTOP>',,
  58.     'EXENAME='||Rexxdir||'\RE.EXE;STARTUPDIR='||Startupdir||';PROGTYPE=PM;','U') THEN DO
  59.    NOP
  60.  END
  61.  ELSE DO
  62.    CALL Beep 460, 250
  63.    CALL InfoBox 'There was a problem while creating the Object for RexxEditor !'
  64.    SIGNAL End
  65.  END
  66.  
  67.  CALL InfoBox 'Rexx Editor succesfully installed'
  68.  
  69. End:
  70.  CALL SysCurState 'ON'
  71.  CALL SysDropFuncs
  72.  Exit
  73.  
  74.  
  75. /***************************************************************************\
  76.  **                                                                       **
  77.  ** InfoBox : Procedure that display information in a box.                **
  78.  **                                                                       **
  79. \***************************************************************************/
  80. InfoBox: PROCEDURE
  81. PARSE ARG message
  82.  CALL SysCls
  83.  pos = SysCurPos(5, 5)
  84.  Say '╔═════════════════════════════════════════════════════════════════╗'
  85.  pos = SysCurPos(6, 5)
  86.  Say '║                                                                 ║'
  87.  pos = SysCurPos(7, 5)
  88.  Say '║ 'message
  89.  pos = SysCurPos(7, 70)
  90.  Say ' ║'
  91.  pos = SysCurPos(8, 5)
  92.  Say '║                                                                 ║'
  93.  pos = SysCurPos(9, 5)
  94.  Say '╚═════════════════════════════════════════════════════════════════╝'
  95. RETURN(0)
  96.  
  97. /***************************************************************************\
  98.  **                                                                       **
  99.  ** AskBox : Procedure that display information in a box and waits for    **
  100.  **          input.                                                       **
  101.  **                                                                       **
  102. \***************************************************************************/
  103. AskBox: PROCEDURE
  104. PARSE ARG message
  105.  CALL SysCls
  106.  pos = SysCurPos(5, 5)
  107.  Say '╔═════════════════════════════════════════════════════════════════╗'
  108.  pos = SysCurPos(6, 5)
  109.  Say '║                                                                 ║'
  110.  pos = SysCurPos(7, 5)
  111.  Say '║ 'message
  112.  pos = SysCurPos(7, 70)
  113.  Say ' ║'
  114.  pos = SysCurPos(8, 5)
  115.  Say '║  ┌───────────────────────────────────────────────────────────┐  ║'
  116.  pos = SysCurPos(9, 5)
  117.  Say '║  │                                                           │  ║'
  118.  pos = SysCurPos(10, 5)
  119.  Say '║  └───────────────────────────────────────────────────────────┘  ║'
  120.  pos = SysCurPos(11, 5) 
  121.  Say '╚═════════════════════════════════════════════════════════════════╝'
  122.  pos = SysCurPos(9,10)
  123.  CALL SysCurState 'ON'
  124.  ask = LINEIN()
  125.  CALL SysCurState 'OFF'
  126. RETURN ask
  127.