home *** CD-ROM | disk | FTP | other *** search
- /* COREADD for Image Toolkit Applications (SCRAP, IBROW, MAGNIFY, PMDRAW)
- */
- trace 'O'
- call 'COREENV'
- call rxfuncadd 'CADDINIT', 'RXCADD', 'CADDINIT'
- Ver = 'CAddInit'()
- if abbrev(Ver, 'ERROR:')
- then exit 200
- call setlocal
- Title = RxCAdd.STitle 'Installation'
- select
- when RxCAdd.OpType = 'ADD' then do
- XCode = InstallTK()
- end
- when RxCAdd.OpType = 'REMOVE'
- then XCode = 0
- otherwise do
- call 'MessageBox' Title, 'Unexpected operation type "'RxCAdd.OpType'"'
- XCode = 2
- end
- end
- call 'CAddComplete' XCode
- call 'CAddExit'
- exit XCode
-
- InstallTK: procedure
- CDr = value('CORE.DIR',,'OS2ENVIRONMENT')
- /** Removed - causes trap
- /* Force deletion of old data */
- call rxOs2Ini 'USER', 'Image Toolkit', '$RXDEL'
- call rxOs2Ini 'USER', 'Image Toolkit Format Info', '$RXDEL'
- **/
- '@'CDr'ITOOLKIT\ITKINSTA /IITKFMT16'
- XCode = rc
- select
- when XCode = 0
- then Msg = 'Toolkit installed.'
- when XCode = 3
- then do
- XCode = 0
- Msg = 'Toolkit was previously installed.'
- end
- otherwise Msg = 'Error' XCode 'occurred - toolkit not installed.'
- end
- if Msg <> ''
- then call 'MessageBox' 'Image Toolkit Installation', Msg
- return XCode
-