INSTALL.BAT
上传用户:hongxing
上传日期:2013-09-06
资源大小:31732k
文件大小:2k
源码类别:

uCOS

开发平台:

C/C++

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