home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 March / PCO3_97.ISO / filesbbs / os2 / lartb307.arj / ARTB307.ZIP / makefldr.cmd < prev    next >
Encoding:
Text File  |  1996-12-05  |  2.0 KB  |  78 lines

  1. /*
  2. ** WORKLab, Krebber
  3. ** create LogoArt Folder and Data-Objects on Desktop
  4. */
  5.  
  6. hyellow  ='A'
  7. hwhite   ='A'
  8. nline    = "0D0A"x                                        /* new line */
  9.  
  10. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  11. call sysloadfuncs
  12.  
  13. parse arg version wait
  14.  
  15. if version = "" then
  16.    version = "B30X";
  17. folder_id="<FLDR_LOGOART_"||version||">";
  18. clipart_id="<FLDR_CLIPART_"||version||">";
  19. program_id="<LOGOART_"||version||">";
  20.  
  21. say hyellow nline
  22. say "Starting with LogoArt folder generation V."||version
  23. say "All previous objects of this same version will be replaced"
  24. say hwhite nline
  25. if wait \= "" then do
  26.    say "Press Enter to continue.."
  27.    pull
  28. end
  29. say "creating folders"
  30. clipart_path = directory()||"\CLIPART"
  31. call create_folders clipart_path
  32. if result>0 then do
  33.    say "creating program object"
  34.    call create_program
  35. end
  36.  
  37. say hyellow nline
  38. say "Done with LogoArt folder generation."
  39. say hwhite nline
  40. exit;
  41.  
  42. /*
  43. ** create folders
  44. */
  45. create_folders:
  46.  
  47.    parse arg path
  48.  
  49.    /* create data type in os2.ini */
  50.    call SysIni 'USER', 'PMWP_ASSOC_TYPE', 'LogoArt', ''
  51.  
  52.    /* create main folder (replace if exists) */
  53.    rc = SysCreateObject(WPFolder, "LogoArt", "<WP_DESKTOP>", "TREEVIEW=LINES,MINI;OBJECTID="||folder_id, "R");
  54.  
  55.    /* and shadow to clipart directory (folder and subfolders will be automatically created) */
  56.    rc = SysCreateObject("WPShadow", "Clipart", folder_id, "SHADOWID="||path||";"||dataicon||"ASSOCTYPE=LogoArt;OBJECTID="||clipart_id, "R");
  57.  
  58. return rc;
  59.  
  60. /*
  61. ** create program object
  62. */
  63.  
  64. create_program:
  65. /* assuming all executables are on current directory .. */
  66. title = "LogoArt "||version
  67. name= "EXENAME="||directory()||"\logoart.exe;"
  68. icon= "ICONFILE="||directory()||"\LogoArt.ico;"
  69. defdir="STARTUPDIR="||directory()||";"
  70. assoc="ASSOCTYPE=LogoArt;ASSOCFILTER=*.art;"
  71.  
  72. vals = "PROGTYPE=PM;"||name||icon||defdir||assoc||"OBJECTID="||program_id;
  73. rc = SysCreateObject(WPProgram, title, folder_id, vals, "R");
  74.  
  75. return rc;
  76.  
  77.  
  78.