home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / barfly / install < prev    next >
Text File  |  1977-12-31  |  6KB  |  225 lines

  1. ;
  2. ;    $VER: Install-Barfly 1.0 (10.07.94)
  3. ;
  4. ;    Install script for Barfly
  5. ;    © Copyright 1994 by Ralph Schmidt
  6. ;    All Rights Reserved
  7. ;    
  8.  
  9.  
  10. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  11. ;;;
  12. ;;;  CheckObsoleteDir procedure
  13. ;;;
  14. ;;;  Asks the user if he wants an "obsolete" directory and creates it,
  15. ;;;  if this is the case. The name will be stored in installObsoleteDir
  16. ;;;  in that case, otherwise this variable will receive the value "".
  17. ;;;
  18. ;;;  Uses: installDir   name of installation directory
  19. ;;;
  20. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  21. (set installObsoleteDirChecked 0)
  22. (procedure CheckObsoleteDir
  23.  
  24.     (if (NOT installObsoleteDirChecked)
  25.     (   (set installObsoleteDir (tackon installDir "obsolete"))
  26.     (if (<> (exists installObsoleteDir) 2)
  27.     (   (makedir installObsoleteDir
  28.         (prompt "Creating a directory " installObsoleteDir " to keep "
  29.             "old config files."
  30.         )
  31.         (help "Old user-editabe files may be prevented from "
  32.               "deletion by copying them to " installObsoleteDir
  33.               ". You may skip this part, if you don't want this.\n\n"
  34.               @makedir-help
  35.         )
  36.         (confirm 2)
  37.         (infos)
  38.         )
  39.         (if (<> (exists installObsoleteDir) 2)
  40.         (   (set installObsoleteDir "")
  41.         ))
  42.     ))
  43.     (set installObsoleteDirChecked 1)
  44.     ))
  45. )
  46.  
  47.  
  48. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  49. ;;;
  50. ;;;  CheckObsoleteFile procedure
  51. ;;;
  52. ;;;  Uses: checkObsoleteFileName    name of file to be copyied into the
  53. ;;;                                 obsolete directory (relative to
  54. ;;;                                 installDir)
  55. ;;;        installObsoleteDir       name of the "obsolete" directory
  56. ;;;        installDir               name of the installation directory
  57. ;;;
  58. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  59. (procedure CheckObsoleteFile
  60.  
  61.     (if (exists checkObsoleteFileName)
  62.     (   (CheckObsoleteDir)
  63.  
  64.     (if installObsoleteDir
  65.     (   (copyfiles
  66.         (prompt ("Preserving old file %s ..." checkObsoleteFileName))
  67.         (help "The old file " checkObsoleteName " may be preserved "
  68.               "by copying it to " installObsoleteDir ". You may skip "
  69.               "this part, if you don't want this.\n\n"
  70.               @copyfiles-help
  71.         )
  72.         (source checkObsoleteFileName)
  73.         (dest installObsoleteDir)
  74.         (infos)
  75.         (confirm 2)
  76.         (optional "oknodelete" "force" "askuser")
  77.         )
  78.     ))
  79.     ))
  80. )
  81.  
  82.  
  83.  
  84. (set intro
  85. (cat "\n Welcome to the installation of Barfly!\n\n"
  86.      "© Copyright 1994 by Ralph Schmidt\n"
  87.      "All Rights Reserved"
  88. ))
  89.  
  90.  
  91.  
  92. ; Kickstart version test
  93.  
  94. (if (< (/ (getversion) 65536) 37)
  95. (
  96.  (abort "\n\n\nYou must be using at least Kickstart 2.04 (Version 37.175) !")
  97. ))
  98.  
  99. ; here we go
  100.  
  101. (welcome intro)
  102.  
  103. ; install Program
  104.  
  105. (set @default-dest "SYS:")
  106.  
  107. (set dest2 "SYS:")
  108.  
  109. (complete 0)
  110.  
  111. (set dest2 (askdir  (prompt "Select the location to install the Barfly directory")
  112.                     (default @default-dest)
  113.                     (help "Choose a destination partition or directory " 
  114.                           "to contain the Barfly Development System."
  115.                           "The install will create a directory called"
  116.                           "Barfly at the location your choose and copy"
  117.                           "the needed files to that directory"
  118.                     )
  119.             )
  120. )
  121.  
  122. (set dest1 (tackon dest2 "Barfly"))
  123. (set installDir dest1)
  124.  
  125.  
  126. (set @default-dest dest1)
  127. (message "Package will be installed in " 
  128.           dest1
  129. )
  130.  
  131. (if (= (exists @default-dest) 0)
  132.     (makedir @default-dest)
  133. )
  134.  
  135. (copyfiles (source "/Barfly.info")
  136.            (dest   dest2)
  137. )
  138.  
  139.  
  140. (set n 0)
  141. (while (set file (select n "s/BarFly/BARFLY.DebugConfig"
  142.                "s/BarFly/BARFLY.DefIcon.info"
  143.                "s/BarFly/BARFLY.FD"
  144.                "s/BarFly/BARFLY.FD_V2.04"
  145.                "s/BarFly/BARFLY.Include"
  146.                "s/Barfly/Barfly.Include_v37"
  147.                ""
  148.        ))
  149. (   (set checkObsoleteFileName (tackon dest1 file))
  150.     (CheckObsoleteFile)
  151.     (set n (+ n 1))
  152. ))
  153.  
  154.  
  155. (copyfiles (source "")
  156.            (dest   @default-dest)
  157.            (all)
  158. )
  159.  
  160. (copylib (source "libs/cachefile.library")
  161.          (dest   "libs:")
  162. )
  163. (message "cachefile.library is used for the BASM cache functions and is copied to libs:")
  164.  
  165. (if (<> (exists "libs/barfly.library") 0)
  166.         (copylib (source "libs/barfly.library")
  167.                  (dest   "libs:")
  168.         )
  169. )
  170.  
  171. (if (<> (exists "libs/barfly.library") 0)
  172.         (message "barfly.library is the key and was copied to libs:")
  173. )
  174.  
  175.  
  176. (message "Path will be added to the user-startup")
  177.  
  178. (set dest3 (cat "path " dest1 " add" "\n"))
  179.  
  180. (startup "Barfly Development System"
  181.    (prompt ("%s\n%s\n\n%s\n%s\n"
  182.             "The following path is needed."
  183.             "Do you want the path added to your startup?"
  184.             dest3
  185.             "NOTE: The path will not be updated until you reboot."
  186.             )
  187.    )
  188.    (command 
  189.            ("") dest3
  190.    )
  191.    (help "The programs BAsm and BDebug need to be in the path"
  192.          "to be found by the system"
  193.          "If you request it, the installer will add the necessary"
  194.          "path to your user-startup script, which is run when your"
  195.          "machine boots.  If you decide not to allow the installer"
  196.          "to make these changes, you will need to make them yourself."
  197.    )
  198. )
  199.  
  200. (message "env:BarflyPath will be created for the configuration files")
  201.  
  202. (textfile (dest "env:BarflyPath")
  203.           (append dest1)
  204.           (append "/s/Barfly")
  205. )
  206.  
  207. (message "envarc:BarflyPath will be created for the configuration files")
  208.  
  209. (textfile (dest "envarc:BarflyPath")
  210.           (append dest1)
  211.           (append "/s/Barfly")
  212. )
  213.  
  214.  
  215. (message "BDebug-Desktop Screen is shown to demonstrate the Debuggers abilities")
  216.  
  217. (set dest4 (cat "sys:utilities/Multiview " dest1 "BDebug.iff" ))
  218.  
  219. (run dest4
  220.    (prompt ("%s\n"
  221.             "Do you wanna see a Desktop-Screen of the Debugger?"
  222.             )
  223.    )
  224. )
  225.