home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 8 / amigaformatcd08.iso / screenplay / utilities / graal / graal2a.lha / HD_Install < prev    next >
Text File  |  1996-10-15  |  9KB  |  293 lines

  1. ; ====================
  2. ; PERFORMANCE SOFTWARE
  3. ; ====================
  4. ; GRAAL 2.0 Beta Installer Script
  5. ; (c) 1996 Per Thulin
  6. (welcome)
  7.  
  8. ; Set up some variables
  9. (set #diskname_a "GRAAL 2.0 - Disk A")
  10. (set #diskname_b "GRAAL 2.0 - Disk B")
  11. (set #diskname_c "GRAAL 2.0 - Disk C")
  12. (set #source_a (cat #diskname_a ":"))
  13. (set #source_b (cat #diskname_b ":"))
  14. (set #source_c (cat #diskname_c ":"))
  15. (set #diskprompt_a (cat "Please insert disk " #diskname_a))
  16. (set #diskprompt_b (cat "Please insert disk " #diskname_b))
  17. (set #diskprompt_c (cat "Please insert disk " #diskname_c))
  18. (set #helpdisk
  19.   (cat
  20.     "The installation procedure requires the disks to be named exactly"
  21.     " as requested. If you have created the disks from the Aminet archives,"
  22.     " just rename them properly before running the installer."
  23.     )
  24.   )
  25.  
  26. (select
  27.   (askchoice
  28.     (prompt "Please select the type of installation you want to perform:")
  29.     (help
  30.       (cat "Install the GRAAL 2.0 system:\n\n"
  31.         "Choose this if you have not installed or used GRAAL before,"
  32.         " or if you want to install the new demo adventure.\n\n"
  33.         "Update a development drawer:\n\n"
  34.         "Choose this if you just want to update the GRAAL tools and"
  35.         " documentation in an existing directory, without harming the rest"
  36.         " of its contents."
  37.         ) ; end cat
  38.       ) ; end help
  39.     (choices
  40.       "Install the GRAAL 2.0 system"
  41.       "Update a development drawer"
  42.       ) ; end choices
  43.     (default 0)
  44.     ) ; end askdir
  45.  
  46.   ( ; Installation sequence
  47.     (complete 5)
  48.     (set #instoptions
  49.       (askoptions
  50.         (prompt "Please select the parts you wish to install:")
  51.         (help
  52.           (cat
  53.             "All selected parts will be copied to the same (new)"
  54.             " hard disk drawer.\n\n"
  55.             "Demo Adventure:\n\n"
  56.             "This installs the graal driver program and all files"
  57.             " necessary to run the demo adventure.\n\n"
  58.             "Developer files:\n\n"
  59.             "This installs all programs and documentation necessary"
  60.             " to develop GRAAL adventures.\n\n"
  61.             "Tutorial\n\n"
  62.             "This installs the beginner's tutorial. Experienced GRAAL 1.0"
  63.             " and 1.2 users will perhaps not need this edition:"
  64.             ) ; end cat
  65.           ) ; end help
  66.           (choices
  67.             "Demo adventure"
  68.             "Developer files"
  69.             "Tutorial"
  70.             ) ; end choices
  71.         ) ; end askoptions
  72.       ) ; end set #instoptions
  73.     ; 
  74.     ; Set the installation directory
  75.     ; 
  76.     (complete 10)
  77.     (set #instdir
  78.       (askdir
  79.         (prompt
  80.           (cat
  81.             "Please select the place where GRAAL should be installed."
  82.             " A new drawer called GRAAL_2 will be created in the chosen"
  83.             " location."
  84.             ) ; end cat
  85.           ) ; end prompt
  86.         (help
  87.           (cat
  88.             "You do not need to make any assigns to use GRAAL. However,"
  89.             " keeping the GRAAL tools and the adventure script files in"
  90.             " the same drawer is important.)"
  91.             ) ; end cat
  92.           ) ; end help
  93.         (default @default-dest)
  94.         ) ; end askdir
  95.       ) ; end set #instdir
  96.     ; 
  97.     ; Check if drawer needs to be created
  98.     ; 
  99.     (complete 15)
  100.     (set #instdir (tackon #instdir "GRAAL_2"))
  101.     (set @default-dest #instdir)
  102.     (if (not (exists #instdir))
  103.       (makedir #instdir (infos))
  104.       ) ; end if
  105.     ; 
  106.     ; Check if we should install demo files
  107.     ; 
  108.     (if (in #instoptions 0)
  109.       ( ; demo installation sequence
  110.         (askdisk
  111.           (prompt #diskprompt_a)
  112.           (help #helpdisk)
  113.           (dest #diskname_a)
  114.           ) ; end askdisk
  115.         (copyfiles
  116.           (source #source_a)
  117.           (dest #instdir)
  118.           (all)
  119.           (infos)
  120.           ) ; end copyfiles
  121.         (askdisk
  122.           (prompt #diskprompt_b)
  123.           (help #helpdisk)
  124.           (dest #diskname_b)
  125.           ) ; end askdisk
  126.         (copyfiles
  127.           (source #source_b)
  128.           (dest #instdir)
  129.           (all)
  130.           (infos)
  131.           ) ; end copyfiles
  132.         (if (not (in #instoptions 1))
  133.           (delete (tackon #instdir "gpro") (infos))
  134.           ) ; endif
  135.         ) ; end demo installation sequence
  136.       ) ; end if
  137.     ; 
  138.     ; Check if we should install developer files
  139.     ; 
  140.     (complete 50)
  141.     (if (in #instoptions 1)
  142.       ( ; developer installation sequence
  143.         ; check if GRAAL_2 has been copied already
  144.         (if (not (exists (tackon #instdir "GRAAL_2")))
  145.           ( ; install driver
  146.             (askdisk
  147.               (prompt #diskprompt_a)
  148.               (help #helpdisk)
  149.               (dest #diskname_a)
  150.               ) ; end askdisk
  151.             (copyfiles
  152.               (source #source_a)
  153.               (dest #instdir)
  154.               (choices "GRAAL_2")
  155.               (infos)
  156.               ) ; end copyfiles
  157.             ) ; end install driver
  158.           ) ; end if
  159.         (if (not (exists (tackon #instdir "gpro")))
  160.           ; check if gpro has been copied already
  161.           ( ; install gpro
  162.             (askdisk
  163.               (prompt #diskprompt_b)
  164.               (help #helpdisk)
  165.               (dest #diskname_b)
  166.               ) ; end askdisk
  167.             (copyfiles
  168.               (source #source_b)
  169.               (dest #instdir)
  170.               (pattern "gpro")
  171.               (infos)
  172.               ) ; end copyfiles
  173.             ) ; end install gpro
  174.           ) ; end if
  175.         (askdisk
  176.           (prompt #diskprompt_c)
  177.           (help #helpdisk)
  178.           (dest #diskname_c)
  179.           ) ; end askdisk
  180.         (copyfiles
  181.           (source #source_c)
  182.           (dest #instdir)
  183.           (choices
  184.             "GRAAL_Editor"
  185.             "gdc"
  186.             "GRAAL.guide"
  187.             "GRAAL_2.readme"
  188.             "Prod.text"
  189.             "Editor.text"
  190.             ) ; end choices
  191.           (infos)
  192.           ) ; end copyfiles
  193.         ) ; end developer installation sequence
  194.       ) ; end if
  195.     ; 
  196.     ; Check if we should install tutorial
  197.     ; 
  198.     (complete 90)
  199.     (if (in #instoptions 2)
  200.       ( ; tutorial installation sequence
  201.         (askdisk
  202.           (prompt #diskprompt_c)
  203.           (help #helpdisk)
  204.           (dest #diskname_c)
  205.           ) ; end askdisk
  206.         (copyfiles
  207.           (source #source_c)
  208.           (dest #instdir)
  209.           (choices "GRAAL_Tutorial.text")
  210.           (infos)
  211.           ) ; end copyfiles
  212.         ) ; end tutorial installation sequence
  213.       ) ; end if
  214.  
  215.     ) ; end of installation sequence
  216.  
  217.   ( ; Update sequence
  218.     (complete 5)
  219.     (set #instdir
  220.       (askdir
  221.         (prompt
  222.           (cat
  223.             "Please point to the development directory to be updated with"
  224.             " the new GRAAL tools and documentation."
  225.             ) ; end cat
  226.           ) ; end prompt
  227.         (help
  228.           (cat
  229.             "All old GRAAL tools and documentation files will be removed"
  230.             " and replaced with the new versions. However, renamed copies of"
  231.             " GRAAL_Dev or GRAAL_Run will NOT be handled automatically."
  232.             " When the installation has finished, you must deal with them"
  233.             " and rename the GRAAL_2 file to your liking manually."
  234.             ) ; end cat
  235.           ) ; end help
  236.         (default @default-dest)
  237.         ) ; end askdir
  238.       ) ; end set #instdir
  239.     (set @default-dest #instdir)
  240.     (complete 10)
  241.     (delete (tackon #instdir "GRAAL_Run") (infos))
  242.     (delete (tackon #instdir "GRAAL_Dev") (infos))
  243.     (delete (tackon #instdir "GRAAL_Tutorial.text") (infos))
  244.     (delete (tackon #instdir "GRAAL_Editor") (infos))
  245.     (delete (tackon #instdir "Editor.text") (infos))
  246.     (delete (tackon #instdir "GRAAL.guide") (infos))
  247.     ( ; developer installation sequence
  248.       (askdisk
  249.         (prompt #diskprompt_a)
  250.         (help #helpdisk)
  251.         (dest #diskname_a)
  252.         ) ; end askdisk
  253.       (copyfiles
  254.         (source #source_a)
  255.         (dest #instdir)
  256.         (choices "GRAAL_2")
  257.         (infos)
  258.         ) ; end copyfiles
  259.       (complete 20)
  260.       (askdisk
  261.         (prompt #diskprompt_b)
  262.         (help #helpdisk)
  263.         (dest #diskname_b)
  264.         ) ; end askdisk
  265.       (copyfiles
  266.         (source #source_b)
  267.         (dest #instdir)
  268.         (pattern "gpro")
  269.         (infos)
  270.         ) ; end copyfiles
  271.       (complete 30)
  272.       (askdisk
  273.         (prompt #diskprompt_c)
  274.         (help #helpdisk)
  275.         (dest #diskname_c)
  276.         ) ; end askdisk
  277.       (copyfiles
  278.         (source #source_c)
  279.         (dest #instdir)
  280.         (all)
  281.         (infos)
  282.         ) ; end copyfiles
  283.       ) ; end developer installation sequence
  284.     ) ; end of update sequence
  285.  
  286.   ) ; end select
  287.  
  288. (complete 100)
  289.