home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: SysTools
/
SysTools.zip
/
btask10a.zip
/
install.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-12-03
|
4KB
|
142 lines
/************************************************************
The Btask Installation procedure
(REXX must be installed on your system)
Version 1.01 (C)1995 EDM Software, ALL RIGHTS RESERVED
*************************************************************/
'@Echo off'
'cls'
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
call banner 'Components Check'
say'Checking for components...'
call check 'BTask.exe'
call check 'Btask.inf'
call check 'Btask.txt'
/*call check 'Warptask.exe'*/
call check 'btaskdll.dll'
say 'All needed components found.'
call banner 'Installation Directory'
say 'Press [Enter] to begin BTask Installation.'
say ''
pull dummy .
say ''
instdir='C:\OS2\APPS\BTask'
dlldir='C:\OS2\APPS\DLL'
exename='BTask.exe'
call banner 'Installation directory'
say 'The default installation directory for BTask is ' instdir
say 'Do you want to change it ? (N)'
parse upper pull dummy
if dummy = 'Y' then do
say 'Enter new installation path :'
parse upper pull instdir
end
call checkdir instdir
say ''
call banner 'DLL Installation'
say ''
say 'IN ORDER TO WORK, BTASK MUST FIND ITS DLL. THE DLL MUST RESIDE'
say 'IN A DIRECTORY SPECIFIED IN THE LIBPATH ENTRY OF YOUR CONFIG.SYS.'
say ''
say 'The default directory for the DLL is C:\OS2\APPS\DLL.'
say 'Do you want tho change it ? (N)'
parse upper pull dummy
if dummy = 'Y' then
do
say 'Enter new DLL path :'
parse upper pull dlldir
end
call checkdir dlldir
call banner 'Installing files...'
say 'Copying program and manual...'
'copy 'exename' 'instdir
'copy Btask.inf ' instdir
'copy Btask.txt ' instdir
say 'Copying DLl...'
'copy btaskdll.dll ' dlldir
say 'Done.'
call banner 'WPS Migration'
call SysDestroyObject('<BTsk_Folder>')
say "Creating BTask folder..."
title = "BTask"
classname = 'WPFolder'
location = '<WP_DESKTOP>'
setup = 'OBJECTID=<BTsk_Folder>;OPEN=DEFAULT'
call SysCreateObject classname,title,location,setup,f
say 'Creating Objects...'
title = "BTask"
classname = 'WPProgram'
location = '<BTsk_Folder>'
setup = 'EXENAME='instdir'\'exename';PARAMETERS=%*;STARTUPDIR='instdir
call SysCreateObject classname,title,location,setup,u
title = "BTask Manual"
classname = 'WPProgram'
location = '<BTsk_Folder>'
setup = 'EXENAME=?:\OS2\VIEW.EXE;PARAMETERS='instdir'\BTask.inf'
call SysCreateObject classname,title,location,setup,u
title = "BTask Manual (ASCII)"
classname = 'WPProgram'
location = '<BTsk_Folder>'
setup = 'EXENAME=?:\OS2\E.EXE;PARAMETERS='instdir'\BTask.txt'
call SysCreateObject classname,title,location,setup,u
say 'Installation complete.'
exit
check: procedure
rc = stream(ARG(1),'c','query exists')
if rc = '' then
do
call banner 'ERROR ERROR ERROR ERROR ERROR'
say 'The component file 'ARG(1)' was not found.'
say 'You must run this program from the directory where you unpacked the archive.'
exit
end
return
checkdir: procedure
parse upper arg DIR;
curdir=directory()
tstdir=directory(DIR);
if tstdir\=DIR then
do
'mkdir 'DIR
end
tstdir=directory(DIR);
if tstdir\=DIR then
do
call banner 'ERROR ERROR ERROR ERROR ERROR'
say 'An invalid path was specified.'
say tstdir ' -' DIR
say 'Correct the problem and run the installation program again.'
tstdir=directory(curdir)
exit
end
tstdir=directory(curdir)
return
banner: procedure
call SysCls
say' 'ARG(1)
say' ┌───────────────────────────────────────────────────────────────────┐'
say' │ The BTask Installation Procedure │'
say' │ BTask is Copyright 1995 by Enrico Demarin │'
say' │ All rights reserved │'
say' └───────────────────────────────────────────────────────────────────┘'
say ''
return