home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 122 / af122sub.adf / BOGL.lzx / BOGL / BOGL.install < prev    next >
Text File  |  2005-06-04  |  4KB  |  202 lines

  1. ;
  2. ; BOGL installer
  3. ;
  4.  
  5. ;;
  6. ;; Want at least OS v39
  7. ;;
  8. (if (< (/ (getversion) 65536) 39)
  9.     (
  10.         (message "You need at least OS v39")
  11.         (exit (quiet))
  12.     )
  13. )
  14.  
  15. ;;
  16. ;; BOGL only makes sense with AmigaMesaRTL
  17. ;;
  18. (if (not (exists "libs:mesamain.library"))
  19.     (
  20.         (message "You don't appear to have AmigaMesaRTL installed. BOGL needs it.")
  21.         (exit (quiet))
  22.     )
  23. )
  24.  
  25. ;;
  26. ;; AmigaMesaRTL should be at least v2
  27. ;;
  28. (if (< (/ (getversion "libs:mesamain.library") 65536) 2)
  29.     (
  30.         (message "You need at least v2.0 or AmigaMesaRTL installed")
  31.         (exit (quiet))
  32.     )
  33. )
  34.  
  35. ;;
  36. ;; Excuse me Sir, where is the madhouse?
  37. ;;
  38. (if (exists "SYS:Tools/Madhouse")
  39.     (set #maddir "SYS:Tools/Madhouse")
  40.     (if (exists "SYS:Utilities/Madhouse")
  41.         (set #maddir "SYS:Utilities/Madhouse")
  42.         (if (exists "SYS:Madhouse")
  43.             (set #maddir "SYS:Madhouse")
  44.             (set #maddir
  45.                 (askdir
  46.                     (prompt "Where is the Madhouse directory?")
  47.                     (help @askdir-help)
  48.                     (default "SYS:")
  49.                 )
  50.             )
  51.         )
  52.     )
  53. )
  54.  
  55. (set #madblankdir
  56.     (tackon #maddir "blankers")
  57. )
  58.  
  59. ;;
  60. ;; Make sure the blankers dir is where we expect it to be
  61. ;;
  62. (if (not (exists #madblankdir))
  63.     (set #madblankdir
  64.         (askdir
  65.             (prompt "Can't find Madhouse blankers directory.\nWhere is it?")
  66.             (help @askdir-help)
  67.             (default #madblankdir)
  68.         )
  69.     )
  70. )
  71.  
  72. (set #boglblankdir
  73.     (tackon #madblankdir "BOGL")
  74. )
  75.  
  76. (set #boglblanker
  77.     (tackon #boglblankdir "blanker")
  78. )
  79.  
  80. ;;
  81. ;; Copy main BOGL module
  82. ;;
  83. (copylib
  84.     (prompt "Copying BOGL module to " #boglblankdir)
  85.     (source "blanker/blanker")
  86.     (dest #boglblankdir)
  87. )
  88.  
  89. ;;
  90. ;; Install Blank output handler
  91. ;;
  92. (copylib
  93.     (prompt "Copying Blank output handler")
  94.     (source "outputhandlers/Blank")
  95.     (dest "libs:outputhandlers/")
  96. )
  97.  
  98. ;;
  99. ;; Oooh, look at all those blanker options!
  100. ;;
  101. (copyfiles
  102.     (prompt "Copying BOGL gadget file to " #boglblankdir)
  103.     (source "blanker/gadget")
  104.     (dest #boglblankdir)
  105.     (files)
  106. )
  107.  
  108. ;;
  109. ;; If there isn't a programme already, install one
  110. ;;
  111. (set #boglprogramme
  112.     (tackon #boglblankdir "BOGL.programme")
  113. )
  114.  
  115. (if (not (exists #boglprogramme))
  116.     (copyfiles
  117.         (prompt "Copying example BOGL programme to " #boglblankdir)
  118.         (source "blanker/BOGL.programme")
  119.         (dest #boglblankdir)
  120.         (files)
  121.     )
  122. )
  123.  
  124. ;;
  125. ;; If there isn't a preference setting, install one
  126. ;;
  127. (set #boglprefs
  128.     (tackon #boglblankdir "pref")
  129. )
  130.  
  131. (if (not (exists #boglprefs))
  132.     (copyfiles
  133.         (prompt "Copying BOGL preference file to " #boglblankdir)
  134.         (source "blanker/pref")
  135.         (dest #boglblankdir)
  136.         (files)
  137.     )
  138. )
  139.  
  140. ;;
  141. ;; Make sure the AmigaMesaRTL/Window variable is set
  142. ;;
  143. (set #windowenv "AmigaMesaRTL/Window")
  144.  
  145. (if (= "" (getenv #windowenv))
  146.     (
  147.         (if (exists "libs:outputhandlers/dl1")
  148.             (set #defwindowhandler "libs:outputhandlers/dl1")
  149.         )
  150.         (if (exists "libs:outputhandlers/dl1plus")
  151.             (set #defwindowhandler "libs:outputhandlers/dl1plus")
  152.         )
  153.         (set #windowhandler
  154.             (askfile
  155.                 (prompt "The AmigaMesaRTL/Window environment variable must be set to an output handler for windows.\nMost likely you want this to be DL1Plus or DL1")
  156.                 (help @askdir-help)
  157.                 (default #defwindowhandler)
  158.             )
  159.         )
  160.         (textfile
  161.             (dest (tackon "ENV:" #windowenv))
  162.             (append (fileonly #windowhandler))
  163.         )
  164.         (textfile
  165.             (dest (tackon "ENVARC:" #windowenv))
  166.             (append (fileonly #windowhandler))
  167.         )
  168.     )
  169. )
  170.  
  171. ;;
  172. ;; Copy guide file
  173. ;;
  174. (if (exists "Help:english")
  175.     (set #helpdir "Help:english")
  176.     (if (exists "Help:")
  177.         (set #helpdir "Help:")
  178.         (set #helpdir
  179.             (askdir
  180.                 (prompt "Where do you want the BOGL Guide file?")
  181.                 (help @askdir-help)
  182.                 (default #boglblankdir)
  183.             )
  184.         )
  185.     )
  186. )
  187.  
  188. (copyfiles
  189.     (prompt "Copying guide file to " #helpdir)
  190.     (source "BOGL.guide")
  191.     (dest #helpdir)
  192.     (files)
  193.     (infos)
  194. )
  195.  
  196. ;;
  197. ;; Yay! We're done
  198. ;;
  199. (message "The blanker is in:\n" #boglblankdir "\nThe AmigaGuide file is in\n" #helpdir)
  200. (message "Everything is now (probably) installed.\nYou should now edit the programme\n(" #boglprogramme script ")\nto suit your system before using BOGL,\n and set the preferences in Madhouse" (all))
  201. (set @default-dest #boglblankdir)
  202.