home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR4 / P3071.ZIP / CDD7TO71.BAT next >
DOS Batch File  |  1994-01-28  |  8KB  |  158 lines

  1. @ECHO OFF
  2. IF "%1"=="" GOTO SYNTAX:
  3.  
  4. ECHO ╔════════════════════════════════════════════════════════════════════════╗
  5. ECHO ║  Applying patch to upgrade CDD version 3007 to revision 3007.1         ║
  6. ECHO ║                                                                        ║
  7. ECHO ╚════════════════════════════════════════════════════════════════════════╝
  8.  
  9. ECHO ╔════════════════════════════════════════════════════════════════════════╗
  10. ECHO ║ WARNING: The files listed below will be overwritten!                   ║
  11. ECHO ║                                                                        ║
  12. ECHO ║ If you have made changes to any of these files, and wish to preserve   ║
  13. ECHO ║ those changes, Press CTRL-C NOW, and make backup copies.               ║
  14. ECHO ║                                                                        ║
  15. ECHO ║   BROWSE.CLA, FILE.TPX, FORM.TPX, SCRNFLDS.TPX, DDVBROWS.DLL           ║
  16. ECHO ║   DDVBROWS.LIB, DOVBROWS.LIB, DXVBROWS.LIB                             ║
  17. ECHO ║                                                                        ║
  18. ECHO ║                                                                        ║
  19. ECHO ╚════════════════════════════════════════════════════════════════════════╝
  20. PAUSE
  21. PATCH %1 cdd7to71.RTP
  22.  
  23. IF ERRORLEVEL 37 GOTO ERRORFILE
  24. IF ERRORLEVEL 36 GOTO BADVER
  25. IF ERRORLEVEL 35 GOTO SYNTAX
  26. IF ERRORLEVEL 34 GOTO NOTADIR
  27. IF ERRORLEVEL 29 GOTO NOSPACE
  28. IF ERRORLEVEL 15 GOTO BADVER_15
  29. IF ERRORLEVEL 9 GOTO BAD_PATCHFILE
  30. IF ERRORLEVEL 8 GOTO BAD_PATCHEXE
  31. IF ERRORLEVEL 5 GOTO NOTADIR
  32. IF ERRORLEVEL 4 GOTO NOTADIR
  33. IF ERRORLEVEL 1 GOTO SYNTAX
  34. GOTO PATCH_COMPLETE
  35.  
  36. :NOTADIR
  37. ECHO ╔═════════════════════════════════╗
  38. ECHO ║ CANNOT FIND A DIRECTORY NAMED:  ║  " %1 "
  39. ECHO ╚═════════════════════════════════╝
  40. GOTO SYNTAX
  41.  
  42. :SYNTAX
  43. ECHO ╔═════════════════════════════════════════════════════════════╗
  44. ECHO ║ This patch should be applied by UNZIPPING P3071.ZIP         ║
  45. ECHO ║ then typing:                                                ║
  46. ECHO ║                                                             ║
  47. ECHO ║  CDD7TO71 [DRIVE:\DIRECTORY]                                ║
  48. ECHO ║                                                             ║
  49. ECHO ║  where [DRIVE:\DIRECTORY] is the name of the drive and path ║
  50. ECHO ║         where CDD 3.0 is installed                          ║
  51. ECHO ║                                                             ║
  52. ECHO ║                                                             ║
  53. ECHO ║  example: if CDD 3.0 is installed in C:\Clarion3            ║
  54. ECHO ║           then type CDD7TO71 C:\Clarion3                    ║
  55. ECHO ║                                                             ║
  56. ECHO ╚═════════════════════════════════════════════════════════════╝
  57. GOTO EXIT
  58.  
  59. :ERRORFILE
  60. ECHO   An error occurred when Patch.exe was opening %1\Patch.err
  61. ECHO ╔════════════════════════════════════════════════════════════════════╗
  62. ECHO ║ The probable cause is some type of DOS error, retry the operation  ║
  63. ECHO ║ after checking the disks integrity.                                ║
  64. ECHO ╚════════════════════════════════════════════════════════════════════╝
  65. GOTO EXIT
  66.  
  67.  
  68. :PATCH_COMPLETE
  69. IF NOT EXIST %1\PATCH.ERR GOTO noerrors
  70.  
  71. ECHO 
  72. ECHO ╔═════════════════════════════════════════════════════╗
  73. ECHO ║ PATCH HAS ERRORs, press any key to view error file  ║
  74. ECHO ║ after viewing the errors you can rerun the patch    ║
  75. ECHO ╠═════════════════════════════════════════════════════╣
  76. ECHO ║  The following errors can be ignored:               ║
  77. ECHO ║                                                     ║
  78. ECHO ║  ept0016: New file already exists                   ║
  79. ECHO ║  ept0024: New file already exists                   ║
  80. ECHO ╚═════════════════════════════════════════════════════╝
  81.  
  82. EDITOR %1\PATCH.ERR
  83.  
  84. CLS
  85. ECHO ╔══════════════════════════════════════════════════════════════════════╗
  86. ECHO ║ A patchkit install set is available from Clarion Customer Service    ║
  87. ECHO ║ at 305-785-4555 for $10.00 plus shipping charges.                    ║
  88. ECHO ║                                                                      ║
  89. ECHO ╚══════════════════════════════════════════════════════════════════════╝
  90. pause
  91. GOTO EXIT
  92.  
  93. :missing_file
  94. ECHO ╔════════════════════════════════════════════════════════════╗
  95. ECHO ║ Cannot locate patch file(s)                                ║
  96. ECHO ║ This patch should be applied by UNZIPPING P3071.ZIP        ║
  97. ECHO ║ then typing:                                               ║
  98. ECHO ║                 CDD7TO71 [DRIVE:\DIRECTORY]                ║
  99. ECHO ╚════════════════════════════════════════════════════════════╝
  100. GOTO EXIT
  101.  
  102. :BADVER
  103. ECHO ╔════════════════════════════════════════════════════════════════════════╗
  104. ECHO ║ error ept0036: Old file not found. However, a file of the same name    ║
  105. ECHO ║          was found. No update done since file contents do not match.   ║
  106. ECHO ║                                                                        ║
  107. ECHO ║ PATCH was unable to locate an exact match for the original file to     ║
  108. ECHO ║ be updated. However, PATCH was able to locate a file with the same     ║
  109. ECHO ║ name as the original file. However, the file found did not have either ║
  110. ECHO ║ the same size or checksum as the actual original file that PATCH is    ║
  111. ECHO ║ seeking in order to perform the update.                                ║
  112. ECHO ╚════════════════════════════════════════════════════════════════════════╝
  113.  
  114. GOTO EXIT
  115. :BADVER_15
  116. ECHO ╔════════════════════════════════════════════════════════════════════════╗
  117. ECHO ║                                                                        ║
  118. ECHO ║ error ept0015: Old file does not exist                                 ║
  119. ECHO ║                                                                        ║
  120. ECHO ║ PATCH needs Bytes from the existing version of a file in order to build║
  121. ECHO ║ the new file. However, it was unable to locate the old file.           ║
  122. ECHO ╚════════════════════════════════════════════════════════════════════════╝
  123. GOTO EXIT
  124.  
  125. :nospace
  126. ECHO ╔════════════════════════════════════════════════════════════╗
  127. ECHO ║                                                            ║
  128. ECHO ║ There is insufficient disk space to apply the Patch,       ║
  129. ECHO ║ please free up some space and reapply the Patch.           ║
  130. ECHO ║                                                            ║
  131. ECHO ╚════════════════════════════════════════════════════════════╝
  132. GOTO EXIT
  133.  
  134. :BAD_PATCHFILE
  135. ECHO ╔════════════════════════════════════════════════════════════╗
  136. ECHO ║ error ept0009:                                             ║
  137. ECHO ║ PATCH.EXE was unable to read the correct information       ║
  138. ECHO ║ from the patch file.  Get a new copy and rerun the PATCH   ║
  139. ECHO ║                                                            ║
  140. ECHO ╚════════════════════════════════════════════════════════════╝
  141. GOTO EXIT
  142.  
  143. :BAD_PATCHEXE
  144. ECHO ╔════════════════════════════════════════════════════════════╗
  145. ECHO ║ error ept0008: PATCH.EXE and Patch file are incompatible   ║
  146. ECHO ║                                                            ║
  147. ECHO ║ You need a new copy of PATCH.EXE to apply this patch.      ║
  148. ECHO ║                                                            ║
  149. ECHO ╚════════════════════════════════════════════════════════════╝
  150. GOTO EXIT
  151.  
  152. :NOERRORS
  153. ECHO  
  154. ECHO ╔═════════════════════════════════════════════════╗
  155. ECHO ║  Patch is complete, no errors encountered!      ║
  156. ECHO ╚═════════════════════════════════════════════════╝
  157. :EXIT
  158.