home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / afinstd.zip / AFINSTD.CMD < prev    next >
OS/2 REXX Batch file  |  1996-02-15  |  10KB  |  229 lines

  1. /*
  2.  * Allfix/2 1.x WPfolder Installation Program copyright (c) 1995, 1996
  3.  * by Scott Drake of Innovative Solutions 1;2630/212
  4.  *
  5.  * This program creates a folder to hold program objects, then creates
  6.  * program objects for each executable.  It only needs to be run once
  7.  * (unless you move the Allfix directory -- see say notes at end).  Run
  8.  * this program in the Allfix directory (where you unpacked the archive).
  9.  */
  10.  
  11. /* see if we might be in the right directory... */
  12.  
  13. '@Echo off'
  14. 'cls'
  15.  
  16. say ''
  17. say ''
  18. say '┌─────────────────────────────────────────────────────────────────────────────'
  19. say '│ ┌─────────────────────────────────────────────────────────────────────────┐ │'
  20. say '│ │                 Allfix 4.x WPfolder Installation Program                │ │'
  21. say '│ │                  Copyright (c) 1995, 1996 by Scott Drake                │ │'
  22. say '│ │         Allfix v4.x is Copyrighted (c) 1992-96 by Harald Harms          │ │'
  23. say '│ │                          All rights reserved                            │ │'
  24. say '│ └─────────────────────────────────────────────────────────────────────────┘ │'
  25. say '│ ┌─────────────────────────────────────────────────────────────────────────┐ '
  26. say '│ │          Have you read the ALLFIX.DOC or ALLFIX.INF file yet?           │ '
  27. say '│ │           By running this program, you agree to the license             │ '
  28. say '│ │                       as specified in that file,                        │ '
  29. say '│ │      and it tells you how to install ALLFIX, so you should read it.     │ '
  30. say '│ │                                 Please?                                 │ '
  31. say '│ ─────────────────────────────────────────────────────────────────────────┘ '
  32. say '─────────────────────────────────────────────────────────────────────────────┘'
  33. say ''
  34. say ''
  35.  
  36. /*
  37.  * allow user to eliminate associations from being placed on AV/2.
  38.  * seemed to upset some fellow on CIS (I guess he doesn't know about
  39.  * Settings notebooks on WPS objects).
  40.  */
  41. assocfilter = ';ASSOCFILTER=*.ZIP,*.ARC,*.LZH,*.ARJ,*.ZOO,*.MO0,READ.ME,README,README.1ST,README.OS2,REGISTER.TXT'
  42. existed = ''
  43. parse upper arg dummy
  44. if dummy = 'NOASSOC' then assocfilter = ''
  45.  
  46. rc = stream('allfix.exe','c','query exists')
  47. if rc = '' then
  48. do
  49.   say 'Sorry, ALLFIX.EXE not found.  Must not be right directory.  Terminating.'
  50.   exit
  51. end
  52.  
  53. /* tell user what we're doing, give him a chance to hit CTRL-C */
  54.  
  55. say ''
  56. say 'This program creates Desktop objects for Allfix [DOS]. If you do not want'
  57. say 'create the Desktop Objects, say press CTRL + C the press Enter.'
  58. say ''
  59.  
  60.  
  61.  
  62. say 'Press [Enter] to continue...'
  63. pull dummy .
  64. say ''
  65.  
  66.  
  67. /* save current directory */
  68.  
  69. curdir = directory()
  70.  
  71. /* load rexx utility functions */
  72.  
  73. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  74. call SysLoadFuncs
  75.  
  76. /* say it, then do it */
  77.  
  78. 'cls'
  79. say ''
  80. say ''
  81. say ''
  82. say "Creating The Allfix [DOS] FileEcho Processor folder and objects..."
  83.  
  84. /* first, create Allfix folder */
  85.  
  86. rc = stream('affldr.ico','c','query exists')
  87. title = "Allfix [DOS] FileEcho^ Processor"
  88. classname = 'WPFolder'
  89. location = '<WP_DESKTOP>'
  90. setup = 'OBJECTID=<Allfix_Folder>;OPEN=DEFAULT'
  91. if rc \= '' then setup = setup';ICONFILE='rc
  92. result=SysCreateObject(classname,title,location,setup,f)
  93.  
  94. /* NOTE:  remove following 9 lines for unattended use... */
  95. if result = 0 then
  96. do
  97.   assocfilter = ''
  98.   existed = 'TRUE'
  99.   say ''
  100.   say 'The Allfix [DOS] FileEcho Processor folder already exists.'
  101.   say 'Should I update the objects? (Y/n)'
  102.   parse upper pull dummy
  103.   if left(dummy,1) = 'N' then exit
  104.   say ''
  105. end
  106.  
  107. /* now, create program objects in Allfix folder */
  108.  
  109. title = "Allfix v4.32^ FileEcho Processor"
  110. classname = 'WPProgram'
  111. location = '<Allfix_Folder>'
  112. setup = 'OBJECTID=<Allfix v4.32>;EXENAME='curdir'\ALLFIX.EXE;STARTUPDIR='curdir
  113. if existed = '' then setup = setup';PARAMETERS=%*'
  114. call SysCreateObject classname,title,location,setup,u
  115.  
  116. title = "Allfix v4.32^ Configuration"
  117. classname = 'WPProgram'
  118. location = '<Allfix_Folder>'
  119. setup = 'OBJECTID=<Allfix Configuration>;EXENAME='curdir'\ASETUP.EXE;STARTUPDIR='curdir
  120. if existed = '' then setup = setup';PARAMETERS=%*'
  121. call SysCreateObject classname,title,location,setup,u
  122.  
  123. title = "Allfix v4.32^ File Hatch"
  124. classname = 'WPProgram'
  125. location = '<Allfix_Folder>'
  126. setup = 'OBJECTID=<Allfix v4.32 File Hatch>;EXENAME='curdir'\HATCH.EXE;STARTUPDIR='curdir
  127. if existed = '' then setup = setup';PARAMETERS=%*'
  128. call SysCreateObject classname,title,location,setup,u
  129.  
  130. title = "Allfix v4.32^ Fix Utility"
  131. classname = 'WPProgram'
  132. location = '<Allfix_Folder>'
  133. setup = 'OBJECTID=<Allfix Utility>;EXENAME='curdir'\FIXUTIL.EXE;STARTUPDIR='curdir
  134. if existed = '' then setup = setup';PARAMETERS=%*'
  135. call SysCreateObject classname,title,location,setup,u
  136.  
  137. title = "Allfix v4.32^ Update Utility"
  138. classname = 'WPProgram'
  139. location = '<Allfix_Folder>'
  140. setup = 'OBJECTID=<Allfix Update Utility>;EXENAME='curdir'\UPDATE.EXE;STARTUPDIR='curdir
  141. if existed = '' then setup = setup';PARAMETERS=%*'
  142. call SysCreateObject classname,title,location,setup,u
  143.  
  144. title = "Allfix v4.32^ File Area Compilier"
  145. classname = 'WPProgram'
  146. location = '<Allfix_Folder>'
  147. setup = 'OBJECTID=<Allfix v4.32 File Area Compilier>;EXENAME='curdir'\FCOMP.EXE;STARTUPDIR='curdir
  148. if existed = '' then setup = setup';PARAMETERS=%*'
  149. call SysCreateObject classname,title,location,setup,u
  150.  
  151. title = "Allfix v4.32^ Cookie Baker"
  152. classname = 'WPProgram'
  153. location = '<Allfix_Folder>'
  154. setup = 'OBJECTID=<Allfix v4.32^ Cookie Baker>;EXENAME='curdir'\BAKE.EXE;STARTUPDIR='curdir
  155. if existed = '' then setup = setup';PARAMETERS=%*'
  156. call SysCreateObject classname,title,location,setup,u
  157.  
  158. rc = stream('cookie.ico','c','query exists')
  159. title = "COOKIE.TXT"
  160. classname = 'WPShadow'
  161. location = '<Allfix_Folder>'
  162. setup = 'OBJECTID=<Allfix v4.32^COOKIE.TXT>;EXENAME=view.exe;PARAMETERS='curdir'\cookie.txt;STARTUPDIR='curdir
  163. if rc \= '' then setup = setup';ICONFILE='rc
  164. call SysCreateObject classname,title,location,setup,u
  165.  
  166. rc = stream('whatsnew.ico','c','query exists')
  167. title = "WHATSNEW.DOC"
  168. classname = 'WPShadow'
  169. location = '<Allfix_Folder>'
  170. setup = 'OBJECTID=<Allfix v4.32^Whats New!>;EXENAME=view.exe;PARAMETERS='curdir'\whatsnew.doc;STARTUPDIR='curdir
  171. if rc \= '' then setup = setup';ICONFILE='rc
  172. call SysCreateObject classname,title,location,setup,u
  173.  
  174. rc = stream('ALLFIX.DOC','c','query exists')
  175. if rc \= '' then
  176. do
  177. title = "Allfix v4.32^ Text Doc's"
  178. classname = 'WPProgram'
  179. location = '<Allfix_Folder>'
  180.   setup = 'OBJECTID=<Allfix v4.32 Documentation>;EXENAME=e.exe;PARAMETERS='curdir'\allfix.doc;STARTUPDIR='curdir
  181.   call SysCreateObject classname,title,location,setup,u
  182. end
  183.  
  184. rc = stream('ALLFIX.INF','c','query exists')
  185. if rc \= '' then
  186. do
  187.   title = "Allfix v4.32^ INF Doc's"
  188.   classname = 'WPProgram'
  189.   location = '<Allfix_Folder>'
  190.   setup = 'OBJECTID=<Allfix v4.32 OS/2 Documentation>;EXENAME=view.exe;PARAMETERS='curdir'\allfix.inf;STARTUPDIR='curdir
  191.   call SysCreateObject classname,title,location,setup,u
  192. end
  193.  
  194. rc = stream('UPGRADE.LOG','c','query exists')
  195. if rc \= '' then
  196. do
  197.   title = "UPGRADE.LOG"
  198.   classname = 'WPShadow'
  199.   location = '<Allfix_Folder>'
  200.   setup = 'SHADOWID='rc
  201.   call SysCreateObject classname,title,location,setup,u
  202. end
  203.  
  204. /* Final words */
  205. 'cls'
  206.  
  207. say ''
  208. say ''
  209. say ''
  210. say ''
  211. say ''
  212. say ' ┌─────────────────────────────────────────────────────────────────────────────'
  213. say 'AC┐C│ ┌─────────────────────────────────────────────────────────────────────────┐ '
  214. say 'AC│C│ │ If you find a need to move Allfix to a different Directory, delete the  │ '
  215. say 'AC│C│ │  Allfix Desktop folder and re-run INSTALL in the New Allfix Directory.  │ '
  216. say 'AC│C│ └─────────────────────────────────────────────────────────────────────────┘ '
  217. say 'AC│C│ ┌─────────────────────────────────────────────────────────────────────────┐ '
  218. say 'AC│C│ │          I am now done Installing the Allfix Desktop Folder!            │ '
  219. say 'AC│C│ │ Please be sure to check all the settings for each program, as a default │ '
  220. say 'AC│C│ │    all programs will be opened in a DOS Window instead of a DOS Full    │ '
  221. say 'AC│C│ │ Screen. Also be sure to check the parameters on such programs as Fcomp  │ '
  222. say 'AC│C│ │                                                                         │ '
  223. say 'AC│C│ │   If you havent Registered Allfix yet,  please remember to do so soon.  │ '
  224. say 'AC│C│ ─────────────────────────────────────────────────────────────────────────┘ '
  225. say 'AC│C─────────────────────────────────────────────────────────────────────────────'
  226. say 'AC'
  227.  
  228.  
  229.