home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR3 / GUI7.ZIP / GUI627.BAT next >
DOS Batch File  |  1994-01-24  |  8KB  |  160 lines

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