home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / bos225b2.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1998-07-25  |  6KB  |  153 lines

  1. /*
  2.  * Xitami for OS/2 v2.x WPfolder Installation Program copyright (c) 1998
  3.  * by Scott Drake of Innovative Solutions Online 1:2630/212
  4.  * sdrake@isonline.com
  5.  *
  6.  * This program creates a folder to hold program objects for Xitami/2, then
  7.  * creates program objects for each executable.  It only needs to be run once
  8.  * (unless you move the Xitami/2 directory -- see say notes at end). Run this
  9.  * program in the Xitami/2 directory (where you unpacked the archive).
  10.  */
  11.  
  12. /* see if we might be in the right directory... */
  13.  
  14. '@Echo off'
  15. 'cls'
  16.  
  17. say''
  18. say''
  19. say'┌─────────────────────────────────────────────────────────────────────────────'
  20. say'│ ┌─────────────────────────────────────────────────────────────────────────┐ │'
  21. say'│ │            Xitami for OS/2 v2.x WPfolder Installation Program           │ │'
  22. say'│ │                    Copyright (c) 1998 by Scott Drake                    │ │'
  23. say'│ │         Xitami Web Server is Copyright (c) 1991, 1998 by iMatix         │ │'
  24. say'│ │                           All rights reserved                           │ │'
  25. say'│ └─────────────────────────────────────────────────────────────────────────┘ │'
  26. say'│ ┌─────────────────────────────────────────────────────────────────────────┐ '
  27. say'│ │     Xitami is Free software and comes with ABSOLUTELY NO WARRANTY.      │ '
  28. say'│ │     You may redistribute this software under certain conditions,        │ '
  29. say'│ │     read the file LICENSE.TXT for details.                              │ '
  30. say'│ ─────────────────────────────────────────────────────────────────────────┘ '
  31. say'─────────────────────────────────────────────────────────────────────────────┘'
  32.  
  33. /*
  34.  * allow user to eliminate associations from being placed on AV/2.
  35.  * seemed to upset some fellow on CIS (I guess he doesn't know about
  36.  * Settings notebooks on WPS objects).
  37.  */
  38. assocfilter = ';ASSOCFILTER=*.ZIP,*.ARC,*.LZH,*.ARJ,*.ZOO,*.MO0,READ.ME,README,README.1ST,README.OS2,REGISTER.TXT'
  39. existed = ''
  40. parse upper arg dummy
  41. if dummy = 'NOASSOC' then assocfilter = ''
  42.  
  43. rc = stream('xitami.exe','c','query exists')
  44. if rc = '' then
  45. do
  46.   say 'Sorry, Xitami.EXE not found.  Must not be right directory.  Terminating.'
  47.   exit
  48. end
  49.  
  50. /* tell user what we're doing, give him a chance to hit CTRL-C */
  51. say''
  52. say''
  53. say '       This program creates Desktop objects for Xitami. If you do not want'
  54. say '       create the Desktop Objects, just press CTRL + C then press Enter.'
  55. say ''
  56.  
  57.  
  58. say''
  59. say '         Otherwise Press [Enter] to continue with the Installation...'
  60. pull dummy .
  61. say ''
  62.  
  63.  
  64. /* save current directory */
  65.  
  66. curdir = directory()
  67.  
  68. /* load rexx utility functions */
  69.  
  70. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  71. call SysLoadFuncs
  72.  
  73. /* say it, then do it */
  74.  
  75. 'cls'
  76. say "Creating The Xitami for OS/2 folder and objects..."
  77.  
  78. /* first, create Xitami folder */
  79.  
  80. rc = stream('xitami.ico','c','query exists')
  81. title = "Xitami for OS/2^Web Server"
  82. classname = 'WPFolder'
  83. location = '<WP_DESKTOP>'
  84. setup = 'OBJECTID=<Xitami_Folder>;OPEN=DEFAULT'
  85. if rc \= '' then setup = setup';ICONFILE='rc
  86. result=SysCreateObject(classname,title,location,setup,r)
  87.  
  88. /* Check to see if the Xitami Folder already exists... */
  89. if result = 0 then
  90. do
  91.   assocfilter = ''
  92.   existed = 'TRUE'
  93.   say ''
  94.   say 'The Xitami for OS/2 folder already exists.'
  95.   say 'Should I update the objects? (Y/n)'
  96.   parse upper pull dummy
  97.   if left(dummy,1) = 'N' then exit
  98.   say ''
  99. end
  100.  
  101. /* now, create program objects in Xitami folder */
  102.  
  103. title = "Xitami for OS/2"
  104. classname = 'WPProgram'
  105. location = '<Xitami_Folder>'
  106. setup = 'PROGTYPE=WINDOWABLEVIO;OBJECTID=<Xitami for OS/2>;EXENAME='curdir'\XITAMI.EXE;STARTUPDIR='curdir
  107. if existed = '' then setup = setup';PARAMETERS='
  108. call SysCreateObject classname,title,location,setup,u
  109.  
  110. rc = stream('license.ico','c','query exists')
  111. title = "Xitami License"
  112. classname = 'WPProgram'
  113. location = '<Xitami_Folder>'
  114. setup = 'OBJECTID=<Xitami License>;EXENAME=e.exe;PARAMETERS='curdir'\LICENSE.TXT;STARTUPDIR='curdir
  115. if rc \= '' then setup = setup';ICONFILE='rc
  116. call SysCreateObject classname,title,location,setup,u
  117.  
  118. rc = stream('readme.ico','c','query exists')
  119. title = "Xitami for OS/2^ Read Me First"
  120. classname = 'WPProgram'
  121. location = '<Xitami_Folder>'
  122. setup = 'OBJECTID=<Xitami for OS/2 Read Me First>;EXENAME=e.exe;PARAMETERS='curdir'\readme;STARTUPDIR='curdir
  123. if rc \= '' then setup = setup';ICONFILE='rc
  124. call SysCreateObject classname,title,location,setup,u
  125.  
  126. rc = stream('readme.ico','c','query exists')
  127. title = "Xitami for OS/2^ Read Me Text"
  128. classname = 'WPProgram'
  129. location = '<Xitami_Folder>'
  130. setup = 'OBJECTID=<Xitami for OS/2 Read Me Text>;EXENAME=e.exe;PARAMETERS='curdir'\readme.txt;STARTUPDIR='curdir
  131. if rc \= '' then setup = setup';ICONFILE='rc
  132. call SysCreateObject classname,title,location,setup,u
  133.  
  134.  
  135.  
  136. /* Final words */
  137.  
  138. 'cls'
  139.  
  140. say ''
  141. say ''
  142. say ''
  143. say ''
  144. say ''
  145. say ' ┌─────────────────────────────────────────────────────────────────────────────'
  146. say 'AC┐C│ ┌─────────────────────────────────────────────────────────────────────────┐ '
  147. say 'AC│C│ │     The Xitami for OS/2 DeskTop folder and Icons are now installed.     │ '
  148. say 'AC│C│ │   We hope you Enjoy Xitami, report any problems to xitami@imatix.com.   │ '
  149. say 'AC│C│ └─────────────────────────────────────────────────────────────────────────┘ '
  150. say 'AC│C─────────────────────────────────────────────────────────────────────────────'
  151. say 'AC'
  152.  
  153.