home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: WPS_PM
/
WPS_PM.zip
/
autobmp.zip
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-09-04
|
6KB
|
172 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 'AutoBMP must be installed manually, see AutoBMP installation'
say 'instructions for this procedure.'
say ' '
exit
end
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 'VROBJ.DLL is already installed on this system. If after'
say 'AutoBMP installation is completed, if AutoBMP does not run correctly,'
say 'then the VROBJ.DLL that you have may not be the latest version'
say 'that is available. You should replace your current VROBJ.DLL'
say 'with the one that is included with AutoBMP. This change was'
say 'not done automaticly by this install program, to insure that'
say 'any programs that you currently use that depend upon this DLL'
say 'can be tested by you to determine if they can use the newer'
say 'version of this DLL that is supplied with AutoBMP.'
say ''
say ''
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
say 'The drive/directory that AutoBMP is installed on will also contain the'
say 'archive file containing all of the BitMaps that are stored by AutoBMP.'
say ''
say 'Select a drive that has sufficient space for this archive.'
say ''
say 'Enter Drive Letter To Install AutoBMP On: (do not include the colon)'
say 'Exampl:e D'
baddrive = 1
do while baddrive = 1
pull instldrive
select
when length(instldrive) > 1 then
say 'Drive letter incorrect, do not include the colon'
otherwise do
status = sysdriveinfo(instldrive||':')
if status \= '' then
baddrive = 0
else
say 'Drive selection is not valid, select a valid drive to continue'
end
end
end
call SySCLs
say 'Creating AutoBMP Directory & Installing Files'
md instldrive||':\autobmp > nul'
say ''
copy 'autobmp.exe' instldrive||':\autobmp'
copy 'autobmp.ico' instldrive||':\autobmp'
copy '*.txt' instldrive||':\autobmp > nul'
say ''
say 'Creating AutoBMP DesKTop OBject'
classname='WPProgram'
title= 'AutoBMP '
location= '<WP_DESKTOP>'
setup= 'OBJECTID=<AutoBMP>;'||,
'EXENAME='instldrive||':\autobmp\autobmp.EXE;'||,
'STARTUPDIR='instldrive||':\autobmp;'
Call BldObj
say ''
say 'Creating AutoBMP StartUp Folder OBject'
classname='WPProgram'
title= 'AutoBMP Chg DeskTop'
location= '<WP_START>'
setup= 'OBJECTID=<AutoBMP_Change>;'||,
'EXENAME='instldrive||':\autobmp\autobmp.EXE;'||,
'PARAMETERS=CHANGE;'||,
'STARTUPDIR='instldrive||':\autobmp;'
Call BldObj
say ''
say 'AutoBMP has been installed, starting AutoBMP and creating AutoBMP.INI'
say ''
instldrive||':'
cd instldrive||':\autobmp'
autobmp
say 'AutoBMP installation complete...'
say ''
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