home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: WPS_PM / WPS_PM.zip / recurse.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1995-11-28  |  9KB  |  200 lines

  1. /* This Rexx program creates a set of sample folder setup
  2.    program objects that call recurse.cmd.  It must
  3.    be passed one argument that contains the fully qualified path
  4.    of recurse.cmd
  5. */
  6. if (length(arg(1)) = 0) then
  7. do
  8.   SAY 'Please read Recurse.inf for info on how to install'
  9.   exit
  10. end
  11.  
  12. call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
  13. call SysLoadFuncs
  14.  
  15. exename = word(arg(1),1)
  16. objsettings = 'EXENAME='exename';PROGTYPE=WINDOWABLEVIO;MINIMIZED=YES;'
  17. objsettings = objsettings'NOAUTOCLOSE=NO^;ICONFILE=RECURSE.ICO'
  18. folder='<RECURSE_FOLDER_SAMPLES>'
  19. cr=x2c(A)
  20.  
  21. /* Create the folder on the desktop */
  22. folderSetup = 'DEFAULTVIEW=ICON;ALWAYSSORT=YES;OBJECTID='folder
  23. rc = SysCreateObject('WpFolder', 'Folder Setup Samples', '<WP_DESKTOP>',folderSetup, 'replace')
  24.  
  25. objsettings=objsettings";DEFAULTVIEW=SETTINGS"
  26. /***************************************************************************/
  27. /*  Create The Template                                                    */
  28. /***************************************************************************/
  29. title = 'Recursive Setting'cr'Template'
  30. setup=objsettings";PARAMETERS=%* <put setting here>;TEMPLATE=YES"
  31. rc = SysCreateObject('WpProgram', title, folder, setup, 'replace')
  32.  
  33. /***************************************************************************/
  34. /*  Create Default View Objects                                            */
  35. /***************************************************************************/
  36. title = 'Default View Settings'
  37. thisFolder='<RECURSE_SAMPLES_DEFAULT_VIEW>'
  38. folderSetup = 'DEFAULTVIEW=ICON;ALWAYSSORT=YES;OBJECTID='thisFolder
  39. rc = SysCreateObject('WpFolder', title, folder, folderSetup, 'replace')
  40.  
  41. title = 'Set Default View to'cr'Details View'
  42. setup=objsettings";PARAMETERS=%* DEFAULTVIEW=DETAILS"
  43. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  44.  
  45. title = 'Set Default View to'cr'Icon View'
  46. setup=objsettings";PARAMETERS=%* DEFAULTVIEW=ICON"
  47. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  48.  
  49. title = 'Set Default View to'cr'Tree View'
  50. setup=objsettings";PARAMETERS=%* DEFAULTVIEW=TREE"
  51. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  52.  
  53. title = 'Set Default View to'cr'Default'
  54. setup=objsettings";PARAMETERS=%* DEFAULTVIEW=DEFAULT"
  55. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  56.  
  57. /***************************************************************************/
  58. /*  Create View Setting Objects                                            */
  59. /***************************************************************************/
  60. title = 'View Settings'
  61. thisFolder='<RECURSE_SAMPLES_VIEW>'
  62. folderSetup = 'DEFAULTVIEW=ICON;ALWAYSSORT=YES;OBJECTID='thisFolder
  63. rc = SysCreateObject('WpFolder', title, folder, folderSetup, 'replace')
  64.  
  65. title = 'Set Icon View to'cr'Mini Icons'
  66. setup=objsettings";PARAMETERS=%* ICONVIEW=MINI"
  67. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  68.  
  69. title = 'Set Icon View to'cr'Normal Icons'
  70. setup=objsettings";PARAMETERS=%* ICONVIEW=NORMAL"
  71. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  72.  
  73. title = 'Set Tree View to'cr'Mini Icons'
  74. setup=objsettings";PARAMETERS=%* TREEVIEW=MINI"
  75. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  76.  
  77. title = 'Set Tree View to'cr'Normal Icons'
  78. setup=objsettings";PARAMETERS=%* TREEVIEW=NORMAL"
  79. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  80.  
  81. title = 'Set Details View to'cr'Mini Icons'
  82. setup=objsettings";PARAMETERS=%* DETAILSVIEW=MINI"
  83. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  84.  
  85. title = 'Set Details View to'cr'Normal Icons'
  86. setup=objsettings";PARAMETERS=%* DETAILSVIEW=NORMAL"
  87. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  88.  
  89. title = 'Set All Views to'cr'Mini Icons'
  90. setup=objsettings";PARAMETERS=%* ICONVIEW=MINI^;TREEVIEW=MINI^;DETAILSVIEW=MINI"
  91. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  92.  
  93. title = 'Set All Views to'cr'Normal Icons'
  94. setup=objsettings";PARAMETERS=%* ICONVIEW=NORMAL^;TREEVIEW=NORMAL^;DETAILSVIEW=NORMAL"
  95. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  96.  
  97. title = 'Set All Views to'cr'Default Icons'
  98. setup=objsettings";PARAMETERS=%* ICONVIEW=DEFAULT^;TREEVIEW=DEFAULT^;DETAILSVIEW=DEFAULT"
  99. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  100.  
  101. /***************************************************************************/
  102. /*  Create Background Setting Objects                                      */
  103. /***************************************************************************/
  104. title = 'Background Settings'
  105. thisFolder='<RECURSE_SAMPLES_BACKGROUND>'
  106. folderSetup = 'DEFAULTVIEW=ICON;ALWAYSSORT=YES;OBJECTID='thisFolder
  107. rc = SysCreateObject('WpFolder', title, folder, folderSetup, 'replace')
  108.  
  109. title = 'Set Red Background'
  110. setup=objsettings";PARAMETERS=%* BACKGROUND=(none),,,C,128 0 0"
  111. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  112.  
  113. title = 'Set Green Background'
  114. setup=objsettings";PARAMETERS=%* BACKGROUND=(none),,,C,0 128 0"
  115. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  116.  
  117. title = 'Set Blue Background'
  118. setup=objsettings";PARAMETERS=%* BACKGROUND=(none),,,C,0 0 128"
  119. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  120.  
  121. title = 'Set White Background'
  122. setup=objsettings";PARAMETERS=%* BACKGROUND=(none),,,C,255 255 255"
  123. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  124.  
  125. /* Try and figure out the boot drive by looking at an environment
  126.    variable.  This won't always work, but there aren't likely many
  127.    machines where this has been fiddled with
  128. */
  129. env = 'OS2ENVIRONMENT'
  130. bootDrive = left(VALUE('SYSTEM_INI',,env),2)
  131.  
  132.  
  133. title = 'Set Wood Background'
  134. setup=objsettings";PARAMETERS=%* BACKGROUND="bootDrive"\os2\bitmap\wood.bmp,T,1,I"
  135. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  136.  
  137. /***************************************************************************/
  138. /*  Create Font Objects                                                    */
  139. /***************************************************************************/
  140. title = 'Font Settings'
  141. thisFolder='<RECURSE_SAMPLES_FONTS>'
  142. folderSetup = 'DEFAULTVIEW=ICON;ALWAYSSORT=YES;OBJECTID='thisFolder
  143. rc = SysCreateObject('WpFolder', title, folder, folderSetup, 'replace')
  144.  
  145. title = 'Set Icon Font To'cr'12 Pt Helv'
  146. setup=objsettings";PARAMETERS=%* ICONFONT=12.Helv"
  147. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  148.  
  149. title = 'Set Icon Font To'cr'12 Pt Helv Bold'
  150. setup=objsettings";PARAMETERS=%* ICONFONT=12.Helv.Bold"
  151. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  152.  
  153. title = 'Set Icon Font To'cr'Default'
  154. setup=objsettings";PARAMETERS=%* ICONFONT=Default"
  155. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  156.  
  157. title = 'Set Tree Font To'cr'12 Pt Helv'
  158. setup=objsettings";PARAMETERS=%* TREEFONT=12.Helv"
  159. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  160.  
  161. title = 'Set Tree Font To'cr'12 Pt Helv Bold'
  162. setup=objsettings";PARAMETERS=%* TREEFONT=12.Helv.Bold"
  163. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  164.  
  165. title = 'Set Tree Font To'cr'Default'
  166. setup=objsettings";PARAMETERS=%* TREEFONT=Default"
  167. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  168.  
  169. title = 'Set Details Font To'cr'12 Pt Helv'
  170. setup=objsettings";PARAMETERS=%* DETAILSFONT=12.Helv"
  171. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  172.  
  173. title = 'Set Details Font To'cr'12 Pt Helv Bold'
  174. setup=objsettings";PARAMETERS=%* DETAILSFONT=12.Helv.Bold"
  175. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  176.  
  177. title = 'Set Details Font To'cr'Default'
  178. setup=objsettings";PARAMETERS=%* DETAILSFONT=Default"
  179. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  180.  
  181. /***************************************************************************/
  182. /*  Create Complex Setup Objects                                           */
  183. /***************************************************************************/
  184. title = 'Complex Setup Objects'
  185. thisFolder='<RECURSE_SAMPLES_COMPLEX>'
  186. folderSetup = 'DEFAULTVIEW=ICON;ALWAYSSORT=YES;OBJECTID='thisFolder
  187. rc = SysCreateObject('WpFolder', title, folder, folderSetup, 'replace')
  188.  
  189. title = 'Set Wood Background, Default Details View,'cr'Large Icons, Always Sort'cr'8 Pt. Italic Helv Font'
  190. setup=objsettings";PARAMETERS=%* BACKGROUND="bootDrive"\os2\bitmap\wood.bmp,T,1,I^;"
  191. setup=setup"DEFAULTVIEW=DETAILS^;DETAILSVIEW=NORMAL^;ALWAYSSORT=YES^;DETAILSFONT=8.Helv.Italic"
  192. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  193.  
  194. title = 'Set Default Background, Default Icon View'cr'Always Sort, Invisible Icons,'cr'Flowed View'
  195. setup=objsettings";PARAMETERS=%* BACKGROUND=default^;DEFAULTVIEW=ICON^;"
  196. setup=setup"ALWAYSSORT=YES^;ICONVIEW=INVISIBLE^,FLOWED"
  197. rc = SysCreateObject('WpProgram', title, thisFolder, setup, 'replace')
  198.  
  199.  
  200.