home *** CD-ROM | disk | FTP | other *** search
/ HomeWare 14 / HOMEWARE14.bin / prog / bc4pat_4.arj / INSTALL.BAT < prev    next >
DOS Batch File  |  1994-02-15  |  2KB  |  105 lines

  1. @echo off
  2. @rem Save off env's, if already used
  3. if not "%bc4patch%" == "" set oldbc4patch=%bc4patch%
  4. set bc4patch=
  5.  
  6. @rem Argument checking
  7. if "%0" == "INSTALL" goto Chkusage
  8. if "%0" == "install" goto Chkusage
  9. goto RunFromFloppy
  10. :Chkusage
  11. if "%1" == "" goto Usage
  12. if "%2" == "" goto Usage
  13. if "%2" == "/B" goto Usage
  14. if "%2" == "/b" goto Usage
  15. if not "%3" == "" goto backup
  16. :chkexist
  17. if exist %1\patch.exe goto Warning
  18.  
  19. @rem Copy patch files
  20. :Copyrtp
  21. @echo.
  22. @echo Copying patch files into %1...
  23. copy patch.exe %1 
  24. copy patch.exe %2
  25. copy cddr.com %1
  26. copy bc4p01.rtp %1 
  27. copy bc4p02.rtp %1 
  28. copy bc4p03.rtp %1 
  29. copy ta4p01.rtp %1 
  30. copy bc4p04.rtp %2 
  31.  
  32. @rem Running patch
  33. cddr %1
  34. @echo.
  35. @echo Running patch . . .
  36. patch bc4p01.rtp %bc4patch%
  37. @echo Running patch . . .
  38. patch bc4p02.rtp %bc4patch%
  39. @echo Running patch . . .
  40. patch bc4p03.rtp %bc4patch%
  41. @echo Running patch . . .
  42. patch ta4p01.rtp %bc4patch%
  43.  
  44. @echo Cleaning up . . .
  45. del patch.exe
  46. del bc4p01.rtp
  47. del bc4p02.rtp
  48. del bc4p03.rtp
  49. del ta4p01.rtp
  50.  
  51. cddr %2
  52. del %1\cddr.com
  53. @echo Running patch . . .
  54. patch bc4p04.rtp %bc4patch%
  55.  
  56. @echo Cleaning up . . .
  57. del patch.exe
  58. del bc4p04.rtp
  59.  
  60. @echo.
  61. @echo Patch completed.
  62. @echo.
  63. goto End
  64.  
  65. :backup
  66. if "%3" == "/b" set bc4patch=-backup
  67. if "%3" == "/B" set bc4patch=-backup
  68. if "%bc4patch%"=="" goto Usage
  69. goto chkexist
  70.  
  71. :Warning
  72. @echo %1\patch.exe already exists.  If you do not wish to
  73. @echo overwrite it, then press Ctrl-Break to exit.
  74. pause
  75. goto Copyrtp
  76.  
  77. :RunFromFloppy
  78. @echo.
  79. @echo You must run install.bat from the floppy disk drive.  For example,
  80. @echo.
  81. @echo   a:
  82. @echo   install c:\bc4 c:\windows
  83. @echo.
  84. goto Usage
  85.  
  86. :Usage
  87. @echo.
  88. @echo Borland C++ 4.0 Patch Install
  89. @echo.
  90. @echo   install base_dir windows_dir [/b]
  91. @echo.
  92. @echo where the base_dir is the base directory where BC4 is
  93. @echo installed, windows_dir is the directory where Windows 
  94. @echo is installed and (the optional) /b specifies to backup the
  95. @echo original file versions.  For example,
  96. @echo.
  97. @echo   install c:\bc4 c:\windows /b
  98. @echo.
  99. goto End
  100.  
  101. :End
  102. set bc4patch=
  103. if not "%oldbc4patch%" == "" set bc4patch=%oldbc4patch%
  104. 
  105.