home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vpvcl1.zip / install.cmd next >
OS/2 REXX Batch file  |  1997-05-21  |  3KB  |  98 lines

  1. /*                                                  */
  2. /* Script to install VP/2 with Open32 compatibility */
  3. /*                                                  */
  4.  
  5. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  6. call SysLoadFuncs
  7.  
  8. call SysCls
  9. say
  10. say "This process will create an installation of VP/2 v1.99 with VCL"
  11. say "compatibility.  DO NOT RUN THIS FROM YOUR WORKING VP/2 v1.10"
  12. say "DIRECTORY - files will be overwritten if you do."
  13. say
  14.  
  15. do until file.0 = 1
  16.   if file.0 = 0 then
  17.     do
  18.       say "The VP/2 CD-ROM could not be found in the specified drive."
  19.       say
  20.     end
  21.  
  22.   say "Please insert the VP/2 CD-ROM into a CD-ROM drive and type"
  23.   say "the drive letter followed by Enter:"
  24.  
  25.   pull CDDrive
  26.   if RIGHT(CDDrive,1) \= ':' then
  27.     CDDrive = CDDrive':'
  28.   call SysFileTree CDDrive'\runimage\bin\vp.str', 'file', 'F'
  29. end
  30.  
  31. say
  32. say "Creating subdirectories"
  33. call SysMkDir 'bin.os2'
  34. call SysMkDir 'out.os2'
  35. call SysMkDir 'lib.os2'
  36. call SysMkDir 'source'
  37. call SysMkDir 'source\rtl'
  38. call SysMkDir 'source\vcl'
  39. call SysMkDir 'source\open32'
  40. call SysMkDir 'examples'
  41. call SysMkDir 'examples\testvcl'
  42.  
  43. say
  44. say "Copying required files from CD-ROM"
  45.  
  46. files.0 = 10
  47. files.1 = 'bin\implib.exe'            ;dest.1 = 'bin.os2'
  48. files.2 = 'bin\lib.exe'               ;dest.2 = 'bin.os2'
  49. files.3 = 'bin\touch.exe'             ;dest.3 = 'bin.os2'
  50. files.4 = 'bin\vp.str'                ;dest.4 = 'bin.os2'
  51. files.5 = 'bin\vp.vph'                ;dest.5 = 'bin.os2'
  52. files.6 = 'bin\vpc.exe'               ;dest.6 = 'bin.os2'
  53. files.7 = 'source\rtl\os2base.pas'
  54. files.8 = 'source\rtl\os2def.pas'
  55. files.9 = 'source\rtl\os2pmapi.pas'
  56. files.10 = 'lib\os2.lib'              ;dest.10= 'lib.os2'
  57. call copyfiles CDDrive'\runimage\'
  58.  
  59. files.0 = 1
  60. files.1 = 'upd2.exe';  drop dest.1
  61. call copyfiles CDDrive'\'
  62.  
  63. say "Updating files to v1.99"
  64.  
  65. CDDrive'\upd2.exe vp199.upd'
  66.  
  67. say
  68. say "Creating desktop icon"
  69.  
  70. Dir = DIRECTORY()
  71. call SysCreateObject "WPProgram", "VP/PM v1.99", "<WP_DESKTOP>",,
  72.      "EXENAME="Dir"\BIN.OS2\VPPM.EXE;STARTUPDIR="Dir";PARAMETERS=/CBIN.OS2\DEFAULT.CFG;ICONFILE=VPVCL.ICO" ,"R"
  73.  
  74. say
  75. say "The first stage of the update process is complete."
  76. say
  77. say "Please add "Dir"\BIN.OS2 to the LIBPATH of your CONFIG.SYS file"
  78. say "before running this version of VP/2."
  79. say
  80. say "To update the VCL source code, please run either VCL200.CMD or "
  81. say "VCL201.CMD; the last three letters should match the version of "
  82. say "Borland Delphi you have available."
  83. say
  84.  
  85. signal end
  86.  
  87. copyfiles: procedure expose files. dest.
  88. arg source
  89. do i = 1 to files.0
  90.   if dest.i \= "DEST."i then
  91.     '@copy 'source||files.i dest.i' >nul'
  92.   else
  93.     '@copy 'source||files.i files.i' >nul'
  94. end
  95. return
  96.  
  97. end:
  98.