home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
enh_e130.zip
/
PostPlug.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-12-09
|
2KB
|
48 lines
/*********************************************************/
/* Additional work for the Enhanced E installation */
/* This script is run as the "PostPlugin" at close */
/* and adds a "PlugIns" directory as well as changing */
/* "UnInstal.cmd" to remove it at uninstallation time */
/* and to remove entries made to os2.ini */
/*********************************************************/
parse source . . ThisProgram
crlf = '0d0a'x
ThisDir = Left(ThisProgram, lastpos('\', ThisProgram)-1)
UnInstall = InstDir||'\UnInstal.cmd'
/*********************************************************/
/* Make the "PlugIns" directory and move files to it */
/*********************************************************/
rc = Directory(InstDir)
rc = SysFileTree(InstDir||'\plugins','List','DO')
if List.0 = 0 then rc = SysMkDir('Plugins')
rc = SysFileTree(InstDir||'\plugins\sample.plg','List','FO')
if List.0 = 1 then rc = SysFileDelete(InstDir||'\plugins\sample.plg')
rc = SysMoveObject(InstDir||'\sample.plg',InstDir||'\plugins')
rc = SysFileTree(InstDir||'\plugins\length.plg','List','FO')
if List.0 = 1 then rc = SysFileDelete(InstDir||'\plugins\length.plg')
rc = SysMoveObject(InstDir||'\length.plg',InstDir||'\plugins')
/*********************************************************/
/* Make changes to the "UnInstal.cmd" file */
/*********************************************************/
UnInstValue = CHARIN(UnInstall,1,CHARS(UnInstall))
rc = STREAM(UnInstall,'c','close')
NewInfo1 = "rc = sysini('USER', 'EE', 'Delete:')"||crlf
NewInfo2 = "rc = sysini('USER', 'EEE', 'Delete:')"||crlf
NewInfo = NewInfo1||NewInfo2
Start = POS('/* Other work */', UnInstValue)
UnInstValue = INSERT(NewInfo,UnInstValue,start+20)
rc = SysFileDelete(UnInstall)
rc = CHAROUT(UnInstall,UnInstValue)
rc = STREAM(UnInstall,'c','close')
rc = Directory(ThisDir)
rc = SysFileDelete(InstDir||'\PrePlug.cmd')
rc = SysFileDelete(InstDir||'\PostPlug.cmd')