home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
chatr.zip
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-11-28
|
9KB
|
181 lines
/*------------------------------------------------------------------------*/
/* */
/* ChatterBox V3.50 Install (c) 1993, 94 Greg Ratajik */
/* */
/* This REXX command file will install ChatterBox on the desktop */
/* It should be run from the current directory, with the destination */
/* as the only parm. */
/* */
/*------------------------------------------------------------------------*/
'@echo off'
/* -------------------------------------------------------------- */
/* Load the Clear function. */
/* -------------------------------------------------------------- */
call RxFuncAdd 'SysCls', 'RexxUtil', 'SysCls'
call SysCls
/* -------------------------------------------------------------- */
/* Get the passed arguments. If the user doesn't enter a */
/* arg, display help. */
/* -------------------------------------------------------------- */
Parse Arg Dest . .
say ""
say "ChatterBox V3.50 Install (c) 1994, Greg Ratajik"
say ""
/* -------------------------------------------------------------- */
/* Display help for any invalid usages */
/* -------------------------------------------------------------- */
if Dest = ' ' then call usage
if Dest = '? ' then call usage
if substr(Dest, 3, 1) = '\' then
if substr(Dest, 4, 1) = '' then call usage
/* -------------------------------------------------------------- */
/* Check to make sure that CHATTER.PCK is in the current dir. */
/* -------------------------------------------------------------- */
rc = stream('chatter.pck','c','query exists')
if rc = '' then
do
say "CHATTER.PCK is not if the current directory. Move to where CHATTER.PCK"
say "is, and type INSTALL X: (where X is the drive letter to install to.)"
say ""
exit
end
/* -------------------------------------------------------------- */
/* Load the function to create a object. */
/* -------------------------------------------------------------- */
call RxFuncAdd 'SysCreateObject', 'RexxUtil', 'SysCreateObject'
/* -------------------------------------------------------------- */
/* Create the INSTALL directory on the root of the destination */
/* drive. */
/* -------------------------------------------------------------- */
'md 'Dest'\CHATTER 2>\null'
/* -------------------------------------------------------------- */
/* Unpack the files to the destination. */
/* -------------------------------------------------------------- */
'unpack chatter.pck 'dest'\chatter /n:chatter.exe 1>\null'
'unpack chatter.pck 'dest'\chatter /n:chatter.doc 1>\null'
'unpack chatter.pck 'dest'\chatter /n:chatter.txt 1>\null'
'unpack chatter.pck 'dest'\chatter /n:register.doc 1>\null'
'unpack chatter.pck 'dest'\chatter /n:problems.txt 1>\null'
'unpack chatter.pck 'dest'\chatter /n:chatter.wav 1>\null'
'unpack chatter.pck 'dest'\chatter /n:msg.wav 1>\null'
'unpack chatter.pck 'dest'\chatter /n:wtcb.wav 1>\null'
'unpack chatter.pck 'dest'\chatter /n:yham.wav 1>\null'
say 'ChatterBox has been installed in 'Dest'\Chatter'
say ''
say 'Would you like to install chatter in a folder? (No will install just the'
say 'CHATTER.EXE on the desktop) (Y/n)'
parse pull insert
if insert = 'N' | insert = 'n' then do
/* -------------------------------------------------------------- */
/* Create the ChattterBox icon on the desktop. */
/* -------------------------------------------------------------- */
EXEName = 'EXENAME='Dest'\CHATTER\Chatter.EXE'
rc = SysCreateObject("WPProgram","ChatterBox 3.50","<WP_DESKTOP>",,
EXEName, "REPLACE" )
end
else do
say 'Creating Chatter Folder, and adding programs to it...'
/* -------------------------------------------------------------- */
/* Create the ChattterBox Folder, on the Desktop. */
/* -------------------------------------------------------------- */
rc = SysCreateObject("WPFolder", "ChatterBox", "<WP_DESKTOP>" ,,
"OBJECTID=<CHATTERBOX>", "UPDATE")
/* -------------------------------------------------------------- */
/* Create the ChatterBox icon in the ChatterBox Folder */
/* -------------------------------------------------------------- */
EXEName = 'EXENAME='Dest'\CHATTER\Chatter.EXE'
rc = SysCreateObject("WPProgram","ChatterBox 3.50","<CHATTERBOX>",,
EXEName, "REPLACE" )
/* -------------------------------------------------------------- */
/* Create the ChatterBox doc icon in the ChatterBox Folder */
/* -------------------------------------------------------------- */
PARMName = 'PARAMETERS='Dest'\CHATTER\CHATTER.DOC'
EXEName = 'EXENAME=E.EXE;'PARMName
rc = SysCreateObject("WPProgram","ChatterBox Document (TEXT)","<CHATTERBOX>",,
EXEName, "REPLACE" )
/* -------------------------------------------------------------- */
/* Create the Register doc icon in the ChatterBox Folder */
/* -------------------------------------------------------------- */
PARMName = 'PARAMETERS='Dest'\CHATTER\REGISTER.DOC'
EXEName = 'EXENAME=E.EXE;'PARMName
rc = SysCreateObject("WPProgram","ChatterBox Registration (TEXT)","<CHATTERBOX>",,
EXEName, "REPLACE" )
/* -------------------------------------------------------------- */
/* Create the ChatterBox doc icon in the ChatterBox Folder */
/* -------------------------------------------------------------- */
PARMName = 'PARAMETERS='Dest'\CHATTER\CHATTER.TXT'
EXEName = 'EXENAME=E.EXE;'PARMName
rc = SysCreateObject("WPProgram","ChatterBox Brief Information (TEXT)","<CHATTERBOX>",,
EXEName, "REPLACE" )
/* -------------------------------------------------------------- */
/* Create the Problems icon ChatterBox Folder */
/* -------------------------------------------------------------- */
PARMName = 'PARAMETERS='Dest'\CHATTER\PROBLEMS.TXT'
EXEName = 'EXENAME=E.EXE;'PARMName
rc = SysCreateObject("WPProgram","ChatterBox Question and Answer help (TEXT)","<CHATTERBOX>",,
EXEName, "REPLACE" )
end
say "ChatterBox has been installed!"
call SysCls
say "┌───────────────────────────────────────────────────────────────┐"
say "│ ChatterBox Version 3.50 │"
say "│ Another Shareware program by Greg Ratajik │"
say "│ (c) 1993, 94 Greg Ratajik, All rights reserved. │"
say "└───────────────────────────────────────────────────────────────┘"
say ""
say " ChatterBox has been added to the Desktop."
say ""
say " You can start ChatterBox by double clicking on the ChatterBox "
say " icon. If you want ChatterBox to come up when you boot your "
say " system, drag the icon to the start-up folder, or create a "
say " shadow of the icon in the start-up folder. "
say ""
say "╔═══════════════════════════════════════════════════════════════╗"
say "║ ChatterBox is distributed as Shareware! You MUST register ║"
say "║ this product if you continue to use it. Please read ║"
say "║ CHATTER.DOC, REGISTER.DOC, or the ChatterBox About-box for ║"
say "║ more information. ║"
say "╚═══════════════════════════════════════════════════════════════╝"
say ""
exit 0
usage:
say "Usage: INSTALL <dest>:"
say ""
say " <dest> - where chatter is be installed to (If just"
say " a drive, then in the CHATTER directory in the root.)"
say ""
say " Examples:"
say " INSTALL D: (CHATTER directory in root.)"
say " INSTALL D:\APPS (in D:\APPS\CHATTER)"
say ""
say " If you select to install in the Chatter Folder, INSTALL will"
say " create a folder on the deskop, and place CHATTER.EXE, CHATTER.DOC"
say " CHATTER.TXT, and CHATTER.REG in the folder. Otherwise, it will"
say " only place CHATTER.EXE on the desktop"
say ""
say " (NOTE: Do not use a slash as the last character of the destination.)"