home *** CD-ROM | disk | FTP | other *** search
/ Encyclopedia of Graphics File Formats Companion / GFF_CD.ISO / software / os2 / gbm / bin / gbmwpobj.cmd < prev    next >
Encoding:
Text File  |  1994-04-28  |  1.4 KB  |  31 lines

  1. /* REXX exec to make the Workplace Shell objects for GBM */
  2. /* Assumes GBM installed in d:\GBM directory, and on PATH */
  3.  
  4. Call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  5. Call sysloadfuncs
  6.  
  7. If Pos('\GBM',Translate(Value('PATH',,'OS2ENVIRONMENT'))) > 0 Then Do
  8.   drive = Substr(Translate(Value('PATH',,'OS2ENVIRONMENT')),Pos('\GBM',Translate(Value('PATH',,'OS2ENVIRONMENT')))-2,2)
  9.   Say "Found "drive"\GBM on the path"
  10.   fullpath = drive||'\GBM'
  11. End
  12. Else Do
  13.   Say "Please type full path to where GBM installed (eg: D:\GBM)"
  14.   Parse Upper Pull fullpath
  15. End
  16.  
  17. rc = SysFileTree(fullpath, 'file', 'D')
  18. If file.0 <> 0 Then Do
  19.   assoc = '*.BMP,*.VGA,*.BGA,*.RLE,*.DIB,*.RL4,*.RL8,*.GIF,*.PCX,*.TIF,*.TGA,*.VST,*.AFI,*.IFF,*.LBM,*.VID,*.PGM,*.PPM,*.KPS,*.IAX,*.XBM,*.SPR'
  20.   Call SysCreateObject 'WPProgram','GbmV','<WP_DESKTOP>','EXENAME='||fullpath||'\GBMV.EXE;PROGTYPE=PM;PARAMETERS=-e %*;STARTUPDIR='||fullpath||';ASSOCFILTER='||assoc,'R'
  21.   Call SysCreateObject 'WPProgram','GbmV2','<WP_DESKTOP>','EXENAME='||fullpath||'\GBMV2.EXE;PROGTYPE=PM;PARAMETERS=%*;STARTUPDIR='||fullpath||';ASSOCFILTER='||assoc,'R'
  22.   Say "Workplace Shell Objects for GbmV and GbmV2 created on the desktop."
  23.   Say "I recommend you now remove the *.BMP/Bitmap associations from Iconedit in the"
  24.   Say "Productivity Folder and also from the ICONEDIT.EXE program."
  25. End
  26. Else Do
  27.   Say "The directory " fullpath " does not exist"
  28. End
  29.  
  30. Return 0
  31.