home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
warpdbmp.zip
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-11-11
|
9KB
|
258 lines
/* */
'@echo off'
cls
say 'Starting The OS/2 RexxUtil Functions Please Wait...'
say ''
Call RxFuncadd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
Call SysLoadFuncs
if RxFuncQuery('SysCls') <> 0 then do
say 'RexxUtil Functions Not Installed On This System!!!!!'
say 'These functions must be installed before WARPedBMP can be used.'
say 'The RexxUtil Functions are provided as part of OS/2, the.'
say 'OS/2 Selective Install Function can be used to install them.'
say ' '
exit
end
parse source na na drivepath
found = lastpos('\',drivepath)
drivepath = left(drivepath,(found - 1))
colon = pos(':',drivepath)
instldrv = left(drivepath,colon)
instldrv
'cd' drivepath
call SySCLs
say 'INSTALLING AutoBMP'
say ''
say 'Determining System Configuration Please Wait...'
map = sysdrivemap()
say ''
say 'Available Drives: ' map
say ''
maxdrive = words(map)
vxdll.0 = 0
env = 'OS2ENVIRONMENT'
tst_path = value('PATH',,env)
os2 = pos(':\OS2',tst_path)
os2 = os2 - 1
os2drv = substr(tst_path,os2,1)
configfile = os2drv||':\config.sys'
vxdll. = 0
ok = sysfiletree(configfile,'vxdll','F')
if vxdll = 0 then do
say 'Can not locate OS/2 Config.Sys file, to determine LIBPATH,'
say 'VROBJ.DLL, must be manually installed into a directory'
say 'in the current OS/2 LIBPATH'
end
else do
found = 'no'
say 'Searching system for VROBJ.DLL'
say ''
do until found = 'yes'
dllpath = linein(configfile)
test = lines(configfile)
parse value dllpath with one '=' foundlibpath
select
when translate(one) = 'LIBPATH' then do
curr = setlocal()
os2drv||':'
'cd \os2\dll'
'set testpath='||foundlibpath
filedll = syssearchpath('TESTPATH','VROBJ.DLL')
curr = endlocal()
if filedll = '' then do
say 'Copying VrObj.dll to' os2drv||':\os2\dll'
say ''
say 'This DLL is required for AutoBMP to function, by copying'
say 'it to this directory, AutoBMP will be able to be started'
say 'without rebooting the system to initialize the dll location.'
say ''
say 'After AutoBMP is installed you may move this DLL to any'
say 'directory that is in your OS/2 LIBPATH, if you wish.'
say ''
'copy vrobj.dll' os2drv||':\os2\dll'
say ''
end
else do
say 'Installed: ' filedll
call SysFileTree filedll,dllspec
if word(dllspec.1,3) = 819593 then do
say 'The required version of VROBJ.DLL is already installed'
say ''
end
else do
period = pos('.',filedll)
old = left(filedll,period)||'OLD'
say 'A different version of VROBJ.DLL is already installed on this system.'
say 'Copying current VROBJ.DLL to VROBJ.OLD.'
'copy' filedll old
say 'Installing new VROBJ.DLL to:' filedll
copy vrobj.dll filedll
say 'If after this installation is complete, if other'
say 'applications that use VROBJ.DLL do not function'
say 'correctly, you may need to replace this DLL with'
say 'your original which was saved as VROBJ.OLD. If there'
say 'no problems with your current applications, then'
say 'the VROBJ.OLD can be safely deleted from your system.'
say ''
say ''
end
end
leave
end
when test = 0 then do
call lineout configfile
say 'Can not locate LIBPATH in Config.Sys file,'
say 'use manual install method for VROBJ.DLL file'
end
otherwise
nop
end
end
call lineout configfile
/* search for old installation of AutoBMP */
dirs = '\autobmp \warpbmp'
do k = 1 to words(dirs)
searchdir = word(dirs,k)
searchdir1 = translate(substr(searchdir,2))
do i = 1 to words(map)
autodir. = 0
ok = sysfiletree(word(map,i)||searchdir,'autodir','DO')
if autodir.0 > 0 then do
do j = 1 to autodir.0
if pos(searchdir1,translate(autodir.j)) > 0 then do
say 'Prior version of AutoBMP or WARPedBMP found, updating Directory.'
olddir = 'yes'
installdir = autodir.j
installdrive = left(autodir.j,2)
leave k
end
end
end
end
end
if olddir \= 'yes' then do
say 'The drive/directory that WARPedBMP is installed on will also contain the'
say 'archive file containing all of the BitMaps that are stored by WARPedBMP.'
say ''
say 'Select a drive that has sufficient space for this archive.'
say ''
say 'Enter Drive Letter To Install WARPedBMP On: (do not include the colon)'
say 'Example: D'
baddrive = 1
do while baddrive = 1
pull installdrive
select
when installdrive \= '' & length(installdrive) > 1 then
say 'Drive letter incorrect, do not include the colon'
when verify(translate(installdrive),'CDEFGHIJKLMNOPQRSTUVWXYZ') \= 0 then
say 'Drive letter invalid, select a different drive'
when installdrive = '' then
say 'You must select a drive letter to continue the installation'
otherwise do
status = sysdriveinfo(installdrive||':')
if status \= '' then
baddrive = 0
else
say 'Drive selection is not valid, select a valid drive to continue'
end
end
end
installdrive = installdrive||':'
installdir = installdrive||'\WARPBMP'
call SySCLs
say 'Creating WARPBMP Directory & Installing Files'
md installdir
end
say ''
'copy WARPBMP.exe' installdir
'copy WARPBMP.ico' installdir
say ''
'copy *.txt' installdir
say ''
'copy *.me' installdir
say ''
'copy *.new' installdir
if olddir = 'yes' then do
ok = sysfiledelete(installdir||'\autobmp.exe')
ok = sysfiledelete(installdir||'\autobmp.ico')
curr = setlocal()
installdrive
'cd' installdir
ok = sysfiletree('autobmp.ini','test','F')
if test.0 > 0 then
'rename autobmp.ini warpbmp.ini > nul'
ok = sysfiletree('autobmp.zip','test','F')
if test.0 > 0 then
'rename autobmp.zip warpbmp.zip > nul'
ok = sysfiletree('autobmp.lzh','test','F')
if test.0 > 0 then
'rename autobmp.lzh warpbmp.lzh > nul'
os2drv||':'
'cd \os2\bitmap'
ok = sysfiletree('autobmp.bmp','test','F')
if test.0 > 0 then
'copy autobmp.bmp warpbmp.bmp > nul'
curr = endlocal()
end
say ''
say 'Creating/Updating WARPedBMP DesKTop OBject'
classname='WPProgram'
title= 'WARPedBMP '
location= '<WP_DESKTOP>'
setup= 'OBJECTID=<AutoBMP>;'||,
'EXENAME='installdir||'\WARPBMP.EXE;'||,
'STARTUPDIR='installdir||';'
Call BldObj
say ''
say 'Creating/Updating WARPBMP StartUp Folder OBject'
classname='WPProgram'
title= 'WARPedBMP Chg DeskTop'
location= '<WP_START>'
setup= 'OBJECTID=<AutoBMP_Change>;'||,
'EXENAME='installdir||'\WARPBMP.EXE;'||,
'PARAMETERS=CHANGE;'||,
'STARTUPDIR='installdir||';'
Call BldObj
say ''
say 'WARPedBMP has been installed, starting WARPedBMP and processing WARPBMP.INI'
say ''
installdrive
'cd' installdir
WARPBMP
say ''
say 'WARPedBMP installation complete...'
say ''
end
Return
/* Build Object(s), this builds the objects and displays the completion
status of each build.*/
BldObj:
call charout,'Building: 'title
/* Build object using REPLACE as duplicateflag */
result = SysCreateObject(classname, title, location, setup, 'R')
If result=1 Then call charout ,'... Object created!'
Else call charout ,'... Not created! Return code='result
Say '';
Return