home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / install / itkapps.cmd < prev    next >
Encoding:
Text File  |  1993-08-15  |  1.2 KB  |  48 lines

  1. /* COREADD for Image Toolkit Applications (SCRAP, IBROW, MAGNIFY, PMDRAW)
  2.  */
  3. trace 'O'
  4. call 'COREENV'
  5. call rxfuncadd 'CADDINIT', 'RXCADD', 'CADDINIT'
  6. Ver = 'CAddInit'()
  7. if abbrev(Ver, 'ERROR:')
  8.   then exit 200
  9. call setlocal
  10. Title = RxCAdd.STitle 'Installation'
  11. select
  12.   when RxCAdd.OpType = 'ADD' then do
  13.     XCode = InstallTK()
  14.   end
  15.   when RxCAdd.OpType = 'REMOVE'
  16.     then XCode = 0
  17.   otherwise do
  18.     call 'MessageBox' Title, 'Unexpected operation type "'RxCAdd.OpType'"'
  19.     XCode = 2
  20.   end
  21. end
  22. call 'CAddComplete' XCode
  23. call 'CAddExit'
  24. exit XCode
  25.  
  26. InstallTK: procedure
  27. CDr = value('CORE.DIR',,'OS2ENVIRONMENT')
  28. /** Removed - causes trap
  29. /* Force deletion of old data */
  30. call rxOs2Ini 'USER', 'Image Toolkit', '$RXDEL'
  31. call rxOs2Ini 'USER', 'Image Toolkit Format Info', '$RXDEL'
  32. **/
  33. '@'CDr'ITOOLKIT\ITKINSTA /IITKFMT16'
  34. XCode = rc
  35. select
  36.   when XCode = 0
  37.     then Msg = 'Toolkit installed.'
  38.   when XCode = 3
  39.     then do
  40.       XCode = 0
  41.       Msg = 'Toolkit was previously installed.'
  42.     end
  43.   otherwise Msg = 'Error' XCode 'occurred - toolkit not installed.'
  44. end
  45. if Msg <> ''
  46.   then call 'MessageBox' 'Image Toolkit Installation', Msg
  47. return XCode
  48.