home *** CD-ROM | disk | FTP | other *** search
- /* */
- '@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
- 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
- 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 'Example: D'
- baddrive = 1
- do while baddrive = 1
- pull instldrive
- select
- when instldrive \= '' & length(instldrive) > 1 then
- say 'Drive letter incorrect, do not include the colon'
- when verify(translate(instldrive),'ABCDEFGHIJKLMNOPQRSTUVWXYZ') \= 0 then
- say 'Drive letter invalid, select a different drive'
- when instldrive = '' then
- say 'You must select a drive letter to continue the installation'
- 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'
- say ''
- 'copy *.txt' instldrive||':\autobmp '
- say ''
- 'copy read*.*' instldrive||':\autobmp '
- 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 ''
- 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
-