home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / chatr.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-11-28  |  9KB  |  181 lines

  1. /*------------------------------------------------------------------------*/
  2. /*                                                                        */
  3. /* ChatterBox V3.50 Install (c) 1993, 94  Greg Ratajik                    */
  4. /*                                                                        */
  5. /*  This REXX command file will install ChatterBox on the desktop         */
  6. /*  It should be run from the current directory, with the destination     */
  7. /*  as the only parm.                                                     */
  8. /*                                                                        */
  9. /*------------------------------------------------------------------------*/
  10.  
  11. '@echo off'
  12.  
  13. /* -------------------------------------------------------------- */
  14. /*  Load the Clear function.                                      */
  15. /* -------------------------------------------------------------- */
  16. call RxFuncAdd 'SysCls', 'RexxUtil', 'SysCls'
  17. call SysCls
  18.  
  19. /* -------------------------------------------------------------- */
  20. /*  Get the passed arguments.  If the user doesn't enter a        */
  21. /*  arg, display help.                                            */
  22. /* -------------------------------------------------------------- */
  23. Parse Arg Dest . .
  24.  
  25. say ""
  26. say "ChatterBox V3.50 Install                             (c) 1994, Greg Ratajik"
  27.  
  28. say ""
  29. /* -------------------------------------------------------------- */
  30. /*  Display help for any invalid usages                           */
  31. /* -------------------------------------------------------------- */
  32. if Dest = ' ' then call usage
  33. if Dest = '? ' then call usage
  34. if substr(Dest, 3, 1) =  '\' then
  35.     if substr(Dest, 4, 1) = '' then call usage
  36.  
  37. /* -------------------------------------------------------------- */
  38. /*  Check to make sure that CHATTER.PCK is in the current dir.    */
  39. /* -------------------------------------------------------------- */
  40. rc = stream('chatter.pck','c','query exists')
  41. if rc = '' then
  42.     do
  43.         say "CHATTER.PCK is not if the current directory.  Move to where CHATTER.PCK"
  44.         say "is, and type INSTALL X: (where X is the drive letter to install to.)"
  45.         say ""
  46.         exit
  47.     end
  48.  
  49. /* -------------------------------------------------------------- */
  50. /*  Load the function to create a object.                         */
  51. /* -------------------------------------------------------------- */
  52. call RxFuncAdd 'SysCreateObject', 'RexxUtil', 'SysCreateObject'
  53.  
  54. /* -------------------------------------------------------------- */
  55. /*  Create the INSTALL directory on the root of the destination   */
  56. /*  drive.                                                        */
  57. /* -------------------------------------------------------------- */
  58. 'md 'Dest'\CHATTER 2>\null'
  59.  
  60. /* -------------------------------------------------------------- */
  61. /*  Unpack the files to the destination.                          */
  62. /* -------------------------------------------------------------- */
  63. 'unpack chatter.pck 'dest'\chatter /n:chatter.exe  1>\null'
  64. 'unpack chatter.pck 'dest'\chatter /n:chatter.doc  1>\null'
  65. 'unpack chatter.pck 'dest'\chatter /n:chatter.txt  1>\null'
  66. 'unpack chatter.pck 'dest'\chatter /n:register.doc 1>\null'
  67. 'unpack chatter.pck 'dest'\chatter /n:problems.txt 1>\null'
  68.  
  69. 'unpack chatter.pck 'dest'\chatter /n:chatter.wav  1>\null'
  70. 'unpack chatter.pck 'dest'\chatter /n:msg.wav      1>\null'
  71. 'unpack chatter.pck 'dest'\chatter /n:wtcb.wav     1>\null'
  72. 'unpack chatter.pck 'dest'\chatter /n:yham.wav     1>\null'
  73.  
  74.  
  75. say 'ChatterBox has been installed in 'Dest'\Chatter'
  76. say ''
  77. say 'Would you like to install chatter in a folder? (No will install just the'
  78. say 'CHATTER.EXE on the desktop) (Y/n)'
  79.  
  80. parse pull insert
  81. if insert = 'N' | insert = 'n' then do
  82.     /* -------------------------------------------------------------- */
  83.     /*  Create the ChattterBox icon on the desktop.                   */
  84.     /* -------------------------------------------------------------- */
  85.     EXEName = 'EXENAME='Dest'\CHATTER\Chatter.EXE'
  86.     rc = SysCreateObject("WPProgram","ChatterBox 3.50","<WP_DESKTOP>",,
  87.                          EXEName, "REPLACE" )
  88.     end
  89. else  do
  90.     say 'Creating Chatter Folder, and adding programs to it...'
  91.  
  92.     /* -------------------------------------------------------------- */
  93.     /*  Create the ChattterBox Folder, on the Desktop.                */
  94.     /* -------------------------------------------------------------- */
  95.     rc = SysCreateObject("WPFolder", "ChatterBox", "<WP_DESKTOP>" ,,
  96.                          "OBJECTID=<CHATTERBOX>", "UPDATE")
  97.  
  98.     /* -------------------------------------------------------------- */
  99.     /*  Create the ChatterBox icon in the ChatterBox Folder           */
  100.     /* -------------------------------------------------------------- */
  101.     EXEName = 'EXENAME='Dest'\CHATTER\Chatter.EXE'
  102.     rc = SysCreateObject("WPProgram","ChatterBox 3.50","<CHATTERBOX>",,
  103.                          EXEName, "REPLACE" )
  104.  
  105.     /* -------------------------------------------------------------- */
  106.     /*  Create the ChatterBox doc icon in the ChatterBox Folder       */
  107.     /* -------------------------------------------------------------- */
  108.     PARMName = 'PARAMETERS='Dest'\CHATTER\CHATTER.DOC'
  109.     EXEName = 'EXENAME=E.EXE;'PARMName
  110.     rc = SysCreateObject("WPProgram","ChatterBox Document (TEXT)","<CHATTERBOX>",,
  111.                          EXEName, "REPLACE" )
  112.  
  113.     /* -------------------------------------------------------------- */
  114.     /*  Create the Register doc icon in the ChatterBox Folder         */
  115.     /* -------------------------------------------------------------- */
  116.     PARMName = 'PARAMETERS='Dest'\CHATTER\REGISTER.DOC'
  117.     EXEName = 'EXENAME=E.EXE;'PARMName
  118.     rc = SysCreateObject("WPProgram","ChatterBox Registration (TEXT)","<CHATTERBOX>",,
  119.                          EXEName, "REPLACE" )
  120.  
  121.     /* -------------------------------------------------------------- */
  122.     /*  Create the ChatterBox doc icon in the ChatterBox Folder       */
  123.     /* -------------------------------------------------------------- */
  124.     PARMName = 'PARAMETERS='Dest'\CHATTER\CHATTER.TXT'
  125.     EXEName = 'EXENAME=E.EXE;'PARMName
  126.     rc = SysCreateObject("WPProgram","ChatterBox Brief Information (TEXT)","<CHATTERBOX>",,
  127.                          EXEName, "REPLACE" )
  128.  
  129.     /* -------------------------------------------------------------- */
  130.     /*  Create the Problems icon ChatterBox Folder                    */
  131.     /* -------------------------------------------------------------- */
  132.     PARMName = 'PARAMETERS='Dest'\CHATTER\PROBLEMS.TXT'
  133.     EXEName = 'EXENAME=E.EXE;'PARMName
  134.     rc = SysCreateObject("WPProgram","ChatterBox Question and Answer help (TEXT)","<CHATTERBOX>",,
  135.                          EXEName, "REPLACE" )
  136.  
  137.     end
  138.  
  139. say "ChatterBox has been installed!"
  140.  
  141. call SysCls
  142.  
  143. say "┌───────────────────────────────────────────────────────────────┐"
  144. say "│                    ChatterBox Version 3.50                    │"
  145. say "│          Another Shareware program by Greg Ratajik            │"
  146. say "│        (c) 1993, 94 Greg Ratajik, All rights reserved.        │"
  147. say "└───────────────────────────────────────────────────────────────┘"
  148. say ""
  149. say " ChatterBox has been added to the Desktop."
  150. say ""
  151. say " You can start ChatterBox by double clicking on the ChatterBox "
  152. say " icon.  If you want ChatterBox to come up when you boot your    "
  153. say " system, drag the icon to the start-up folder, or create a      "
  154. say " shadow of the icon in the start-up folder.                     "
  155. say ""
  156. say "╔═══════════════════════════════════════════════════════════════╗"
  157. say "║ ChatterBox is distributed as Shareware!  You MUST register    ║"
  158. say "║ this  product if you continue to use it.  Please read         ║"
  159. say "║ CHATTER.DOC, REGISTER.DOC, or the ChatterBox About-box for    ║"
  160. say "║ more information.                                             ║"
  161. say "╚═══════════════════════════════════════════════════════════════╝"
  162. say ""
  163. exit 0
  164.  
  165. usage:
  166.     say "Usage: INSTALL  <dest>:"
  167.     say ""
  168.     say "       <dest> - where chatter is be installed to (If just"
  169.     say "                a drive, then in the CHATTER directory in the root.)"
  170.     say ""
  171.     say "       Examples:"
  172.     say "                INSTALL D:      (CHATTER directory in root.)"
  173.     say "                INSTALL D:\APPS (in D:\APPS\CHATTER)"
  174.     say ""
  175.     say "       If you select to install in the Chatter Folder, INSTALL will"
  176.     say "       create a folder on the deskop, and place CHATTER.EXE, CHATTER.DOC"
  177.     say "       CHATTER.TXT, and CHATTER.REG in the folder.  Otherwise, it will"
  178.     say "       only place CHATTER.EXE on the desktop"
  179.     say ""
  180.     say "       (NOTE:  Do not use a slash as the last character of the destination.)"
  181.