home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: OtherApp
/
OtherApp.zip
/
efz.zip
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-09-26
|
6KB
|
143 lines
/****************************************************************/
/* Installation Procedure for IBM Tutorial Manager/2 Demo */
/* */
/****************************************************************/
/* Overall function: */
/* -Initialization */
/* -Determine Target drive and subdirectory */
/* -Install */
/* -Copy files to target directories */
/* -Unpack */
/* -erase packed files */
/* -Create Folder and Objects */
/* -Tell installer about progress and completion */
/****************************************************************/
/* initialization */
'@ECHO OFF'
ver = os2ver()
if ver>=2 then do
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
end
/* menu to determine where it should be installed */
idrive = 'C'
ipath='\TMDEMO'
do until ok='Y'
'CLS'
say '******************************************************************'
say '*** IBM Tutorial Manager/2 Demo Installation ***'
say '*** Installation Target ***'
say '*** ***'
say '*** Install on Drive: 'idrive' ***'
say '*** in Directory: 'ipath||copies(' ',40-length(ipath))'***'
say '*** ***'
say '******************************************************************'
say 'OK? Please enter (Y)es, (N)o or (Q)uit'
pull ok; ok=strip(ok); ok=left(ok,1)
if ok='Q' then exit
if ok='N' then do
say ' '
say 'Enter drive: '
pull idrive
idrive = left(idrive,1)
say 'Enter path: '
pull ipath
if left(ipath,1)<>'\' then ipath = '\'ipath
end /* of if ok=no */
end /* of do until ok=yes */
/****************************************************************/
/* Install the diskettes */
/* */
/****************************************************************/
/* install it */
idrive':' /* get to the drive */
'MD' ipath /* and directory */
'CD' ipath
say 'Copying packed demo to fixed disk...'
'COPY A:demo2.XEX > NUL'
'RENAME demo2.XEX demo2.EXE > NUL'
say 'Unpacking demo....'
'demo2 -o > NUL'
say 'Deleting self-extracting file ....'
'ERASE demo2.EXE'
/****************************************************************/
/* Optionally create the TutMgr Folder and Objects */
/****************************************************************/
if ver>=2 then do
say 'Creating WPS objects ...'
object.class = 'WPFolder'
object.title = 'IBM Tutorial Manager/2 Demos'
object.location = '<WP_DESKTOP>'
object.setup = 'OBJECTID=<WP_TUTMGRFOLDER>;'
object.update = 'UPDATE'
Created = BldObj()
object.class = 'WPProgram'
object.title = 'Overview Demo'
object.location = '<WP_TUTMGRFOLDER>'
object.setup = 'EXENAME='idrive':'ipath'\efztmmnl.exe;'
object.setup = object.setup'STARTUPDIR='idrive':'ipath';'
object.setup = object.setup'PARAMETERS=demo.pac /nobookmark;'
Created = BldObj()
end /* of if ver>=2 */
say ' '
say ' '
say '******************************************************************'
say '*** IBM Tutorial Manager/2 Demo Installation ***'
say '*** ***'
say '*** Installation Completed. ***'
say '*** ***'
if ver>=2 then do
say '*** The TutMgr/2 folder and the demo objects have been created.***'
say '*** ***'
end
say '*** For additional information please see the READ.ME file on ***'
say '*** the diskette. ***'
say '*** ***'
say '*** To start the demo enter DEMO here on ***'
say '*** the command line or use the objects generated on the WPS ***'
say '*** (OS/2 V2.x only). ***'
say '*** ***'
say '******************************************************************'
exit
/****************************************************************/
/* Get the OS/2 Version */
/* */
/****************************************************************/
OS2Ver: procedure
PreQ = queued()
'@VER | RXQUEUE /LIFO'
Output = ''
do while queued() > PreQ
Output = Output linein('QUEUE:')
end
Ver = '?'
do while Output <> '' & Ver = '?'
parse var Output Test Output
if verify(Test, '0123456789.') = 0 then Ver = Test
end
return Ver
/****************************************************************/
/* Build Object - create an object */
/* */
/****************************************************************/
BldObj: Procedure Expose object.
result = SysCreateObject(object.class, object.title, object.location,,
object.setup, object.update) /* Generic create using global var */
If result<>1 Then Do
Say object.title 'not created, return code='result
end
else say object.title 'object created'
Return result