home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 98 / af098b.adf / archives / ScionsPreview2.lzx / ScionsPreview2 / Install_Scions < prev    next >
Encoding:
Text File  |  1997-02-15  |  6.9 KB  |  231 lines

  1. ;
  2. ; $VER: Scions Preview Installation script 1.3 (1997-01-13)
  3. ; (c) Copyright DSP 1996-97
  4. ;
  5.  
  6. ; FS Set Requirements Strings
  7. ;--------------------------------------------------------------------------------------------------------
  8. ;
  9. (set #mincpu "68020")
  10. (set #minos  "39")
  11. (set #mindisk 1400000)
  12. (set #minchip "AA")
  13.  
  14. (if (>= @installer-version 42)
  15.     (set #choicehead (cat "\x1b[2p"))
  16.     (set #choicehead (cat ""))
  17. )
  18. ; FE
  19.  
  20. ; FS English strings
  21. ;--------------------------------------------------------------------------------------------------------
  22. ;
  23. (set #DirName "Scions_PreviewII")
  24. (set #Welcome   (cat              "Welcome to the\n"
  25.                         "'Almagica - Scions of a Forgotten World'\n"
  26.                              "Preview installation script.\n"
  27.                      "This Preview will require atleast this equipment:\n"
  28.                              "A " #mincpu " cpu or better\n"
  29.                            "AmigaDOS V" #minos " of better\n"
  30.                       (/ #mindisk 1024) " KBytes of free harddisk space\n"
  31.                      "AGA Chipset or A CyberGraphX compatible graphics card\n"))
  32.  
  33.  
  34. (set #OldOS     (cat "You need V" #minos "+ of AmigaDOS to run this preview."))
  35. (set #LowCpu    (cat "You need a " #mincpu " or better to run this preview."))
  36. (set #OldChip   (cat "You need AGA chipset to run this preview."))
  37. (set #LowDisk   (cat "This preview requires atleast " (/ #mindisk 1024) "KBytes of free disk space."))
  38. (set #Exists    (cat "An Installation of " #DirName " has already been done."))
  39.  
  40.  
  41. (set #Location  (cat "Where do you wish to install this preview? A directory named "
  42.                               #DirName " will be created here."))
  43.  
  44. (set #LocationH (cat "Please select where on your harddisk you wish to place "
  45.                       "'Almagica - Scions of a Forgotten World'. A directory "
  46.                        "called '" #DirName "' will be created there and all "
  47.                         "files needed will be placed inside that directory."))
  48.  
  49. ;
  50. ; CybGfx strings
  51. ;
  52.  
  53. (set #cyberquestion (cat "Do you have a CyberGraphX installed?"))
  54. (set #cyberhelp     (cat "I can see that you don't have the AGA chipset. In order to be able to "
  55.                          "play Almagica, you will need a CyberGraphX card."))
  56.  
  57. ;
  58. ; AHI strings
  59. ;
  60.  
  61.  
  62. (set #ahiinstall     (cat "Do you wish to install Audio Hardware Interface (AHI) ?"))
  63. (set #ahiinstallhelp (cat "Audio Hardware Interface (AHI) is a system for hardware independent audio. "
  64.                           "AHI supports most soundcards for the Amiga. If you do not have AHI installed "
  65.                           "you will not be able to use any sound or music in the game."))
  66.  
  67. (set #ahideviceprompt (cat "Do you wish to install the file ahi.device into your DEVS: drawer?"))
  68.  
  69. (set #ahiprompt     (cat "Going to install Audio Hardware Interface (AHI) into your DEVS: drawer.\n\n"
  70.                          "Current file : "))
  71.  
  72. (set #ahihelp       (cat "Almagica uses the Audio Hardware Interface (AHI) to play sounds and music. "
  73.                          "AHI is the CyberGraphX of the audio, meaning that AHI supports a number of "
  74.                          "diffrent audio cards."))
  75.  
  76. (set #yes           (cat "Yes"))
  77. (set #no            (cat "No"))
  78.  
  79. ; FE
  80.  
  81. ; FS P_TestRequrements
  82. ;
  83. (procedure P_TestRequrements
  84.  
  85.     (if (< (/ (getversion) 65536) #minos) (abort #OldOs))   ; Test OS-version
  86.     (if (< (database "cpu") #mincpu)      (abort #LowCPU))  ; Test CPU
  87.  
  88.     (if (not (patmatch #minchip (database "chiprev")))      ; Test Graphics
  89.         (set #usecyber                                      ;
  90.             (askchoice                                      ;
  91.                 (prompt #cyberquestion)                     ;  No AGA chips found, ask if user got
  92.                 (help   #cyberhelp)                         ;   Cybergraphics
  93.                 (choices (cat #choicehead #yes) #no)        ;
  94.             )                                               ;
  95.         )                                                   ;
  96.     )                                                       ;
  97.  
  98. )
  99. ; FE
  100.  
  101. ; FS P_SetDest
  102. (procedure P_SetDest
  103.  
  104.     (set @default-dest                  ; Ask for the destinition
  105.         (askdir                         ;
  106.             (prompt     #Location)      ;
  107.             (help       #LocationH)     ;
  108.             (default    @default-dest)  ;
  109.         )
  110.     )
  111.  
  112. )
  113. ; FE
  114.  
  115. ; FS P_CheckDiskSpace
  116. (procedure P_CheckDiskSpace
  117.  
  118.     (if (< (getdiskspace @default-dest) #mindisk) (abort #LowDisk))
  119.  
  120. )
  121. ; FE
  122.  
  123. ; FS P_CheckOtherInstallation
  124. (procedure P_CheckOtherInstallation
  125.  
  126.     (if (<> 0 (exists @default-dest)) (exit #Exists))
  127.  
  128. )
  129. ; FE
  130.  
  131. ; FS P_InstallAHI
  132. (procedure P_InstallAHI
  133.  
  134.     (if (askbool                                                ; Ask if we should install AHI
  135.             (prompt     #ahiinstall)                            ;
  136.             (help       #ahiinstallhelp)                        ;
  137.             (default    1)                                      ;
  138.             (choices    #yes #no)                               ;
  139.         )
  140.         (
  141.             (copylib                                            ; Copy the ahi.device file
  142.                 (prompt     (cat #ahideviceprompt))             ;
  143.                 (help       #ahihelp)                           ;
  144.                 (source     "ahi/ahi.device")                   ;
  145.                 (dest       "Devs:")                            ;
  146.                 (optional   oknodelete)                         ;
  147.                 (confirm)                                       ;
  148.             )
  149.  
  150.             (makedir "Devs:AudioModes")                         ; Create needed directories in DEVS:
  151.             (makedir "Devs:AHI")                                ;
  152.  
  153.             (set #t 0)
  154.             (while (< #t 2)
  155.                 (set #file (select #t   "FileSave"                          ; The files we shall copy
  156.                                         "Paula"))                           ;
  157.                 (set #src (cat (tackon "ahi/ahi"  #file) ".audio"))
  158.                 (set #dst (cat (tackon "DEVS:ahi" #file) ".audio"))
  159.  
  160.                 (set #srcv (/ (getversion #src) 65536))                     ; Get source and dest
  161.                 (set #dstv (/ (getversion #dst) 65536))                     ;  versions and revisions
  162.                 (set #srcr (- (getversion #src) (* #srcv 65536)))           ;
  163.                 (set #dstr (- (getversion #dst) (* #dstv 65536)))           ;
  164.  
  165.                 (if (or (> #srcv #dstv) (and (= #srcv #dstv) (> #srcr dstr)))
  166.                     (
  167.                         (copyfiles                                          ; Copy driver file
  168.                             (source #src)                                   ;
  169.                             (dest   "DEVS:Ahi")                             ;
  170.                         )
  171.                     )
  172.                 )
  173.                 (if (not (exists (tackon "DEVS:AudioModes" #file)))         ; Make sure the prefs file
  174.                     (copyfiles                                              ;  exists
  175.                         (source (tackon "ahi/AudioModes"  #file))           ;
  176.                         ;(dest   (tackon "DEVS:AudioModes" #file))          ;
  177.                         (dest "DEVS:AudioModes")                            ;
  178.                     )
  179.                 )
  180.  
  181.                 (set #t (+ #t 1))
  182.             )
  183.         )
  184.     )
  185. )
  186. ; FE
  187.  
  188. ; FS P_CopyMain
  189. (procedure P_CopyMain
  190.  
  191.     (makedir @default-dest (infos))
  192.  
  193.     (copyfiles
  194.         (source "")
  195.         (dest   @default-dest)
  196.         (all)
  197.     )
  198. )
  199. ; FE
  200.  
  201.  
  202. ; FS Main
  203.  
  204. (message #Welcome)
  205. (complete 0)
  206.  
  207. (P_TestRequrements)
  208. (complete 5)
  209.  
  210. (P_SetDest)
  211. (complete 10)
  212.  
  213. (P_CheckDiskSpace)
  214. (set @default-dest (tackon @default-dest #DirName))     ; Append Our directory name to the choosen path
  215. (complete 15)
  216.  
  217. (P_CheckOtherInstallation)
  218. (P_InstallAHI)
  219. (complete 30)
  220.  
  221. (P_CopyMain)
  222. (complete 99)
  223.  
  224. (message "Please remember to run the SETUP program before you start Almagica the first time.")
  225. (complete 100)
  226. (exit)
  227.  
  228.  
  229. ; FE
  230.  
  231.