home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
gz-311a.zip
/
install.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-07-15
|
5KB
|
149 lines
/* install program for GemZ script (for OpenChat/2) */
call rxfuncadd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call sysloadfuncs
cls
say ''
say ' '
say ' ▒ ▒ '
say ' ░▓█░█ ▄▀▀░▀▀ ▄▄ ░ ▄ ▒ ▄ ▄▄▓▓▄■ ▀ '
say ' ▐░▀▀▀▀▀▀ ▀ ▒▀▀▀▀▀▀▄ ▄ ▄▄░▄▄ ▄▄▀▀▀▀▀▒▀▀▀▀▀▀▓█ '
say ' ▀ ■ ▄▓ ▄▓▀▀▀▀▀▀▀▀ ▄▄▄▄▄ ▀▓▄▄▄▄▄▄▄▄▄▄▄▓▀▀▀▀▀▀▀▀▓▄ ▓ '
say ' ▓ ▓ ▄▓▀░▒▓▓▄ ▓█ █▓░█ ▄▄▄▄▄▄▄▄▄▄ ▄▓▓▒░▀▓▄ █ ▓ '
say ' ▒ ▓ ▓▓ ▄▄▄▄ ▓▒░▒▓▓░ ▒░ ░▒▒▓ ▒░▒░ ▄▄▄▄▄▓▓ █ ▒ '
say ' ░ ▓ ▓█ ▓▓▓▓ ░▒▀▀▀▀ ▒░ ░░█▒ ▒█▒░ ▓▓▓▓▒ ▀▀ ▓ ░ '
say ' ░ ▓ ▓▒ ▐░▒▓█ █░ █░██ ██ ███░ ██░█ █▓▒░█ ▄▓ ▓ ░ '
say ' ▒ ▓ █▓▄██░░▓ ██▄██▓█ █▓ ███▓ ███▒ ▓░░██▄▓█ █ ░ '
say ' ▓ ▓ ▀▀▀▀▀▀ ▀▀▀▀▀ ▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀ █ ▒ '
say ' █▄▀▓▄▄▄▄▄▄▄▓▀▓▄▄▄▄▄▓▀▓▄▄▄▄▄▄▄▄▄▄▓▀▓▄▄▄▄▄▄▄▄▓ ▓ '
say ' ▐▒▒▄▄▄▄▄▄▄ ▄ ▄▄▄█▄▄▄ ▄ ▄ ▄░▄▄ ▄ ▄ ▄ ▄▄▄▄▄█▓▄▒ '
say ' ■▀▒ ▒▀ ░ ▀▓ ░ jui▒ce▀▓█▓▀ '
say ' ▀ GemZ for OpenChat/2 ░ ▀ '
say ' by Gemini (gemini@silcom.com)'
say ''
say ''
say ''
say 'GemZ for OpenChat/2 install program'
say ''
installpath = SysIni('USER', 'OpenChat', 'InstallDir')
installpath = left(installpath, length(installpath)-1)
if substr(installpath, length(installpath)) <> '\' then do
installpath = installpath'\'
end
if installpath = '' then do
say '╔══════════════════════════════════════════════════════╗'
say '║ Please input the path where OpenChat/2 is installed. ║'
say '║ (eg. C:\OPENCHAT\) ║'
say '╚══════════════════════════════════════════════════════╝'
say ''
pull installpath
if substr(installpath, length(installpath)) <> '\' then do
installpath = installpath'\'
end
end
install:
rc = stream( installpath'ircrc', 'Command', 'QUERY EXISTS')
upgrading = stream( installpath'script2\gemz2fp.irc', 'Command', 'QUERY EXISTS')
if rc = '' then do
if installpath != '' then do
say installpath 'does not contain OpenChat'
end
say 'please make sure the path you stated is the root of the OpenChat'
say 'directory. eg. C:\OPENCHAT\'
say 'Please enter your install path'
pull installpath
if substr(installpath, length(installpath)) <> '\' then do
installpath = installpath'\'
end
call install
end
say 'installing GemZ to OpenChat Directory:'
say installpath
say ''
say 'Is this ok? [Y/n]'
pull responce
if responce = 'N' then do
installpath = ''
call install
end
gemzfile = 'gemz2fp.irc'
menufile = 'gemzmenu.irc'
readmefl = 'gmzread.me'
plugfile = 'actplug.gmz'
histfile = 'gmzhist.txt'
docsfile = 'gemzhelp.new'
extrfile = 'gzextras.irc'
colrfile = '*.gzc'
furlfile = 'furl.exe'
say '╔══════════════════╗'
say '║ Copying Files... ║ Destination: 'installpath'SCRIPT2\'
say '╚══════════════════╝'
'@copy ' gemzfile installpath'script2\'gemzfile
'@copy ' menufile installpath'script2\'menufile
'@copy ' readmefl installpath'script2\'readmefl
'@copy ' plugfile installpath'script2\'plugfile
'@copy ' histfile installpath'script2\'histfile
'@copy ' colrfile installpath'script2\'colrfile
'@copy ' docsfile installpath'script2\'docsfile
'@copy ' extrfile installpath'script2\'extrfile
'@copy ' furlfile installpath
say '╔══════════════════╗'
say '║ Copying Complete ║'
say '╚══════════════════╝'
/* Let's create a shadow in the OpenChat/2 folder if it exists */
rc = SysCreateObject('WPProgram', 'GemZ Readme File', '<OCHAT_FOLDER>',,
'EXENAME=E.EXE;PARAMETERS='installpath'script2\'readmefl,'u' )
rc = SysCreateObject('WPProgram', 'GemZ History File', '<OCHAT_FOLDER>',,
'EXENAME=E.EXE;PARAMETERS='installpath'script2\'histfile,'u' )
rc = SysCreateObject('WPProgram', 'GemZ Help', '<OCHAT_FOLDER>',,
'EXENAME=VIEW.EXE;PARAMETERS='installpath'script2\gemzhelp.hlp','u' )
if upgrading = '' then do
inputfile = installpath'openchat.irc'
outputfile = installpath'gmztmp.tmp'
call stream inputfile, 'command', 'open read'
call stream outputfile, 'command', 'open write'
do while Lines(inputfile) > 0
dataline = linein(inputfile)
if dataline = '^load sample.irc' then
call lineout outputfile, '#^load sample.irc'
else
if dataline = '^load openmenu.scr' then
call lineout outputfile, '#^load openmenu.scr'
else
if dataline \= '^load gemz2fp.irc' then
call lineout outputfile, dataline
end /* while */
call lineout outputfile, '^load gemz2fp.irc'
call stream inputfile, 'command', 'close'
call stream outputfile, 'command', 'close'
'@copy ' outputfile inputfile
'@del ' outputfile
say '╔══════════════════════════════════════════════════════════════╗'
say '║ Install Complete... Your openchat.irc file has been updated ║'
say '║ GemZ will be autloaded, please make sure all other scripts ║'
say '║ Have been removed from both your ircrc file and openchat.irc ║'
say '║ file. ║'
say '╚══════════════════════════════════════════════════════════════╝'
end
else do
say '╔═══════════════════════════════════╗'
say '║ Upgrade Completed... Reload GemZ ║'
say '╚═══════════════════════════════════╝'
end