home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ipfedit.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1993-08-17  |  6KB  |  189 lines

  1. /* 
  2.    INSTALL.CMD
  3.  
  4.    IPF Editor Installation Program (C) 1993 Perez Computing Services
  5.    Allows target drive to be specified on command line.
  6. */
  7. arg Temp
  8.  
  9. trace off
  10.  
  11. /* Initialize REXX utility functions */
  12. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  13. call SysLoadFuncs
  14.  
  15. /* Strip out any colons */
  16. PARSE VALUE Temp WITH TargetDrive 2
  17.  
  18. if TargetDrive = "" then do
  19. say 'Enter the drive letter to install the IPF Editor on and press <ENTER>:'
  20. pull TargetDrive
  21. end  /* Do */
  22.  
  23. info = SysDriveInfo( TargetDrive )
  24. parse VAR info cLetter lDiskFree lTotalDisk
  25. if lDiskFree < 700000 then do
  26. say 'Drive 'TargetDrive' has only 'lDiskFree' bytes free and the IPF Editor'
  27. say ' requires at least 700,000 bytes free to install correctly.'
  28. exit
  29. end
  30. else
  31. say 'Drive 'TargetDrive' has enough space ('lDiskFree') to install the IPF Editor'
  32.  
  33. if info = "" then do
  34. say '"'TargetDrive'" is an invalid drive, please restart IPF Editor Installation program.'
  35. exit
  36. end
  37.  
  38. say 'Installing the PCS IPF Editor onto drive 'TargetDrive'...'
  39.  
  40.  
  41.  
  42. call Loadfiles
  43.  
  44. SAY 'Creating IPF Editor Folder...'
  45.  
  46. /* Create IPF Editor Information folder */
  47. classname='WPFolder'
  48. title='IPF Editor^Shareware Version'
  49. location='<WP_DESKTOP>'
  50. setup='OBJECTID=<IPFEDIT_SW_FOLDER>;'||,
  51.       'ICONFILE=IPFEDIT.ICO;'
  52. Call BldObj
  53.  
  54. SAY 'Creating IPF Editor Program Objects...'
  55.  
  56. classname='WPProgram'
  57. title='IPF Editor^Shareware Version'
  58. location='<IPFEDIT_SW_FOLDER>'
  59. setup='OBJECTID=<IPFEDITOR_SW_PGM>;'||,
  60.       'EXENAME='TargetDrive':\IPFEDIT\IPFEDIT.EXE;'||,
  61.       'STARTUPDIR='TargetDrive':\IPFEDIT;'||,
  62.       'PARAMETERS= ;'||,
  63.       'ICONPOS=8,8;'||,
  64.       'PROGTYPE=PM;'
  65. Call BldObj
  66.  
  67.  
  68. classname='WPProgram'
  69. title='IPF Editor^License Agreement'
  70. location='<IPFEDIT_SW_FOLDER>'
  71. setup='OBJECTID=<IPFEDITOR_SW_LICENSE>;'||,
  72.       'EXENAME=VIEW.EXE;'||,
  73.       'PARAMETERS='TargetDrive':\IPFEDIT\LICENSE.INF;'||,
  74.       'STARTUPDIR='TargetDrive':\IPFEDIT;'||,
  75.       'ICONPOS=34,8;'||,
  76.       'PROGTYPE=PM;'
  77. Call BldObj
  78.  
  79. classname='WPProgram'
  80. title='IPF Editor^Online Reference'
  81. location='<IPFEDIT_SW_FOLDER>'
  82. setup='OBJECTID=<IPFEDITOR_SW_REFERENCE>;'||,
  83.       'EXENAME=VIEW.EXE;'||,
  84.       'PARAMETERS='TargetDrive':\IPFEDIT\IPFEDOC.INF;'||,
  85.       'STARTUPDIR='TargetDrive':\IPFEDIT;'||,
  86.       'ICONPOS=48,8;'||,
  87.       'PROGTYPE=PM;'
  88. Call BldObj
  89.  
  90. classname='WPProgram'
  91. title='IPF Editor^Registration Form'
  92. location='<IPFEDIT_SW_FOLDER>'
  93. setup='OBJECTID=<IPFEDITOR_SW_REGISTRATION>;'||,
  94.       'EXENAME=E.EXE;'||,
  95.       'PARAMETERS='TargetDrive':\IPFEDIT\IPFEDIT.REG;'||,
  96.       'STARTUPDIR='TargetDrive':\IPFEDIT;'||,
  97.       'ICONPOS=62,8;'||,
  98.       'PROGTYPE=PM;'
  99. Call BldObj
  100.  
  101. classname='WPProgram'
  102. title='IPF Editor^Sample Online Document'
  103. location='<IPFEDIT_SW_FOLDER>'
  104. setup='OBJECTID=<IPFEDITOR_SAMPLE_ONDOC>;'||,
  105.       'EXENAME=VIEW.EXE;'||,
  106.       'PARAMETERS='TargetDrive':\IPFEDIT\DSAMPLE\SHAKESPR.INF;'||,
  107.       'STARTUPDIR='TargetDrive':\IPFEDIT\DSAMPLE;'||,
  108.       'ICONPOS=76,8;'||,
  109.       'PROGTYPE=PM;'
  110. Call BldObj
  111.  
  112. classname='WPProgram'
  113. title='IPF Editor^Sample C Application
  114. Created using
  115. 'TargetDrive':\IPFEDIT\CSAMPLE\IFPEDEMO.MAK.'
  116. location='<IPFEDIT_SW_FOLDER>'
  117. setup='OBJECTID=<IPFEDITOR_SW_SMPLCAPP>;'||,
  118.       'EXENAME='TargetDrive':\IPFEDIT\CSAMPLE\IPFEDEMO.EXE;'||,
  119.       'PARAMETERS= ;'||,
  120.       'STARTUPDIR='TargetDrive':\IPFEDIT\CSAMPLE;'||,
  121.       'ICONPOS=98,8;'||,
  122.       'PROGTYPE=PM;'
  123. Call BldObj
  124.  
  125. /* Do README last so focus set to it when folder opened */
  126. classname='WPProgram'
  127. title='IPF Editor^Readme File'
  128. location='<IPFEDIT_SW_FOLDER>'
  129. setup='OBJECTID=<IPFEDITOR_SW_README>;'||,
  130.       'EXENAME=VIEW.EXE;'||,
  131.       'PARAMETERS='TargetDrive':\IPFEDIT\README.INF;'||,
  132.       'STARTUPDIR='TargetDrive':\IPFEDIT;'||,
  133.        'ICONPOS=20,8;'||,
  134.       'PROGTYPE=PM;'
  135. Call BldObj
  136.  
  137.  
  138. SAY ''
  139. SAY ''
  140. SAY 'IPF Editor installation complete.  Please see the contents of the'
  141. SAY ' IPF Editor Folder to try out the IPF Editor.  Please view the'
  142. SAY ' README.INF file for the latest information about the IPF Editor.'
  143. SAY ''
  144. SAY 'You may wish to edit your CONFIG.SYS to add the 'TargetDrive':\IPFEDIT subdirectory'
  145. SAY ' to the HELP, LIBPATH, and BOOKSHELF statements.'
  146. SAY ''
  147. SAY 'IPF Editor (C) 1993 Perez Computing Systems'
  148.  
  149. Exit
  150.  
  151.  
  152.  
  153. /* Build Object */
  154. BldObj:
  155. result = SysCreateObject(classname, title, location, setup, 'U')
  156. Return
  157.  
  158. /* Load all files from current to target drive */
  159. LoadFiles:
  160. Say 'Creating 'TargetDrive':\IPFEDIT directory...'
  161. call SysMkDir TargetDrive':\IPFEDIT'
  162. Say 'Creating 'TargetDrive':\IPFEDIT\CSAMPLE directory...'
  163. call SysMkDir TargetDrive':\IPFEDIT\CSAMPLE'
  164. Say 'Creating 'TargetDrive':\IPFEDIT\DSAMPLE directory...'
  165. call SysMkDir TargetDrive':\IPFEDIT\DSAMPLE'
  166. SAY 'Copying IPF Editor files to 'TargetDrive':\IPFEDIT...'
  167. '@copy IPFEDIT.HLP ' TargetDrive':\IPFEDIT >NUL'
  168. '@copy IPFEDIT.EXE ' TargetDrive':\IPFEDIT >NUL'
  169. '@copy BITMAP.DLL ' TargetDrive':\IPFEDIT >NUL'
  170. '@copy *.INF ' TargetDrive':\IPFEDIT >NUL'
  171. '@copy README.TXT ' TargetDrive':\IPFEDIT >NUL'
  172. '@copy IPFEDIT.REG ' TargetDrive':\IPFEDIT >NUL'
  173. '@copy *.ICO ' TargetDrive':\IPFEDIT >NUL'
  174. SAY 'Copying IPF Editor Sample Online Documentation files to 'TargetDrive':\IPFEDIT\DSAMPLE...'
  175. '@copy shakespr.* ' TargetDrive':\IPFEDIT\DSAMPLE >NUL'
  176. '@copy 12thnite.* ' TargetDrive':\IPFEDIT\DSAMPLE >NUL'
  177. SAY 'Copying IPF Editor Sample C Application files to 'TargetDrive':\IPFEDIT\CSAMPLE...'
  178. '@copy ipfedemo.* ' TargetDrive':\IPFEDIT\CSAMPLE >NUL'
  179. '@copy ipfed_mn.ipf ' TargetDrive':\IPFEDIT\CSAMPLE >NUL'
  180. '@copy ipfedhlp.c ' TargetDrive':\IPFEDIT\CSAMPLE >NUL'
  181. '@copy ipfedhlp.h ' TargetDrive':\IPFEDIT\CSAMPLE >NUL'
  182. '@copy ipfedhlp.rc ' TargetDrive':\IPFEDIT\CSAMPLE >NUL'
  183. '@copy ipfedhlp.obj ' TargetDrive':\IPFEDIT\CSAMPLE >NUL'
  184. Return
  185.  
  186.  
  187.  
  188.  
  189.