home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
warpxbmp.zip
/
INSTALLX.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-11-15
|
10KB
|
267 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 WARPedBMP'
say ''
say 'This package was provided without the VXRexx Ver 2.0 VROBJ.DLL file,'
say 'in order to save D/L time for those who already have this DLL installed'
say 'on their systems. If you do not have this DLL, then WARPedBMP will not'
say 'run. If you do not have this DLL, then you should obtain it from a BBS'
say 'that carries it, or D/L the complete WARPedBMP package that includes this'
say 'file.'
say ''
say ''
say 'Determining System Configuration Please Wait...'
call SysSleep 10
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 in a directory that is in the current'
say '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 'The DLL file VROBJ.DLL cannot be located on your system.'
say ''
say 'This DLL is required for WARPedBMP to function, it is provided'
say 'as part of VXRexx or may be downloaded from many BBSs.'
say ''
say 'After installing version 2 or later of this DLL on your system'
say 'rerun this install program to install WARPedBMP on your system.'
say ''
say 'The VROBJ.DLL was not included with this copy of WARPedBMP, in order'
say 'to save d/l time for those that already have this DLL installed on'
say 'their systems. If you do not have this DLL and can not find a source'
say 'for it, you should download the version of WARPedBMP that includes this'
say 'DLL as part of the package. This version should be available on the'
say 'BBS from which you received this version that you have now.'
exit
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
say 'A different version of VROBJ.DLL was found on this system,'
say 'other than the one that WARPedBMP was compiled with.'
say 'If after this installation is complete, should WARPedBMP'
say 'not perform correctly, a version of VROBJ.DLL Ver 2.0 or'
say 'newer should be installed. This version should be'
say 'available from the BBS that you obtained this copy of'
say 'WARPedBMP from, if it is not you should d/l the complete'
say 'WARPedBMP package that contains this DLL.'
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