home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1994 October / SOFM_Oct1994.bin / pc / os2 / fihlib / install.cmd < prev    next >
OS/2 REXX Batch file  |  1994-07-28  |  1KB  |  59 lines

  1. /* Icon Heaven installation script */
  2. /* (C)Copyright 1993-1994 by The Frobozz Magic Software Company */
  3. Call RxFuncadd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  4. Call SysLoadFuncs
  5.  
  6. '@echo off'
  7.  
  8. app = 'IHeaven'
  9. key = 'INSTDIR'
  10.  
  11. say 'Frobozz Icon Heaven Library installer'
  12. say '(C)Copyright 1993-1994 by the Frobozz Magic Software Company'
  13. say ''
  14.  
  15. res = SysIni(, app, key)
  16.  
  17. if res ='ERROR:' then do
  18.     say 'Icon Heaven is not installed on your system'
  19.     say 'this library set cannot be installed without Icon Heaven'
  20.     say 'PLease install Icon Heaven first'
  21.     exit
  22. end
  23.  
  24. instdir=res
  25.  
  26. say 'installing libraries to directory ['instdir']'
  27.  
  28. 'pause'
  29.  
  30.  
  31.  
  32. call SysFileTree '*.fim', 'file.', 'FO'
  33.  
  34. Do i=1 to file.0
  35.     targ = instdir'\'filespec('n',file.i)
  36.     'copy' file.i targ '>nul'
  37.     cookie1 = charin(targ)
  38.     cookie2 = charin(targ)
  39.     if cookie1 = 'L' & cookie2 = 'I' then do
  40.         dum = charin(targ,,8)
  41.         n = ''
  42.         c = charin(targ)
  43.         do until c2d(c) = 0
  44.             n = n''c
  45.             c= charin(targ)
  46.         end
  47.         retval = SysCreateObject('FIMFolder', n, '<FIM_ICONS>', 'ICONLIBRARY='targ, 'U')
  48.         call stream targ,'C','CLOSE'
  49.     end
  50.     else do
  51.         call stream targ,'C','CLOSE'
  52.         'del 'targ
  53.     end
  54. End
  55.  
  56. Exit
  57.  
  58.  
  59.