home *** CD-ROM | disk | FTP | other *** search
/ The Amiga Game Guide / AmigaGameGuide_CD.iso / Amiga / Games-AddOns / Lemmings2Ed / L2Ed-Install < prev    next >
Text File  |  1977-12-31  |  41KB  |  1,051 lines

  1. ;--------------------------------------------------------------------------
  2. ; $VER: Lemmings 2 Level Editor Install V1.9 (28-Jun-97).
  3. ;
  4. ; Copyright ©1996 Chris Hodges. All rights reserved.
  5. ;--------------------------------------------------------------------------
  6.  
  7. (delopts "force" "askuser" "nofail")
  8.  
  9. ;--------------------------------------------------------------------------
  10. ; Flexible installer script! So get our installation environment.
  11. ;--------------------------------------------------------------------------
  12.  
  13. (set #allowupdate 0)
  14. (set #kick (/ (getversion) 65536))
  15. (set #keyfile (exists "L2Ed.key"))
  16. (set #deinstall (exists "HDLemmings2"))
  17. (set #lems2hd (or (exists "lems2HD.lzx") (exists "lems2HD.lha")))
  18. (set #home @execute-dir)
  19.  
  20. ;--------------------------------------------------------------------------
  21. ; English Installer Strings
  22. ;--------------------------------------------------------------------------
  23.  
  24. (if (= @language "english")
  25.     (
  26.         (set #lang 1)
  27.         (set #suffix "_E")
  28.         (set #licence "Licence.txt")
  29.  
  30.         (set #ioerror "An error occured during the installation, please report it to me.\n\nThanks.")
  31.  
  32.         (set #intro
  33.             (cat
  34.                 "Welcome to the installation program for the\n\nLemmings 2 Level Editor "
  35.                 (if #keyfile "REGISTERED Version!" "SHAREWARE Demo!")
  36.                 "\n\nPlease read the Licence before proceeding.\n"
  37.                 "Continuing on the Installation means you have read and accepted the Licence conditions!\n"
  38.                 "\nThis script supports deinstallation.\n\n"
  39.                 "Note that the Installer which comes with the Kick 3.1 release is buggy and will not "
  40.                 "install this software correctly!\n"
  41.                 "Installer 1.24 is a working release.\n"
  42.             )
  43.         )
  44.  
  45.         (set #beta
  46.             (cat
  47.                 "This is a beta-release. I've decided to release it now, as I probably won't "
  48.                 "have too much time to finish it. Moreover, only very few users have registered "
  49.                 "yet, so I'm not sure if I ever gonna touch it.\n"
  50.                 "Registered users can use their old keyfiles. The Editor works well, but the new features "
  51.                 "haven't been tested too much. The german manuals are still very incomplete."
  52.             )
  53.         )
  54.  
  55.         (set #installwhere
  56.             (cat
  57.                 "Please select the Lemmings 2 drawer on your drive. "
  58.                 (if #lems2hd "The game will be installed, if not found!")
  59.             )
  60.         )
  61.  
  62.         (set #installwhere_help
  63.             (cat
  64.                 "Simply select the directory you have installed "
  65.                 "Lemmings 2 into.\n\n"
  66.                 (if #lems2hd
  67.                     (
  68.                         (cat
  69.                             "This script allows the installation of the original "
  70.                             "disks to your harddisk, if you create a new empty "
  71.                             "directory to install it to.\n"
  72.                         )
  73.                     ) (
  74.                         (cat
  75.                             "If you don't have got Lemmings 2 "
  76.                             "on your harddisk, abort the installation and "
  77.                             "do this first.\n\nIf you don't have got the harddisk "
  78.                             "version of Lemmings, have a look in the docs "
  79.                             "where it can be acquired.\n"
  80.                         )
  81.                     )
  82.                 )
  83.             )
  84.         )
  85.  
  86.         (set #copyeditor
  87.             (cat "\n"
  88.                 "Copying main Editor file...\n\n"
  89.                 "Version: " #ed_vers
  90.             )
  91.         )
  92.  
  93.         (set #mkdocsdir "\nCreating Docs Drawer...\n")
  94.         (set #copydocs_v37 "\nCopying manual (V37)...\n")
  95.         (set #copydocs_v39 "\nCopying manual (V39)...\n")
  96.  
  97.         (set #copydocs_help
  98.             (cat "\n"
  99.                 "The Docs Drawer will be used for storing the manual of the Editor. "
  100.                 "However, you may also store the guide at the following locations:\n\n"
  101.                 "PROGDIR:\n"
  102.                 "PROGDIR:Help\n"
  103.                 "PROGDIR:Docs\n"
  104.                 "HELP:\n"
  105.                 "HELP:Guide\n"
  106.                 "HELP:English\n"
  107.             )
  108.         )
  109.  
  110.         (set #copykey "\nCopying keyfile...\n")
  111.  
  112.         (set #copykey_help
  113.             (cat "\n"
  114.                 "As this is a registered version of the Editor, a keyfile is supplied "
  115.                 "to enable all features of the Editor. Normally, this keyfile is placed "
  116.                 "in PROGDIR:. Alternative locations are:\n\n"
  117.                 "PROGDIR:\n"
  118.                 "S:\n"
  119.                 "ENVARC:\n"
  120.                 "DEVS:Keyfiles\n"
  121.             )
  122.         )
  123.  
  124.         (set #makebak "\nCreating backup of Lemmings 2...\n")
  125.         (set #restbak "\nRestoring Lemmings 2 main file...\n")
  126.         (set #makebak_help
  127.             (cat "\n"
  128.                 "Creating a backup of the main Lemmings file will allow "
  129.                 "deinstallation of the Editor.\n"
  130.             )
  131.         )
  132.  
  133.         (set #installl2_help
  134.             (cat "\n"
  135.                 "As the game has not been found in this drawer, the "
  136.                 "installation script will try to install the game from "
  137.                 "the original disks and then decrunch the supplied "
  138.                 "DMA Design HD patch.\n\n"
  139.                 "Note that the Lemmings 2 intro will not be installed.\n\n"
  140.                 "As all three disks have the same disk name, you have "
  141.                 "to be careful to insert the right disk when prompted.\n"
  142.             )
  143.         )
  144.  
  145.         (set #applyhdpatch "\nUnpacking DMA Design HD patch...")
  146.         (set #applyhdpatch_help
  147.             (cat "\n"
  148.                 "The next step will unpack a patch which was supplied "
  149.                 "by DMA Design to run Lemmings 2 from harddisk. Lemmings 2 "
  150.                 "won't work from harddisk without this patch.\n"
  151.             )
  152.         )
  153.  
  154.         (set #applypatch
  155.             (cat "\n"
  156.                 "Applying patch and extracting original Worlds...\n\n"
  157.                 "DO NOT SKIP THIS PART!\n"
  158.             )
  159.         )
  160.  
  161.         (set #applypatch_help
  162.             (cat "\n"
  163.                 "Installing the patch is an essential part of the installation. "
  164.                 "The following things are done:\n"
  165.                 "1. The Lemmings file is loaded.\n"
  166.                 "2. The Original Worlds are saved ('Original.wld' files).\n"
  167.                 "3. The catalog files are created ('Cat.dat' files).\n"
  168.                 "4. For each Tribe a Levels drawer is created.\n"
  169.                 "5. For each Tribe a Custom drawer is created.\n"
  170.                 "6. The patches are applied to the main file.\n"
  171.                 "7. The Lemmings file is written back.\n"
  172.             )
  173.         )
  174.  
  175.         (set #installdemo "\nDo you want me to install the demo Worlds?\n")
  176.         (set #installdemo_help
  177.             (cat "\n"
  178.                 "Installing the demo worlds will give you new levels to play with. "
  179.                 "Each world file consumes about 7 KB.\n\n"
  180.                 "You might need 'Update Catalogs' if you're updating from an old version.\n"
  181.             )
  182.         )
  183.  
  184.         (set #installcustom "\nDo you want me to install the custom example pictures?\n")
  185.         (set #installcustom_help
  186.             (cat "\n"
  187.                 "Starting with version 2 of the Editor, levels can be drawn using any paint package. "
  188.                 "As the graphics have to be similar to the tribe's palette, example pictures containing "
  189.                 "the right colours and some important object graphics have been included in this package.\n\n"
  190.                 "Each picture file consumes about 6 KB.\n"
  191.             )
  192.         )
  193.  
  194.         (set #askupdate "\nOld installation found. Update or install from scratch?\n")
  195.  
  196.         (set #forceupdate
  197.             (cat "\n"
  198.                  "Old installation found. However, it will not be possible "
  199.                  "to update as some files have changed and need to be "
  200.                  "replaced nevertheless.\n"
  201.             )
  202.         )
  203.  
  204.         (set #updatechoice1 "Install over old version")
  205.         (set #updatechoice2 "Just update...")
  206.         (set #update_help
  207.             (cat "\n"
  208.                 "Well, it doesn't really matter what you do, both works, but "
  209.                 "the complete installation takes a bit longer ;)\n"
  210.             )
  211.         )
  212.  
  213.         (set #askl2disk1 "\nPlease insert Lemmings 2 Disk 1...")
  214.         (set #askl2disk2 "\nPlease insert Lemmings 2 Disk 2...")
  215.         (set #askl2disk3 "\nPlease insert Lemmings 2 Disk 3...")
  216.  
  217.         (set #askremdisk
  218.             (cat "\n"
  219.                 "Please remove the disk now.\n\n"
  220.                 "Only click on Proceed after you have taken the Disk out!"
  221.             )
  222.         )
  223.  
  224.         (set #askeddisk
  225.             (cat "\n"
  226.                 "Please insert your L2Ed-Install disk back again.\n\n"
  227.                 "Press Proceed after the drive has stopped.\n"
  228.             )
  229.         )
  230.  
  231.         (set #askdeinstall
  232.             (cat "\n"
  233.                 "Lemmings 2 Level Editor Installation found.\n\n"
  234.                 "Do you want me remove the Editor again?\n"
  235.             )
  236.         )
  237.  
  238.         (set #askdeinstall_help
  239.             (cat "\n"
  240.                 "You can now choose to remove the Editor & Patch from you drive. "
  241.                 "Note that the custom world files will not be deleted. "
  242.                 "The unpatched version of Lemmings 2 will be written back.\n\n"
  243.                 "If you don't want to do this, abort now.\n"
  244.             )
  245.         )
  246.  
  247.         (set #patchdelete "\nDeleting patched version of Lemmings2!\n")
  248.         (set #deinstall_exit "\nDeinstallation finished. The Editor has been removed.")
  249.  
  250.         (set #err_wrongkick "Sorry, this Software requires at least Kickstart 2.04 (V37) to proceed.")
  251.         (set #err_wrongkick_help "Cannot help a lame guy like you are! Buy a new kickstart!")
  252.  
  253.         (set #err_nol2bak "Couldn't find original Lemmings 2 file!")
  254.         (set #err_wrongdisk "\nWrong disk! Please read more carefully next time!")
  255.         (set #err_l2notfound "\nSorry, couldn't find Lemmings 2 in that drawer!")
  256.  
  257.         (set #err_nodiskspace
  258.             (cat "\n"
  259.                 "This installation requires at least "
  260.                 (if #lems2hd "2.7 MB" "0.5 MB")
  261.                 " free disk space. Please make this space available "
  262.                 "and start again.\n"
  263.             )
  264.         )
  265.  
  266.         (set #err_envbig "Something went wrong. Have a look at ENV:Result please.")
  267.         (set #err_prepl2 "Error occured during preparing Lemmings 2 Main file:\n\n")
  268.     )
  269. )
  270.  
  271. ;--------------------------------------------------------------------------
  272. ; German Installer Strings
  273. ;--------------------------------------------------------------------------
  274.  
  275. (if (= @language "deutsch")
  276.     (
  277.         (set #lang 2)
  278.         (set #suffix "_D")
  279.         (set #licence "Lizenz.txt")
  280.  
  281.         (set #ioerror "Es ist ein Fehler während der Installation aufgetreten. Bitte einen Fehlerbericht an mich schicken.\n\nDanke.")
  282.  
  283.         (set #intro
  284.             (cat
  285.                 "Willkommen zum Installationsprogramm des\n\nLemmings 2 Level Editor "
  286.                 (if #keyfile "REGISTRIERTE Version!" "SHAREWARE Demo!")
  287.                 "\n\nBitte lesen die Lizenz durch, bevor Sie fortfahren.\n"
  288.                 "Das Fortfahren mit der Installation bedeutet, daß Sie die Lizenzbestimmungen gelesen und akzeptiert haben!\n"
  289.                 "\nDieses Skript erlaubt eine Deinstallation.\n\n"
  290.                 "Beachten Sie, daß der Installer, der mit Kick 3.1 mitgeliefert wird, fehlerhaft ist und diese "
  291.                 "Software nicht richtig installieren wird!\n"
  292.                 "Installer 1.24 ist eine funktionierende Version.\n"
  293.             )
  294.         )
  295.  
  296.         (set #beta
  297.             (cat
  298.                 "Dies ist eine Beta-Release. Ich habe beschlossen, sie jetzt zu veröffentlichen, "
  299.                 "da ich wahrscheinlich nicht viel Zeit haben werde, sie fertig zu stellen. "
  300.                 "Leider haben sich bisher nur ganz wenige User registriert und ich bin mir nicht "
  301.                 "sicher, ob ich den Editor überhaupt noch weiterentwickeln soll.\n"
  302.                 "Registrierte Benutzer können die alten Keyfiles weiterverwenden - wenn jemand ein "
  303.                 "Keyfile mit deutschen Texten haben will, soll er sich bitte bei mir melden. "
  304.                 "Der Editor funktioniert ganz gut, aber die neuen Funktionen wurden nicht sehr oft "
  305.                 "getestet. Die deutsche Anleitung ist wirklich noch ziemlich unvollständig übersetzt."
  306.             )
  307.         )
  308.  
  309.         (set #installwhere
  310.             (cat
  311.                 "Bitte wählen Sie die Lemmings 2 Schublade auf Ihrer Festplatte. "
  312.                 (if #lems2hd "Das Spiel wird installiert, falls unauffindbar!")
  313.             )
  314.         )
  315.  
  316.         (set #installwhere_help
  317.             (cat
  318.                 "Wählen Sie einfach das Verzeichnis, in das Sie Lemmings 2 auf Ihre Festplatte "
  319.                 "installiert haben.\n\n"
  320.                 (if #lems2hd
  321.                     (
  322.                         (cat
  323.                             "Dieses Skript erlaubt es außerdem, die Originaldisketten auf die "
  324.                             "Harddisk zu kopieren, wenn Sie eine neue, leere Schublade erzeugen "
  325.                             "und diese für die Installation auswählen.\n"
  326.                         )
  327.                     ) (
  328.                         (cat
  329.                             "Wenn Sie Lemmings 2 nicht auf Ihrer Festplatte haben, "
  330.                             "beenden Sie die Installation und installieren Sie das "
  331.                             "Spiel zuerst.\n\nFalls Sie die Harddisk-Version nicht "
  332.                             "besitzen, sehen Sie in die Anleitung, wo diese erhältlich ist.\n"
  333.                         )
  334.                     )
  335.                 )
  336.             )
  337.         )
  338.  
  339.         (set #copyeditor
  340.             (cat "\n"
  341.                 "Kopiere Hauptdatei des Editors...\n\n"
  342.                 "Version: " #ed_vers
  343.             )
  344.         )
  345.  
  346.         (set #mkdocsdir "\nErzeuge Schulblade für die Anleitung...\n")
  347.         (set #copydocs_v37 "\nKopiere Anleitung (V37)...\n")
  348.         (set #copydocs_v39 "\nKopiere Anleitung (V39)...\n")
  349.  
  350.         (set #copydocs_help
  351.             (cat "\n"
  352.                 "Das Docs-Verzeichnis wird verwendet, um dort die Anleitung des Editors abzulegen. "
  353.                 "Natürlich können Sie die Anleitung auch an den folgenden anderen Orten aufbewahren:\n\n"
  354.                 "PROGDIR:\n"
  355.                 "PROGDIR:Help\n"
  356.                 "PROGDIR:Docs\n"
  357.                 "HELP:\n"
  358.                 "HELP:Guide\n"
  359.                 "HELP:Deutsch\n"
  360.             )
  361.         )
  362.  
  363.         (set #copykey "\nKopiere Keyfile...\n")
  364.  
  365.         (set #copykey_help
  366.             (cat "\n"
  367.                 "Da es sich hierbei um die registrierte Version des Editors handelt, wird ein Keyfile "
  368.                 "mitgeliefert, das alle Funktionen des Editors einschaltet. Normalerweise befindet sich "
  369.                 "das Keyfile in PROGDIR:. Alternative Verzeichnisse sind:\n\n"
  370.                 "PROGDIR:\n"
  371.                 "S:\n"
  372.                 "ENVARC:\n"
  373.                 "DEVS:Keyfiles\n"
  374.             )
  375.         )
  376.  
  377.         (set #makebak "\nErzeuge Sicherheitskopie der Lemmings 2 Hauptdatei...\n")
  378.         (set #restbak "\nStelle Lemmings 2 Hauptdatei wieder her...\n")
  379.         (set #makebak_help
  380.             (cat "\n"
  381.                 "Das Erstellen einer Sicherheitskopie erlaubt eine Deinstallation "
  382.                 "des Editors.\n"
  383.             )
  384.         )
  385.  
  386.         (set #installl2_help
  387.             (cat "\n"
  388.                 "Da das Spiel nicht in dieser Schublade gefunden wurde, wird das "
  389.                 "Installationsskript versuchen, das Spiel von den Originaldisketten "
  390.                 "zu installieren und den mitgelieferten DMA Design HD Patch "
  391.                 "zu entpacken.\n\n"
  392.                 "Beachten Sie, daß der Vorspann nicht installiert werden wird.\n\n"
  393.                 "Da alle drei Disketten den selben Namen besitzen, müssen "
  394.                 "Sie darauf achten, daß Sie die richtige Diskette auf Verlangen einlegen.\n"
  395.             )
  396.         )
  397.  
  398.         (set #applyhdpatch "\nEntpacke DMA Design HD Patch...")
  399.         (set #applyhdpatch_help
  400.             (cat "\n"
  401.                 "Der nächste Schritt entpackt einen Patch, der von DMA Design "
  402.                 "zu Verfügung gestellt wurde, um Lemmings 2 von der Festplatte spielen zu können. "
  403.                 "Lemmings 2 ist ohne diesen Patch nicht von der Festplatte aus spielbar.\n"
  404.             )
  405.         )
  406.  
  407.         (set #applypatch
  408.             (cat "\n"
  409.                 "Modifiziere Lemmings 2 und extrahiere Originalwelten...\n\n"
  410.                 "DIESEN TEIL NICHT ÜBERSPRINGEN!\n"
  411.             )
  412.         )
  413.  
  414.         (set #applypatch_help
  415.             (cat "\n"
  416.                 "Die Modifizierung von Lemmings ist ein essentieller Teil der Installations. "
  417.                 "Dabei wird folgendes getan:\n"
  418.                 "1. Die Hauptdatei von Lemmings wird geladen.\n"
  419.                 "2. Die Originalwelten werden gesichert ('Original.wld'-Dateien). \n"
  420.                 "3. Die Katalogdateien werden erstellt ('Cat.dat'-Dateien).\n"
  421.                 "4. Für jeden Stamm wird ein Level-Verzeichnis angelegt.\n"
  422.                 "5. Für jeden Stamm wird ein Custom-Verzeichnis angelegt.\n"
  423.                 "6. Die Veränderungen an der Hauptdatei werden vorgenommen.\n"
  424.                 "7. Die Lemmings Hauptdatei wird zurückgeschrieben.\n"
  425.             )
  426.         )
  427.  
  428.         (set #installdemo "\nWollen Sie, daß die Demowelten installiert werden?\n")
  429.         (set #installdemo_help
  430.             (cat "\n"
  431.                 "Die Installation der Demowelten gibt Ihnen neue Levels, die Sie spielen können. "
  432.                 "Jede Weltdatei benötigt ungefähr 7 KB Platz.\n\n"
  433.                 "Falls Sie von einer älteren Version updaten, müssen Sie vielleicht die 'Update Catalogs' "
  434.                 "Option des Editors verwenden.\n"
  435.             )
  436.         )
  437.  
  438.         (set #installcustom "\nWollen Sie, daß Beispielbilder für die Benutzergrafiken installiert werden?\n")
  439.         (set #installcustom_help
  440.             (cat "\n"
  441.                 "Beginnend mit Version 2 des Editors können nun auch Grafiken mit Malprogrammen entworfen werden. "
  442.                 "Damit Sie wissen, wie Sie die Farbpalette belegen müssen, daß die Grafiken im Spiel einigermaßen "
  443.                 "gut aussehen, werden Beispielbilder mitgeliefert, die die Farbpalette des Stammes und ein paar "
  444.                 "wichtige Objektgrafiken enthält.\n\n"
  445.                 "Jede dieser Bilddateien benötigt ungefähr 6 KB Platz.\n"
  446.             )
  447.         )
  448.  
  449.         (set #askupdate "\nAlte Installation gefunden. Updaten oder alles installieren?\n")
  450.  
  451.         (set #forceupdate
  452.             (cat "\n"
  453.                  "Alte Installation gefunden. Jedoch ist es nicht möglich, nur einige "
  454.                  "Dateien upzudaten, da sich einige Dinge stark geändert haben und "
  455.                  "daher vollständig ersetzt werden müssen.\n"
  456.             )
  457.         )
  458.  
  459.         (set #updatechoice1 "Über alte Version installieren")
  460.         (set #updatechoice2 "Nur updaten...")
  461.         (set #update_help
  462.             (cat "\n"
  463.                 "Nunja, es macht eigentlich keinen Unterschied, was Sie nun auswählen, "
  464.                 "aber die vollständige Installation dauert ein wenig länger ;)\n"
  465.             )
  466.         )
  467.  
  468.         (set #askl2disk1 "\nBitte legen Sie Lemmings 2 Disk 1 ein...")
  469.         (set #askl2disk2 "\nBitte legen Sie Lemmings 2 Disk 2 ein...")
  470.         (set #askl2disk3 "\nBitte legen Sie Lemmings 2 Disk 3 ein...")
  471.  
  472.         (set #askremdisk
  473.             (cat "\n"
  474.                 "Bitte entfernen Sie die Diskette wieder.\n\n"
  475.                 "Klicken Sie erst dann auf 'Weiter', wenn Sie die Diskette herausgenommen haben!"
  476.             )
  477.         )
  478.  
  479.         (set #askeddisk
  480.             (cat "\n"
  481.                 "Bitte legen Sie Ihre Lemmings 2 Installationsdiskette zurück ins Laufwerk.\n\n"
  482.                 "Klicken Sie auf 'Weiter', wenn die Laufwerksled erloschen ist.\n"
  483.             )
  484.         )
  485.  
  486.         (set #askdeinstall
  487.             (cat "\n"
  488.                 "Lemmings 2 Level Editor Installation gefunden.\n\n"
  489.                 "Wollen Sie, daß der Editor wieder entfernt wird?\n"
  490.             )
  491.         )
  492.  
  493.         (set #askdeinstall_help
  494.             (cat "\n"
  495.                 "Sie können nun entscheiden, ob Sie den Editor und den Patch von Ihrer Platte entfernen wollen. "
  496.                 "Beachten Sie, daß selbst angefertigte Levels nicht gelöscht werden. "
  497.                 "Die unveränderte Version von Lemmings 2 wird wiederhergestellt.\n\n"
  498.                 "Wenn Sie das nicht wollen, brechen Sie jetzt ab.\n"
  499.             )
  500.         )
  501.  
  502.         (set #patchdelete "\nLösche veränderte Version von Lemmings 2!\n")
  503.         (set #deinstall_exit "\nDeinstallation beendet. Der Editor wurde entfernt.")
  504.  
  505.         (set #err_wrongkick "Tut mir leid, diese Software benötigt mindestens Kickstart 2.04 (V37).")
  506.         (set #err_wrongkick_help "Kann einem solchen Lamer, wie Sie es sind, wirklich nicht helfen! Kaufen Sie sich eine neue Kickstartversion!")
  507.  
  508.         (set #err_nol2bak "Konnte Originaldatei von Lemmings 2 nicht finden!")
  509.         (set #err_wrongdisk "\nFalsche Diskette! Bitte das nächste mal besser aufpassen!")
  510.         (set #err_l2notfound "\nTschuldigung, konnte Lemmings 2 nicht in diesem Verzeichnis finden!")
  511.  
  512.         (set #err_nodiskspace
  513.             (cat "\n"
  514.                 "Diese Installation benötigt mindestens "
  515.                 (if #lems2hd "2.7 MB" "0.5 MB")
  516.                 " Platz auf Ihrer Festplatte. Bitte machen Sie diesen Platz verfügbar "
  517.                 "und starten Sie das Skript erneut.\n"
  518.             )
  519.         )
  520.  
  521.         (set #err_envbig "Irgendwas ging schief. Sehen Sie sich bitte ENV:Result an.")
  522.         (set #err_prepl2 "Ein Fehler trat während der der Vorbereitung der Lemmings 2 Hauptdatei auf:\n\n")
  523.     )
  524. )
  525.  
  526. ;--------------------------------------------------------------------------
  527. ; Error cleanup code.
  528. ;--------------------------------------------------------------------------
  529.  
  530. (onerror
  531.     (
  532.         (if (> @ioerr 0)
  533.             (message (cat #ioerror "\n\n ERROR CODE: " @ioerr))
  534.         )
  535.     )
  536. )
  537.  
  538. ;--------------------------------------------------------------------------
  539. ; Check Kickstart version first. Kick 2.0 or higher is a must!
  540. ;--------------------------------------------------------------------------
  541.  
  542. (set #kick (/ (getversion) 65536))
  543. (if (< #kick 37)
  544.     (
  545.         (message #err_wrongkick (help #err_wrongkick_help))
  546.         (exit (quiet))
  547.     )
  548. )
  549.  
  550. ;--------------------------------------------------------------------------
  551. ; Get Version of Editor
  552. ;--------------------------------------------------------------------------
  553.  
  554. (run ("Version >ENV:Result L2-Editor%s" #suffix) (safe))
  555. (set #ed_vers (getenv "Result"))
  556. (delete "ENV:Result" (safe))
  557.  
  558. ;--------------------------------------------------------------------------
  559. ; Check if editor already installed and run deinstaller if true.
  560. ;--------------------------------------------------------------------------
  561.  
  562. (if #deinstall
  563.     (
  564.         (run
  565.             ""
  566.             (prompt #askdeinstall)
  567.             (help #askdeinstall_help)
  568.             (confirm)
  569.             (safe)
  570.         )
  571.         (if (exists "HDLemmings2.old")
  572.             (
  573.                 (delete
  574.                     "HDLemmings2"
  575.                     (prompt #patchdelete)
  576.                     (help #askdeinstall_help)
  577.                     (confirm)
  578.                 )
  579.                 (rename
  580.                     "HDLemmings2.old"
  581.                     "HDLemmings2"
  582.                 )
  583.             ) (
  584.                 (abort #err_nol2bak)
  585.             )
  586.         )
  587.         (delete "L2-Editor")
  588.         (delete "L2-Editor.info")
  589.         (delete "Docs/L2Ed.guide")
  590.         (delete "Docs/L2Ed.guide.info")
  591.         (delete ("Docs/L2EdRegForm%s.txt" #suffix))
  592.         (delete ("Docs/L2EdRegForm%s.txt.info" #suffix))
  593.         (delete "Docs")
  594.         (delete "Docs.info")
  595.         (delete ("L2EdRegForm%s.txt" #suffix))
  596.         (delete ("L2EdRegForm%s.txt.info" #suffix))
  597.         (delete "L2EdVers")
  598.         (delete "ENVARC:L2Ed.prefs")
  599.         (run "delete #?/original.wld #?/cat.dat FORCE")
  600.         (run "delete #?/Custom/Example.iff")
  601.         (run "delete #?/Custom")
  602.         (delete "L2Ed-Deinstall")
  603.         (delete "L2Ed-Deinstall.info")
  604.         (exit #deinstall_exit)
  605.  
  606.     ) (
  607.  
  608. ;--------------------------------------------------------------------------
  609. ; Start of Installing part of script.
  610. ;--------------------------------------------------------------------------
  611.  
  612.         (run ("Run >NIL: SYS:Utilities/More %s" #licence) (safe))
  613.         (message #intro)
  614.         (message #beta)
  615.  
  616.         (set #path
  617.             (askdir
  618.                 (default @default-dest)
  619.                 (prompt #installwhere)
  620.                 (help #installwhere_help)
  621.             )
  622.         )
  623.  
  624. ;--------------------------------------------------------------------------
  625. ; Check for Lemmings in requested directory. If not installed and hd-patch
  626. ; is available, install Lemmings 2 from scratch, otherwise abort.
  627. ;--------------------------------------------------------------------------
  628.  
  629.         (if (not (exists (tackon #path "HDLemmings2")))
  630.             (
  631.                 (if #lems2hd
  632.                     (
  633.                         (if (< (getdiskspace #path) 2705408)
  634.                             (
  635.                                 (abort #err_nodiskspace)
  636.                             )
  637.                         )
  638.                         (askdisk
  639.                             (dest " ")
  640.                             (prompt #askl2disk1)
  641.                             (help #installl2_help)
  642.                         )
  643.                         (if (not (exists (" :L2D1")))
  644.                             (
  645.                                 (abort #err_wrongdisk)
  646.                             )
  647.                         )
  648.                         (copyfiles
  649.                             (source " :")
  650.                             (dest #path)
  651.                             (choices "endseq.dat" "endtune" "L2D1")
  652.                         )
  653.                         (message #askremdisk)
  654.                         (askdisk
  655.                             (dest " ")
  656.                             (prompt #askl2disk2)
  657.                             (help #installl2_help)
  658.                         )
  659.                         (if (not (exists (" :L2D2")))
  660.                             (
  661.                                 (abort #err_wrongdisk)
  662.                             )
  663.                         )
  664.                         (copyfiles
  665.                             (source " :")
  666.                             (dest #path)
  667.                             (choices "soundfx" "alemms.comp" "logo.dat" "Maintune" "L2D2")
  668.                         )
  669.                         (message #askremdisk)
  670.                         (askdisk
  671.                             (dest " ")
  672.                             (prompt #askl2disk3)
  673.                             (help #installl2_help)
  674.                         )
  675.                         (if (not (exists (" :L2D3")))
  676.                             (
  677.                                 (abort #err_wrongdisk)
  678.                             )
  679.                         )
  680.                         (copyfiles
  681.                             (source " :")
  682.                             (dest #path)
  683.                             (all)
  684.                         )
  685.                         (message #askeddisk)
  686.                         (if (exists "lems2HD.lzx")
  687.                             (
  688.                                 (run
  689.                                     ("Unlzx x lems2HD.lzx %s/" #path)
  690.                                     (prompt #applyhdpatch)
  691.                                     (help #applyhdpatch_help)
  692.                                     (confirm)
  693.                                 )
  694.                             ) (
  695.                                 (run
  696.                                     ("Lha x lems2HD.lha %s/" #path)
  697.                                     (prompt #applyhdpatch)
  698.                                     (help #applyhdpatch_help)
  699.                                     (confirm)
  700.                                 )
  701.                             )
  702.                         )
  703.                     ) (
  704.                         (abort #err_l2notfound)
  705.                     )
  706.                     (if (not (exists (tackon #path "HDLemmings2")))
  707.                         (
  708.                             (abort #err_l2notfound)
  709.                         )
  710.                     )
  711.                 )
  712.             )
  713.         )
  714.  
  715. ;--------------------------------------------------------------------------
  716. ; Check for enough disk space.
  717. ;--------------------------------------------------------------------------
  718.  
  719.         (if (< (getdiskspace #path) 431616)
  720.             (if (not (exists (tackon #path ("L2-Editor%s" #suffix)))) (abort #err_nodiskspace))
  721.         )
  722.  
  723. ;--------------------------------------------------------------------------
  724. ; Check if update possible
  725. ;--------------------------------------------------------------------------
  726.  
  727.         (if (exists (tackon #path "L2EdVers"))
  728.             (
  729.                 (copyfiles
  730.                     (source (tackon #path "L2EdVers"))
  731.                     (dest "ENV:")
  732.                     (safe)
  733.                 )
  734.                 (set #oldvers (getenv "L2EdVers"))
  735.                 (set #allowupdate 1)
  736.                 (if (< #oldvers 2000)
  737.                     (
  738.                         (set #allowupdate 0)
  739.                     )
  740.                 )
  741.                 (delete "ENV:L2EdVers")
  742.             )
  743.         )
  744.  
  745. ;--------------------------------------------------------------------------
  746. ; Copy main Editor file.
  747. ;--------------------------------------------------------------------------
  748.  
  749.         (if (exists (tackon #path "L2-Editor"))
  750.             (
  751.                 (if #allowupdate
  752.                     (
  753.                         (set #update
  754.                             (askchoice
  755.                                 (prompt #askupdate)
  756.                                 (choices #updatechoice1 #updatechoice2)
  757.                                 (help #update_help)
  758.                                 (default 1)
  759.                             )
  760.                         )
  761.                     ) (
  762.                         (set #update
  763.                             (askchoice
  764.                                 (prompt #forceupdate)
  765.                                 (choices #updatechoice1)
  766.                                 (help #update_help)
  767.                                 (default 0)
  768.                             )
  769.                         )
  770.                     )
  771.                 )
  772.             ) (
  773.                 (set #update 0)
  774.             )
  775.         )
  776.  
  777.         (if (exists (tackon #path "L2-Editor.info"))
  778.             (
  779.                 (copyfiles
  780.                     (prompt #copyeditor)
  781.                     (help @copyfiles-help)
  782.                     (source ("L2-Editor%s" #suffix))
  783.                     (dest #path)
  784.                     (newname "L2-Editor")
  785.                     (confirm)
  786.                 )
  787.             ) (
  788.                 (copyfiles
  789.                     (prompt #copyeditor)
  790.                     (help @copyfiles-help)
  791.                     (source ("L2-Editor%s" #suffix))
  792.                     (dest #path)
  793.                     (newname "L2-Editor")
  794.                     (infos)
  795.                     (confirm)
  796.                 )
  797.             )
  798.         )
  799.  
  800. ;--------------------------------------------------------------------------
  801. ; Copy manual, either v37 or v39, depending on the kickstartversion.
  802. ;--------------------------------------------------------------------------
  803.  
  804.         (makedir
  805.             (tackon #path "Docs")
  806.             (prompt #mkdocsdir)
  807.             (help #copydocs_help)
  808.             (infos)
  809.             (confirm)
  810.         )
  811.         (if (< #kick 39)
  812.             (
  813.                 (copyfiles
  814.                     (prompt #copydocs_v37)
  815.                     (help #copydocs_help)
  816.                     (source ("L2Ed%s_V37.guide" #suffix))
  817.                     (dest (tackon #path "Docs"))
  818.                     (newname "L2Ed.guide")
  819.                     (infos)
  820.                     (confirm)
  821.                 )
  822.             ) (
  823.                 (copyfiles
  824.                     (prompt #copydocs_v39)
  825.                     (help #copydocs_help)
  826.                     (source ("L2Ed%s.guide" #suffix))
  827.                     (dest (tackon #path "Docs"))
  828.                     (newname "L2Ed.guide")
  829.                     (infos)
  830.                     (confirm)
  831.                 )
  832.             )
  833.         )
  834.  
  835. ;--------------------------------------------------------------------------
  836. ; Copy keyfile, if available.
  837. ;--------------------------------------------------------------------------
  838.  
  839.         (if #keyfile
  840.             (
  841.                 (copyfiles
  842.                     (prompt #copykey)
  843.                     (help #copykey_help)
  844.                     (source "L2Ed.key")
  845.                     (dest #path)
  846.                     (confirm)
  847.                 )
  848.             ) (
  849.                 (if (exists (tackon #path "Docs"))
  850.                     (
  851.                         (copyfiles
  852.                             (source ("L2EdRegForm%s.txt" #suffix))
  853.                             (dest (tackon #path "Docs"))
  854.                             (infos)
  855.                         )
  856.                         (copyfiles
  857.                             (source ("L2EdRegForm%s.txt" #suffix))
  858.                             (dest #path)
  859.                             (infos)
  860.                         )
  861.                     )
  862.                 )
  863.             )
  864.         )
  865.  
  866. ;--------------------------------------------------------------------------
  867. ; Create Lemmings 2 backup.
  868. ;--------------------------------------------------------------------------
  869.  
  870.         (if (not #update)
  871.             (
  872.  
  873.                 (if (exists (tackon #path "HDLemmings2.old"))
  874.                     (
  875.                         (copyfiles
  876.                             (prompt #restbak)
  877.                             (help #makebak_help)
  878.                             (source (tackon #path "HDLemmings2.old"))
  879.                             (dest #path)
  880.                             (newname "HDLemmings2")
  881.                             (confirm)
  882.                         )
  883.                     ) (
  884.                         (if @pretend
  885.                             (
  886.                                 (run
  887.                                     ""
  888.                                     (prompt #makebak)
  889.                                     (help #makebak_help)
  890.                                     (confirm)
  891.                                     (safe)
  892.                                 )
  893.                             ) (
  894.                                 (copyfiles
  895.                                     (prompt #makebak)
  896.                                     (help #makebak_help)
  897.                                     (source (tackon #path "HDLemmings2"))
  898.                                     (dest #path)
  899.                                     (newname "HDLemmings2.old")
  900.                                     (confirm)
  901.                                 )
  902.                             )
  903.                         )
  904.                     )
  905.                 )
  906.  
  907. ;--------------------------------------------------------------------------
  908. ; Apply editor patch to Lemmings 2 file.
  909. ;--------------------------------------------------------------------------
  910.  
  911.                 (set @execute-dir #path)
  912.                 (copyfiles
  913.                     (source "PrepL2")
  914.                     (dest #path)
  915.                 )
  916.                 (run "delete #?/original.wld FORCE")
  917.                 (run
  918.                     (tackon #path "PrepL2 >ENV:Result HDLemmings2")
  919.                     (prompt #applypatch)
  920.                     (help #applypatch_help)
  921.                     (confirm)
  922.                 )
  923.                 (set @execute-dir #home)
  924.                 (delete (tackon #path "PrepL2"))
  925.                 (set #reslen (getsize "ENV:Result"))
  926.                 (if (> #reslen 512)
  927.                     (
  928.                         (abort #err_envbig)
  929.                     )
  930.                 )
  931.                 (if (> #reslen 0)
  932.                     (
  933.                         (abort (cat #err_prepl2 (getenv "Result")))
  934.                     )
  935.                 )
  936.                 (delete "ENV:Result")
  937.  
  938. ;--------------------------------------------------------------------------
  939. ; Install demoworlds either from dir or from archive.
  940. ;--------------------------------------------------------------------------
  941.  
  942.                 (if (exists ("Demoworlds.lzx"))
  943.                     (
  944.                         (run
  945.                             "Unlzx x Demoworlds.lzx T:"
  946.                             (safe)
  947.                         )
  948.                         (copyfiles
  949.                             (prompt #installdemo)
  950.                             (help #installdemo_help)
  951.                             (source "T:Demoworlds")
  952.                             (dest #path)
  953.                             (all)
  954.                             (confirm)
  955.                         )
  956.                         (run
  957.                             "Delete T:Demoworlds ALL"
  958.                             (safe)
  959.                         )
  960.                     ) (
  961.                         (if (exists ("Demoworlds"))
  962.                             (
  963.                                 (copyfiles
  964.                                     (prompt #installdemo)
  965.                                     (help #installdemo_help)
  966.                                     (source "Demoworlds")
  967.                                     (dest #path)
  968.                                     (all)
  969.                                     (confirm)
  970.                                 )
  971.                             )
  972.                         )
  973.                     )
  974.                 )
  975.  
  976. ;--------------------------------------------------------------------------
  977. ; Install example custom gfx files either from dir or from archive.
  978. ;--------------------------------------------------------------------------
  979.  
  980.                 (if (exists ("CustomExamples.lzx"))
  981.                     (
  982.                         (run
  983.                             "Unlzx x CustomExamples.lzx T:"
  984.                             (safe)
  985.                         )
  986.                         (copyfiles
  987.                             (prompt #installcustom)
  988.                             (help #installcustom_help)
  989.                             (source "T:CustomExamples")
  990.                             (dest #path)
  991.                             (all)
  992.                             (confirm)
  993.                         )
  994.                         (run
  995.                             "Delete T:CustomExamples ALL"
  996.                             (safe)
  997.                         )
  998.                     ) (
  999.                         (if (exists ("CustomExamples"))
  1000.                             (
  1001.                                 (copyfiles
  1002.                                     (prompt #installcustom)
  1003.                                     (help #installcustom_help)
  1004.                                     (source "CustomExamples")
  1005.                                     (dest #path)
  1006.                                     (all)
  1007.                                     (confirm)
  1008.                                 )
  1009.                             )
  1010.                         )
  1011.                     )
  1012.                 )
  1013.             )
  1014.         )
  1015.  
  1016. ;--------------------------------------------------------------------------
  1017. ; Create Deinstallation script
  1018. ;--------------------------------------------------------------------------
  1019.  
  1020.         (delete (tackon #path "L2Ed-Uninstall"))
  1021.         (delete (tackon #path "L2Ed-Uninstall.info"))
  1022.         (copyfiles
  1023.             (source ("L2Ed-Install%s" #suffix))
  1024.             (dest #path)
  1025.             (newname "L2Ed-Deinstall")
  1026.             (infos)
  1027.         )
  1028.         (tooltype
  1029.             (dest (tackon #path "L2Ed-Deinstall"))
  1030.             (settooltype "SCRIPT" "L2Ed-Deinstall")
  1031.         )
  1032.  
  1033. ;--------------------------------------------------------------------------
  1034. ; Copy version file
  1035. ;--------------------------------------------------------------------------
  1036.  
  1037.         (copyfiles
  1038.             (source "L2EdVers")
  1039.             (dest #path)
  1040.         )
  1041.  
  1042. ;--------------------------------------------------------------------------
  1043. ; Installation successful!
  1044. ;--------------------------------------------------------------------------
  1045.  
  1046.         (set @default-dest #path)
  1047.         (exit)
  1048.     )
  1049. )
  1050.  
  1051.