home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Patch / Programs / CDG001.LHA / Debug_Update / InstallPatch < prev   
Encoding:
Text File  |  1995-01-11  |  5.3 KB  |  210 lines

  1. ;********************************************************************
  2. ; $VER: InstallPatch V3.00 Monday 07-Nov-94 12:53:42
  3. ;       Inovatronics, Inc.
  4. ;       Suite 209b
  5. ;       8499 Greenville Ave
  6. ;       Dallas, Texas 75231
  7. ;       USA
  8. ;********************************************************************
  9. ; History
  10. ; v3.00 based on Install-CanDo and InstallCanDo
  11. ; v1.xx & 2.xx old versions of the install script
  12. ;********************************************************************
  13. ; The required variables
  14. ;********************************************************************
  15. (set true 1)
  16. (set false 0)
  17. (set not_here 0)
  18. (set is_a_file 1)
  19. (set is_a_dir 2)
  20. (set newline "\n")
  21. (set quote "\"")
  22. (set nothing "")
  23. (set testing true)
  24. (set testing false)
  25. (delopts "AskUser" "OkNoDelete" "Force")
  26. (set cpu (database "CPU"))
  27. (set aga (= (database "CHIPREV") "AA"))
  28.  
  29. ;********************************************************************
  30. ; The common/general/english strings
  31. ;********************************************************************
  32. (set Intro_text
  33.     (cat
  34.         "Welcome to the CanDebug Patch installer.  This installer uses the "
  35.         "Commodore Amiga Installer.  All of our products use this "
  36.         "installer and we would love to get any feedback that might "
  37.         "help improve the installation procedure." newline
  38.     )
  39. )
  40.  
  41. (set IsCanDebugHere_text
  42.     (cat
  43.         "This appears to be were CanDebug is installed.  Is this correct?"
  44.     )
  45. )
  46.  
  47. (set Unarchiving_text
  48.     (cat
  49.         "One moment please, unarchiving"
  50.         newline
  51.         newline
  52.     )
  53. )
  54.  
  55. (set Final_text
  56.     (cat
  57.         "The CanDebug patch has now been successfully installed on your "
  58.         "machine.  You are now updated to "
  59.     )
  60. )
  61.  
  62. (set PathPrefix "Path=")
  63.  
  64. (set FilePrefix "File(s)=")
  65.  
  66.  
  67. ;********************************************************************
  68. ; The error strings
  69. ;********************************************************************
  70.  
  71. (set NoCanDebug_error
  72.     (cat
  73.         "We cannot find the CanDebug: assignment.  That means that CanDebug "
  74.         "has either not been installed or incorrectly installed."
  75.         newline
  76.     )
  77. )
  78.  
  79. (set NoNeed_error
  80.     (cat
  81.         "The CanDebug installed is newer than this patch so we do not need to patch it."
  82.         newline
  83.     )
  84. )
  85.  
  86.  
  87. ;********************************************************************
  88. ; The language specific strings, overlay the pre-defined strings
  89. ;********************************************************************
  90. (if (= @language "deutsch")
  91.     (
  92.         ; german strings go here
  93.  
  94.         (set Intro_text
  95.             (cat "Willkommen zum Installationsprogramm von " progname ". "
  96.              "Um die Installtion für Sie so einfach wie möglich zu gestalten, "
  97.              "benutzen wir den Commodore-Installer."
  98.              newline newline
  99.             )
  100.         )
  101.     )
  102. )
  103.  
  104. ;********************************************************************
  105. ; Some common procedures
  106. ;********************************************************************
  107. ; where do we install the CanDebug directory
  108. (procedure find_home_dir
  109.     (
  110.         ; if we were installed, where are we?
  111.         (if (= testing true)
  112.             (set CanDebug_dir "Ram:")
  113.             (set CanDebug_dir (getassign "CanDebug"))
  114.         )
  115.         
  116.         ; is CanDebug assign made?
  117.         (if (= CanDebug_dir nothing)
  118.             (abort NoCanDebug_error)
  119.         )
  120.         
  121.         ; where are we to install?
  122.         (set CanDebug_dir
  123.             (askdir
  124.                 (prompt IsCanDebugHere_text)
  125.                 (help @askdir-help)
  126.                 (default CanDebug_dir)
  127.                 (newpath)
  128.             )
  129.         )
  130.  
  131.         ; what CanDebug is to be installed?
  132.         (run "version >env:CanDebugversion CanDebug_Patch_Install:Stuff/CanDebug")
  133.         (set newCanDebug (getenv "CanDebugversion"))
  134.         (set newver (+ (substr newCanDebug 6 1) 0))
  135.         (set newrev (+ (substr newCanDebug 8 3) 0))
  136.         
  137.         ; is CanDebug already installed here?
  138.         (run "version >env:CanDebugversion CanDebug:CanDebug")
  139.         (set oldCanDebug (getenv "CanDebugversion"))
  140.         (set oldver (+ (substr oldCanDebug 6 1) 0))
  141.         (set oldrev (+ (substr oldCanDebug 8 3) 0))
  142.         
  143.         ; is the new revision greater than the installed one?
  144.         (if (> oldrev newrev)
  145.             (abort NoNeed_error)
  146.         )
  147.     )
  148. )
  149.  
  150.  
  151. ;********************************************************************
  152. ; The error handler
  153. ;********************************************************************
  154. (onerror
  155.     (makeassign "CanDebug_Patch_Install" (safe))
  156. )
  157.  
  158.  
  159. ; *******************************************************************
  160. ; on with the show
  161. ; *******************************************************************
  162. (welcome intro_text)
  163.  
  164. ; where are we?
  165. (makeassign "CanDebug_Patch_Install" "" (safe))
  166.  
  167. ; where to install?
  168. (find_home_dir)
  169.  
  170. ; to novice mode
  171. (user 0)
  172.  
  173. ; how far have we come?
  174. (complete 0)
  175.  
  176.  
  177. ; *******************************************************************
  178. ; copy readme to the destination
  179. ; *******************************************************************
  180. (copyfiles
  181.     (source "CanDebug_Patch_Install:CanDebugPatch.doc")
  182.     (dest CanDebug_dir)
  183.     (files)
  184.     (infos)
  185. )
  186.  
  187. ; how far have we come?
  188. (complete 50)
  189.  
  190.  
  191. ; *******************************************************************
  192. ; delete CanDebug and install new one
  193. ; *******************************************************************
  194. (copyfiles
  195.     (source "CanDebug_Patch_Install:Stuff")
  196.     (pattern "#?")
  197.     (dest CanDebug_Dir)
  198. )
  199.  
  200. ; how far have we come?
  201. (complete 100)
  202.  
  203.  
  204. ; *******************************************************************
  205. ; ok we are done then
  206. ; *******************************************************************
  207. (makeassign "CanDebug_Patch_Install" (safe))
  208. (set @default-dest CanDebug_dir)
  209. (exit Final_text newCanDebug)
  210.