home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 8 / amigaformatcd08.iso / screenplay / utilities / wormsstuff / wormsshell / install_wormsshell < prev    next >
Encoding:
Text File  |  1996-10-19  |  9.5 KB  |  326 lines

  1. (
  2.     (set #wormsdone
  3.     (askbool
  4.         (prompt "Have you installed Worms itself yet?")
  5.         (help "It's a simple question. You weren't planning on lying to me, were you?")
  6.     )
  7.     )
  8.  
  9.     (if #wormsdone
  10.     (set #dest
  11.         (askdir
  12.         (prompt "Select the drawer Worms was installed in")
  13.         (help @askdir-help)
  14.         (default "SYS:Worms")
  15.         )
  16.     )
  17.     (
  18.         (set @app-name "Worms")
  19.         (set #dest
  20.         (askdir
  21.             (prompt "Select the drawer to install Worms and WormsShell in. "
  22.             "A new drawer will be created there for them.")
  23.             (help @askdir-help)
  24.             (default @default-dest)
  25.         )
  26.         )
  27.     )
  28.     )
  29.  
  30.     (if #wormsdone
  31.  
  32.     ;See if Worms is in selected dir or in WORMS subdir
  33.  
  34.     (if (not (exists (tackon #dest "HDWORM")))
  35.         (
  36.         (set #dest (tackon #dest "WORMS"))
  37.         (if (not (exists (tackon #dest "HDWORM")))
  38.             (abort "Worms is not installed in the selected drawer.")
  39.         )
  40.         )
  41.     )
  42.  
  43.     ;Otherwise create the Worms subdir
  44.  
  45.     (
  46.         (set #dest (tackon #dest "Worms"))
  47.         (makedir #dest (infos))
  48.     )
  49.     )
  50.  
  51.     (set @default-dest #dest)
  52.  
  53.     (if #wormsdone
  54.     (
  55.         (set #delicon 1)
  56.         (if (= @user-level 2)
  57.         (set #delicon
  58.             (askbool
  59.             (prompt "Would you like to delete the old icon for HDWORM?")
  60.             (help "Since WormsShell creates a new icon labelled Worms "
  61.                 "which you can use to start Worms through WormsShell, "
  62.                 "you shouldn't need the old icon any more.")
  63.             )
  64.         )
  65.         )
  66.         (set #cleanup 1)
  67.         (if (= @user-level 2)
  68.         (set #cleanup
  69.             (askbool
  70.             (prompt "Would you like to remove the unnecessary "
  71.                 "files which the Worms installer copied to your hard drive?")
  72.             (help "This procedure will delete the files which Worms installs "
  73.                 "to your hard drive but are only required when running from "
  74.                 "floppy disks:"
  75.                 "· devs/system-configuration\n"
  76.                 "· Disk.info\n"
  77.                 "· INSTALL(.info)\n"
  78.                 "· libs/#?.library\n"
  79.                 "· OCEAN\n"
  80.                 "· Run\n"
  81.                 "· s/startup-sequence\n"
  82.                 "· TEAM17")
  83.             )
  84.         )
  85.         )
  86.     )
  87.     (
  88.         (if (= @language "english")
  89.         (set #langs 1)
  90.         (if (= @language "français")
  91.             (set #langs 2)
  92.             (if (= @language "deutsch")
  93.             (set #langs 4)
  94.             (set #langs 0)
  95.             )
  96.         )
  97.         )
  98.         (set #langs
  99.         (askoptions
  100.             (prompt "Which languages would you like to install?")
  101.             (help "Speech samples for the chosen languages will be "
  102.             "installed for you. You must choose at least one "
  103.             "language. Each time you run Worms, you will be "
  104.             "asked which language to use.")
  105.             (choices "pEnglish" "Français" "Deutsch")
  106.             (default #langs)
  107.         )
  108.         )
  109.         (if (= #langs 0)
  110.         (abort "You failed to select any languages.")
  111.         )
  112.     )
  113.     )
  114.  
  115.     (set #guide
  116.     (askbool
  117.         (prompt "Do you want to install the WormsShell guide file?")
  118.         (help "This is the file you should have read before starting "
  119.         "this installation. Even if you have already read it, "
  120.         "you may want to have it to hand in case you want to "
  121.         "make changes to your Worms and WormsShell installations.")
  122.     )
  123.     )
  124.  
  125.     ;Ask whether to set the two switches
  126.  
  127.     (set #sheep
  128.     (askbool
  129.         (prompt "Do you want Worms to start with Sheep Mode on?")
  130.         (help "Sheep Mode gives you lots of extra explosive weapons in every round.")
  131.     )
  132.     )
  133.  
  134.     (set #cprot
  135.     (askbool
  136.         (prompt "Do you want to leave the copy-protection enabled?")
  137.         (help "I suppose you might want to do this if you can hide the code booklet "
  138.         "from Worms-addicted friends/relatives who don't know about WormsShell.")
  139.     )
  140.     )
  141.  
  142.     ;Install WormsShell itself
  143.  
  144.     (working "Installing WormsShell")
  145.  
  146.     (copyfiles (source "Worms") (dest #dest) (help "") (prompt ""))
  147.     (copyfiles (source "WormsShell") (dest #dest) (infos) (noposition) (help "") (prompt ""))
  148.  
  149.     (if #guide
  150.     (copyfiles (source "WormsShell.guide") (dest #dest) (infos) (noposition) (help "") (prompt ""))
  151.     )
  152.  
  153.     (if #wormsdone
  154.     (
  155.         ;Modify existing Worms installation
  156.  
  157.         (working "Removing unneeded files")
  158.  
  159.         ;Delete icon if requested
  160.  
  161.         (if #delicon (delete (tackon #dest "HDWORM.info")))
  162.  
  163.         ;Delete unneeded files if requested
  164.  
  165.         (if #cleanup
  166.         (
  167.             (delete (tackon #dest "devs") (all))
  168.             (delete (tackon #dest "Disk.info"))
  169.             (delete (tackon #dest "INSTALL") (infos))
  170.             (delete (tackon #dest "libs") (all))
  171.             (delete (tackon #dest "OCEAN"))
  172.             (delete (tackon #dest "Run"))
  173.             (delete (tackon #dest "s") (all))
  174.             (delete (tackon #dest "TEAM17"))
  175.         )
  176.         )
  177.     )
  178.     )
  179.  
  180.     (if (not #wormsdone)
  181.     (
  182.         ;Install Worms
  183.  
  184.         ;Install main Worms files
  185.  
  186.         (askdisk
  187.         (prompt "Insert Worms disk 1")
  188.         (help @askdisk-help)
  189.         (dest "TW1")
  190.         )
  191.         (working "Installing Worms program")
  192.         (copyfiles (source "TW1:FLOPPYWORM") (dest #dest))
  193.         (copyfiles (source "TW1:WORMS") (dest #dest) (newname "HDWORM"))
  194.         (working "Installing Worms graphics")
  195.         (copyfiles (source "TW1:TWSTUFF") (dest (tackon #dest "TWSTUFF")) (all))
  196.         (working "Installing Worms basic samples")
  197.         (copyfiles (source "TW1:TW500") (dest (tackon #dest "TW500")) (all))
  198.         (working "Installing default Worm and team lists")
  199.         (copyfiles (source "TW1:TEAMLIST") (dest #dest))
  200.         (copyfiles (source "TW1:WORMLIST") (dest #dest))
  201.         (working "Installing custom landscapes")
  202.         (makedir (tackon #dest "TWCUSTOM") (infos))
  203.         (copyfiles (source "TW1:TWCUSTOM") (dest (tackon #dest "TWCUSTOM")) (all))
  204.  
  205.         ;Install requested languages
  206.  
  207.         (if (in #langs 0)
  208.         (
  209.             (tooltype (dest (tackon #dest "WormsShell")) (settooltype "SAMPLEDIR1" "ENGLISH"))
  210.             (if (not (in #langs 1))
  211.             (tooltype (dest (tackon #dest "WormsShell")) (settooltype "SAMPLEDIR2" "ENGLISH")))
  212.             (if (not (in #langs 2))
  213.             (tooltype (dest (tackon #dest "WormsShell")) (settooltype "SAMPLEDIR3" "ENGLISH")))
  214.             (askdisk
  215.             (prompt "Insert Worms disk 2")
  216.             (help @askdisk-help)
  217.             (dest "TW2")
  218.             )
  219.             (working "Installing English samples")
  220.             (makedir (tackon #dest "ENGLISH") (infos))
  221.             (copyfiles (source "TW2:TWENGLISH") (dest (tackon #dest "ENGLISH")) (all))
  222.         )
  223.         )
  224.         (if (in #langs 1 2)
  225.         (
  226.             (askdisk
  227.             (prompt "Insert Worms disk 3")
  228.             (help @askdisk-help)
  229.             (dest "TW3")
  230.             )
  231.             (if (in #langs 1)
  232.             (
  233.                 (if (not (in #langs 0))
  234.                 (tooltype (dest (tackon #dest "WormsShell")) (settooltype "SAMPLEDIR1" "FRANCAIS")))
  235.                 (tooltype (dest (tackon #dest "WormsShell")) (settooltype "SAMPLEDIR2" "FRANCAIS"))
  236.                 (if (not (in #langs 2))
  237.                 (tooltype (dest (tackon #dest "WormsShell")) (settooltype "SAMPLEDIR3" "FRANCAIS")))
  238.                 (working "Installant les échantillons françaises")
  239.                 (makedir (tackon #dest "FRANCAIS") (infos))
  240.                 (copyfiles (source "TW3:TWFRENCH") (dest (tackon #dest "FRANCAIS")) (all))
  241.             )
  242.             )
  243.             (if (in #langs 2)
  244.             (
  245.                 (if (not (in #langs 0))
  246.                 (tooltype (dest (tackon #dest "WormsShell")) (settooltype "SAMPLEDIR1" "DEUTSCH")))
  247.                 (if (not (in #langs 1))
  248.                 (tooltype (dest (tackon #dest "WormsShell")) (settooltype "SAMPLEDIR2" "DEUTSCH")))
  249.                 (tooltype (dest (tackon #dest "WormsShell")) (settooltype "SAMPLEDIR3" "DEUTSCH"))
  250.                 (working "Installing die Deutschen Geräusche")
  251.                 (makedir (tackon #dest "DEUTSCH") (infos))
  252.                 (copyfiles (source "TW3:TWGERMAN") (dest (tackon #dest "DEUTSCH")) (all))
  253.             )
  254.             )
  255.         )
  256.         )
  257.     )
  258.     )
  259.  
  260.     ;Set the switches as requested
  261.  
  262.     (if #sheep
  263.     (tooltype (dest (tackon #dest "WormsShell")) (settooltype "SHEEPMODE" ""))
  264.     (tooltype (dest (tackon #dest "WormsShell")) (settooltype "(SHEEPMODE)" ""))
  265.     )
  266.     (if #cprot
  267.     (tooltype (dest (tackon #dest "WormsShell")) (settooltype "(DEPROTECT)" ""))
  268.     (tooltype (dest (tackon #dest "WormsShell")) (settooltype "DEPROTECT" ""))
  269.     )
  270.  
  271.     (if (not #wormsdone)
  272.     (
  273.         ;Get boot-menu version (if available)
  274.  
  275.         (set #bmversion (/ (getversion "bootmenu" (resident)) 65536))
  276.  
  277.         (if (= #bmversion 0)
  278.         (
  279.             (set #breakproc (cat
  280.             "· Remove any floppy disks.\n"
  281.             "· Reboot your Amiga.\n"
  282.             "· Wait for the Commodore copyright message to appear on the screen.\n"
  283.             "· Press Control-D. You should see the message \"*** BREAK\" or similar.\n")
  284.             )
  285.             (set #cmdline "execute Worms")
  286.         )
  287.         (
  288.             (if (< #bmversion 39)
  289.             (set #breakproc (cat
  290.                 "· Remove any floppy disks.\n"
  291.                 "· Reboot your Amiga.\n"
  292.                 "· Hold down both mouse buttons until a screen labelled \"Boot Menu\" appears.\n"
  293.                 "· Click on \"Advanced Options\".\n"
  294.                 "· Click on the cycle-gadget labelled \"Startup-Sequence\".\n"
  295.                 "· Click on \"Use\".\n"
  296.                 "· Click on the button for your hard drive - probably marked \"" (getdevice "SYS:")
  297.                 "\".\n"
  298.                 "· Wait for a window containing a copyright notice to appear.")
  299.             )
  300.             (set #breakproc (cat
  301.                 "· Remove any floppy disks.\n"
  302.                 "· Reboot your Amiga.\n"
  303.                 "· Hold down both mouse buttons until a screen labelled \"Amiga Early Startup"
  304.                 "Control\" appears.\n"
  305.                 "· Click on \"Boot With No Startup-Sequence\".\n"
  306.                 "· Wait for a window containing a copyright notice to appear.")
  307.             )
  308.             )
  309.             (set #cmdline "Worms")
  310.         )
  311.         )
  312.  
  313.         (message "IMPORTANT: If you do not have enough memory to run Worms "
  314.         "after booting normally, Worms will either die (leaving you with a blank screen) "
  315.         "or else exit with an error message. In this case, you will have to run Worms "
  316.         "manually from the CLI. This is not as hard as it may sound, but you may want "
  317.         "to write down these instructions for future reference. These are specific "
  318.         "to your particular Amiga and are therefore not contained in the WormsShell guide."
  319.         "To run Worms from the CLI:\n"
  320.         #breakproc
  321.         "· Type 'cd \"" #dest "\"' and press Return.\n"
  322.         "· Type '" #cmdline "' and press Return.")
  323.     )
  324.     )
  325. )
  326.