;
; $VER: Install-LEGS 6.5 (07 Feb 1994) by Markus van Kempen
; Script to install the EGS Spectrum Board from GVP
;
; Change : 15 Oct 1993 mvk
;          21 Oct 1993 mvk
;          12 Nov 1993 mvk Bugfixes:
;                          copy PAL and NTSC to Devs:Monitors
;                          copy ECON to devs:Dosdriver with mount stuff
;                          Pretend Mode works now  ??
;                          Add Wait in startup-sequence form AmigaDriver
;         20 Dec 1993 fix cpu >env: problem with 2.04
;                          and also the Monitors copy node_names
;         06 Jan 1994      Ask for sys space
;
;Versions Release:


(set EGS_Version "v6.5")

     ;********************* Setup Logical Disk names ************************
(set ANAME "Spectrum")
(set BNAME "Spectrum")

(set Disk1 (cat "Spectrum_Disk_1"))
(set Disk2 (cat "Spectrum_Disk_2"))
(set Disk3 (cat "Spectrum_Disk_3"))
(set Disk4 (cat "Spectrum_Disk_4"))
(set Disk5 (cat "EGS-RecoverDisk"))
(set Disk1: (cat Disk1 ":"))
(set Disk2: (cat Disk2 ":"))
(set Disk3: (cat Disk3 ":"))
(set Disk4: (cat Disk4 ":"))
(set Disk5: (cat Disk5 ":"))

     ;********************* Default Directories ****************************

(set PRE " sys:Prefs/")
(set ENV " sys:Prefs/")
(set SYS "SYS:")
(set TMP "T:")
(set BIN "bin")

     ;********************* Default Files **********************************

(set EGSCOLON   "EGSColon.LHA ")
(set EGSCOLON00 "EGSColon00.LHA ")
(set EGSBLK     "EGSBlanker.LHA ")
(set EGSBLK00   "EGSBlanker00.LHA ")
(set EGSSYS     "EGSSys.LHA ")
(set EGSENV     "EGSEnv-Archive.LHA ")
(set EGSPRE     "EGSPresets.LHA ")
(set EGSTOOLS   "EGSTools.LHA ")
(set EGSUTILS   "EGSUtilities.LHA ")
(set EGSPREFS   "EGSPrefs.LHA ")
(set EGSHOOKS   "EGSHooks.LHA ")
(set EGSPICS    "EGSPictures.LHA ")
(set EGSPAINT   "EGSPaint.LHA ")
(set EGSEXTRA   "EGSExtras.LHA ")
(set EGSGAMES   "EGSGames.LHA ")

     ;********************* Default Actions *********************************

(set COPYDEVS  (cat "copy " TMP "bin/monitors/#? to devs:monitors "))
(set COPYMONS  (cat "copy " TMP "bin/monitors/WB204/#? to sys:WBStartup/ "))
(set EGS110ID  -1722888308)
(set DELALL    (cat "delete " TMP "bin all"))
(set COPYINFO  (cat "copy " TMP "bin/EGS.info to "))
(set DEL_OLD   (cat "delete " SYS "libs/EG#? all"))
(set LHarc     (cat  TMP "Bin/lz"))
(set PATCH     (cat  TMP "Bin/mkscript "))
(set CPYSTART  (cat "copy " TMP BIN "/startup-sequence to " Disk5: "s"))

(set WBBackup  (cat "copy " SYS "WBStartup/#?EGS#?.info " SYS "WBStartup.backup all"))
(set WBDelete  (cat "delete " SYS "WBStartup/#?EGS#?.info"))

(set CopyECON      (cat "copy " TMP "bin/ECON#? " SYS "devs/DOSDrivers/"))
(set MountECON     (cat "type >>" SYS "devs/mountlist " TMP "bin/mountlist.econ"))
(set OnlyAmiga     (cat "copy " TMP "bin/EGS-Amiga.info " SYS "WBStartup/"))
(set Amiga_2_EGSaT (cat "copy " TMP "bin/AmigaT#?LEGSa.info "  SYS "WBStartup/"))
(set Amiga_2_EGSaR (cat "copy " TMP "bin/AmigaR#?LEGSa.info "  SYS "WBStartup/"))
(set Amiga_2_EGSaL (cat "copy " TMP "bin/AmigaL#?LEGSa.info "  SYS "WBStartup/"))
(set Amiga_2_EGSaB (cat "copy " TMP "bin/AmigaB#?LEGSa.info "  SYS "WBStartup/"))

(set Amiga_2_G110T (cat "copy " TMP "bin/AmigaT#?G110.info "  SYS "WBStartup/"))
(set Amiga_2_G110R (cat "copy " TMP "bin/AmigaR#?G110.info "  SYS "WBStartup/"))
(set Amiga_2_G110L (cat "copy " TMP "bin/AmigaL#?G110.info "  SYS "WBStartup/"))
(set Amiga_2_G110B (cat "copy " TMP "bin/AmigaB#?G110.info "  SYS "WBStartup/"))

(set G110_2_EGSaT  (cat "copy " TMP "bin/G110T#?LEGSa.info "  SYS "WBStartup/"))
(set G110_2_EGSaR  (cat "copy " TMP "bin/G110R#?LEGSa.info "  SYS "WBStartup/"))
(set G110_2_EGSaL  (cat "copy " TMP "bin/G110L#?LEGSa.info "  SYS "WBStartup/"))
(set G110_2_EGSaB  (cat "copy " TMP "bin/G110B#?LEGSa.info "  SYS "WBStartup/"))

(set EGSa_2_EGSbT  (cat "copy " TMP "bin/LEGSaT#?.info "  SYS "WBStartup/"))
(set EGSa_2_EGSbR  (cat "copy " TMP "bin/LEGSaR#?.info "  SYS "WBStartup/"))
(set EGSa_2_EGSbL  (cat "copy " TMP "bin/LEGSaL#?.info "  SYS "WBStartup/"))
(set EGSa_2_EGSbB  (cat "copy " TMP "bin/LEGSaB#?.info "  SYS "WBStartup/"))

(set EGSb_2_AmigaT (cat "copy " TMP "bin/LEGSbT#?Amiga.info "  SYS "WBStartup/"))
(set EGSb_2_AmigaR (cat "copy " TMP "bin/LEGSbR#?Amiga.info "  SYS "WBStartup/"))
(set EGSb_2_AmigaL (cat "copy " TMP "bin/LEGSbL#?Amiga.info "  SYS "WBStartup/"))
(set EGSb_2_AmigaB (cat "copy " TMP "bin/LEGSbB#?Amiga.info "  SYS "WBStartup/"))

(set CFGLIB    "assign libs: egs:libs add")
(set CONFIG    "egs:c/EGSConfig FILE egs:s/EGS.Config")
(set CFGAMIGA  "egs:c/EGSConfig LOAD egs:driver/EGSAmigaDriver")
(set CFGENV    "copy envarc:EGS to env:egs all")
(set EGSInit   "egs:c/EGS-Init >nil: Auto CopyBack")
(set CFGTOP    "egs:c/EGSConfig ADDBORDER AMIGA.monitor LEGSa.monitor top")
(set CFGRIGHT  "egs:c/EGSConfig ADDBORDER AMIGA.monitor LEGSa.monitor right")
(set CFGLEFT   "egs:c/EGSConfig ADDBORDER AMIGA.monitor LEGSa.monitor left")
(set CFGBOTTOM "egs:c/EGSConfig ADDBORDER AMIGA.monitor LEGSa.monitor bottom")

(set CFGNAME   "egs/s/EGS.Config")
(set EGSS      "egs/s")

(set TXT            ("echo \";*N; $VER: EGS.config 5.2 (11.12.93) by MvK *N;*N\" >"))

(set EGSWB          ("echo FILE egs:s/EGSWB.config >>"))
(set EGSAmiga       ("echo FILE egs:s/AMIGA.config >>"))
(set EGSLegsa       ("echo FILE egs:s/LEGSa.config >>"))
(set EGSLegsa+Amiga ("echo FILE egs:s/LEGSa+AMIGA.config >>"))
(set EGSLegsb       ("echo FILE egs:s/LEGSb.config >>"))
(set EGSG110        ("echo FILE egs:s/G110.config  >>"))
(set COPYCONFIG     (cat "copy " TMP "bin/#?.config to "))

;=============================================================================
; English strings


(set #bad-kick (cat "\nEGS requires Kickstart/Workbench 2.04 or higher!"))

(set #on-error
(cat    "\nYou choose to abort the Install script OR "
        "an error has occured!\n"
        "Unfortunately there is no guarantee that "
        "the EGS System is functional in this state!"
        "Please try to install EGS again or consult "
        "the manual!"
))
(set #ask-which-monitor
(cat "\n Which Monitor you are using for the %s-Board ? \n"))
(set #which-monitor-help
(cat "\nWARNING!\n "
     "You can select a monitor to be used with the EGS Spectrum "
     "board. If you use a monitor type which is not listed in the "
     "menu, start with a low resolution display monitor like VGA. "
     "You can always select other monitors with the EGS-DisplayAdjust "
     "progam, if you think your monitor is capable of displaying a higher "
     "resolution. But you should be careful, because if you choose a "
     "HiRes monitor and you do not have capable monitor you can destroy "
     "your monitor!  Consult the manual for more details.\n"
))

(set #check
(cat "Checking System..."
))

(set #wrong-libs
(cat  "\nSorry, there are some unknown egs.libraries in your system."
      "The installation is only for the EGS Spectrum or EGS-110/24 "
      "boards from GVP!  Please delete the EGS-Library in your"
      "libs directory and try this installation again. \n"
))

(set #old-libs
(cat "\n"
     " There are old EGS libraries in your libs: "
       "drawer. It is necessary for the new EGS-System "
       "to delete them, because otherwise the system "
       "will not be able to load the new libraries! \n"
     "The EGS-110/24 will be also updated with the newest "
     "version of the EGS drivers and libraries. \n"
     "If you don't have an EGS-110/24 Board you should ABORT "
     "the installation now.\n"
))

(set #old-libs-help
(cat "\nYou can CONTINUE and the old libraries "
     "will be deleted. Or you can ABORT the installation and "
     "restart it after you have backed-up the old libraries."
))

(set #which-disk
(cat "\n On which PARTITION should the EGS drawer be installed?\n"
))

(set #which-disk-help
(cat "\n"
     "This section lets you choose which PARTITION to install the EGS-Software "
     "files.  There are many complex files that make up this unique and "
     "powerful Retargetable Graphics Operating System, and the main drawer "
     "needs to be located in the root of a partition to make all of the assigns "
     "and file locations properly.\n\n"
     @askdir-help
))

(set #egs-exists
(cat "\nThe destination directory %s "
       "already exists. You can choose to "
       "install the Multi-GFX software to run a "
       "second EGS board in parallel on the Amiga, "
       "or you can update the existing software in "
       "your system."
))

(set #egs-exists-help
(cat "You can continue (Update) and the directory "
     " %s will be updated. \n"
         "Or you can abort the installation and "
     "restart again after you rename the directory "
     "or you select a new PARTITION for the EGS-Software. "
))

(set #egs-rename
(cat "\nThe destination directory %s "
     "already exists. Should it be renamed? "
     "Otherwise the new software will be installed "
     "right over the existing software."
))

(set #egs-rename-help
(cat "\nYou can continue (Update) and the directory "
     " %s will be rename in %s.OLD. "
         "Or you can abort the installation and "
     "restart again after you rename the directory "
     "or you select a new PARTITION for the EGS-Software. \n"
))

(set #egs-rename-button
(cat "Rename"
))

(set #NO
(cat " No "
))

(set #ask-disk1
(cat  "\nPlease insert the disk labeled %s .\n" ))

(set #ask-disk1-setup
(cat "\nEGS-System and other useful tools will be copied "
       "from the disk %s into your system."
))

(set #multi-warning
(cat
             "\n             WARNING:                   \n"
             "If you have already installed 2 EGS-Boards, \n"
             "you must change the egs:s/#?.config file    \n"
             "manually!  Run >EGS:c/EGSConfig help< for   \n"
             "more information about EGSConfig command!   \n"
))

(set #ask-monitors
(cat "\nHow many Monitors are you using ?\n"
))

(set #monitors-help1
(cat   "\n"
       "Two Monitors -  You using one Monitor on the \n"
       "                %s output and one on your\n"
       "                Spectrum-A with PassThrough from \n"
       "                the AMIGA \n"
       "Three Monitors- You using one Monitor on the \n"
       "                Spectrum-A output, one on %s-B\n"
       "                and one on your RGB-AMIGA output! \n\n\n\n"
))

(set #monitors-help2
(cat   "\n"
       "If you use an A2000 the system will config "
       "the boards in from the left to the right. "
       "If you use a A3/A4000 the system will config "
       "the boards in from the bottom to the top. \n\n"
       "The board on the top (or right) will be "
       "the last one in the system. If you use 2 boards "
       "this means the top (or right) board will be board B (GFX-B). \n"
))

(set  #OneMonitor   "One   Monitor - no mouse between boards")
(set  #TwoMonitor   "Two   Monitor - on GFX-A(AMIGA) and GFX-B")
(set  #ThreeMonitor "Three Monitor - on GFX-A,GFX-B and AMIGA ")


(set #ask-2border
(cat "\nWhich edge of the %s screen do you want "
     "to move off to get to the %s Board?\n"
))

(set #2border-help
(cat "\nThe mouse can be moved between the %s "
     "(AMIGA) screen and the %s screen!\n"
     "You can choose any of the four edges!"
))

;set #direction-choice

(set #Top       "Top    - Top of the screen")
(set #Right     "Right  - Right side of the screen")
(set #Left      "Left   - Left side of the screen")
(set #Bottom    "Bottom - Bottom of the screen")

(set #G110-3monitor-yourself
(cat "\nSorry, but you must configure the"
     "EGS-110/24 and the Spectrum Board with"
     "3 Monitors manually!  Refer to the manual"
     "for hints and information."
))

(set #ask-Amiga-legs
(cat    "\nWhich edge of the AMIGA screen do you want "
        "to move off to get to the %s Board? \n"
))

(set #Amiga-legs-help
(cat  "The mouse can be moved between the AMIGA "
      "screen and the %s screen!\n"
      "You can choose any of the four edges!"
))

(set #ask-legs-legs
(cat "\nWhich edge of the %s screen do you want "
     "to move off to get to the %s Board?\n"
))

(set #legs-legs-help
(cat "\nThe mouse can be moved between the %s "
     "screen and the %s screen!\n"
     "You can choose any of the four edges !\n"
))


(set #ask-legs-amiga
(cat "\nWhich edge of the %s screen do you want "
        "to move off to get to the AMIGA screen?\n"
))

(set #legs-amiga-help
(cat  "\nThe mouse can be moved between the %s "
      "screen and the AMIGA screen !\n"
      "You can choose any of the four edges !\n"
))

(set #exit-multi
(cat "\n\n The MultiGFX option is now installed!\n"
     "Please REMOVE all Floppy disks "
     "and REBOOT your machine!\n"
))

(set #ask-pieces
(cat "Which pieces of EGS do you wish to install?"
))

(set #pieces-help
(cat    "EGS-Basics      - EGS Drivers for Amiga,EGS,Bitmaps\n"
        "                  and Internal Tools and commands \n"
        "                  EGS-Basics > must < be installed !\n"
        "EGS-Prefs       - Preferences necessary for EGS.\n"
        "EGS-Utilities   - Utilities and Tools for EGS.\n"
        "EGS-Pictures    - Two 24-bit example pictures.\n"
        "EGS-Hooks       - Screen backpatterns.\n"
        "\n"
        "\n"
        "\n"
        "\n\n\n\n"
        "EGS-Paint       - 24-bit Paint Program.\n"
        "                  This Program is designed especially\n"
        "                  for GVP's EGS Boards.\n"
        "EGS-RecoverDisk - Creates an EGS recovery disk.\n"
        "                  If an unusable screenmode is saved\n"
        "                  and Workbench is redirected to \n"
        "                  this unusable screenmode, it will \n"
        "                  be restored to a correct screenmode\n"
        "                  with this disk.\n"
        "                  Please see the manual for more \n"
        "                  information on this option."
))


(set  #abort-nomem
(cat  "\n      No free Diskspace !      \n"
      "Sorry, but you need a minimum of %ld KBytes on "
      "your target device %s to install the selected options!"
))

(set  #abort-nooption
(cat  "\nSorry no option selected! "
      "Please try again and select an option "
      "to be installed!"
))

(set #ask-2monitor
(cat "\nHow many Monitors are you using ?\n"
))

(set #2monitor-help
(cat "One Monitor - You are using the EGS Pass-Through!\n"
     "              The Monitor is connected to the\n"
     "              Spectrum output and the AMIGA \n"
     "              output is connected Spectrum input!\n"
     "\n"
     "Two Monitor - You using one Monitor on the \n"
     "              %s output and one on your\n"
     "              RGB-AMIGA output ! \n"
))
;set #2montior-choice
(set #2OneMon  "One Monitor - connected to %s. ")
(set #2TwoMon  "Two Monitor - on the AMIGA and %s. ")

(set #ask-border-amiga-legs
(cat  "\nWhich edge of the AMIGA screen do you want "
      "to move off to get to the %s Board ?\n"
))

(set #border-amiga-legs-help
(cat  "\nThe mouse can be moved between the AMIGA "
      "screen and the %s screen !\n"
      "You can choose any of the four edges !\n"
))

(set #ask-disk
(cat  "\nPlease insert the disk labeled as %s.\n"
))

(set #disk1-help
(cat "Some EGS Libraries, Archives and Presets will"
       "be copied to your system."
))
(set #disk2-help
(cat "The EGS Prefs will be copied to your system."
))
(set #utilities-help
(cat "The EGS Utilities will be copied to your system."
))
(set #tools-help
(cat "The EGS Tools will be copied to your system."
))
(set #hooks-help
(cat "The EGS Hooks will be copied to your system."
))
(set #pics-help
(cat "The EGS Pictures will be copied to your system."
))
(set #paint-help
(cat "The EGS Paint software will be copied to your system."
))

(set #work-lha-egscolon
(cat "Installing EGS-System"
))

(set #work-lha-archive
(cat "Installing EGS-Env-Archive"
))

(set #work-lha-presets
(cat "Installing EGS-Presets"
))

(set #work-lha-prefs
(cat "Installing EGS-Prefs"
))

(set #work-lha-utilities
(cat "Installing EGS-Utilities"
))
(set #work-lha-extras
(cat "Installing EGS-Extras"
))

(set #work-lha-tools
(cat "Installing EGS-Tools"
))

(set #work-lha-hooks
(cat "Installing EGS-Hooks"
))

(set #work-lha-pics
(cat "Installing EGS-Pictures"
))

(set #work-lha-paint
(cat "Installing EGS-Paint"
))

(set #work-border
(cat "Installing EGS-Border config scripts"
))

(set  #ask-patchss
 (cat    "\nYour startup-sequence will be stored as startup-sequence.backup "
         "and a new one will be installed in its place.\n\n"
         "This is necessary because EGS must register its screenmodes in "
         "the Display Database *BEFORE* the first screen display is generated.\n\n"
         "The main change will be to execute EGS initialization programs right before"
         "the IPrefs program is run and any screens are generated.\n"
))

(set #patchss-help
  (cat  "\nIt will be nececssary to change the startup-sequence"
         "Before IPrefs is called the following lines will be insert: \n"
         ";BEGIN EGS                           \n"
         "c:cpu >nil: FASTROM                  \n"
         "c:assign egs: %segs/    \n"
         "c:assign libs: egs:libs add          \n"
         "egs/c/egsconfig file egs:s/EGS.config\n"
         "Wait 1 secs                          \n"
         ";END EGS                             \n"

))

(set #msg-g110-patchss
(cat  "\nIt will be necessary for you to change the "
      "startup-sequence yourself. Before IPrefs is called "
      "please insert the following lines:\n"
      ";BEGIN EGS                                \n"
      "c:cpu >nil: NOCACHE                       \n"
      "c:assign egs: %segs/      \n"
      "c:assign libs: egs:libs add               \n"
      "egs:c/GVPCPUCTRL >NIL: FASTROM MOVESSP    \n"
      "c:cpu >nil: CACHE                         \n"
      "egs:c/EGS-Init >nil: Auto CopyBack        \n"
      "egs/c/egsconfig file egs:s/EGS.config     \n"
      "egs:c/EGS-Init >nil: CopyBack             \n"
      "Wait 1 secs                               \n"
      ";END EGS                                  \n"
))

(set #msg-patchss
(cat  "\nIt will be necessary for you to change the \n"
      "startup-sequence yourself. Before IPrefs is called\n"
      "please insert the following lines:\n"
      ";BEGIN EGS                                \n"
      "c:cpu >nil: FASTROM                       \n"
      "c:assign egs: %segs/            \n"
      "c:assign libs: egs:libs add               \n"
      "egs/c/egsconfig file egs:s/EGS.config     \n"
      "Wait 1 secs                               \n"
      ";END EGS                                  \n"
))

(set #work-egsconfig "Install EGS-Monitor config file")

(set #work-write-recdisk "Installing recover disk startup-sequence...")

(set #ask-recdisk
(cat "\nPlease insert disk %s into any drive.\n"
     "\nMake sure that the disk is NOT write protected !\n"
))

(set #recdisk-help
(cat "\nThe RecoverDisk will be used to reset your "
     "screenmodes if you select and save a wrong screen "
     "screenmode for the EGS-Workbench. That can happen "
     "for example, if you select a high resolution screen "
     "for a monitor which is only capable of displaying low "
     "resolution screens. In this case the RecoverDisk will "
     "restore you Default Screen mode. "
))

(set #ask-startEGS
(cat    "\n        It is possible to start EGS now!        \n\n"
          "                  Select Start!                 \n"
        "\nIf not EGS will be installed automatically after\n"
          "            you reboot your machine.            \n\n"
          "                  Select Quit!                  \n"
))

(set #startEGS-help
(cat  "\nAfter you press Start you will be able to use"
       "EGS without rebooting your machine!\n "
       "Otherwise you must reboot your AMIGA!"
))

(set #start (cat "Start"))
(set #quit (cat "Quit"))

(set #remove-floppy
(cat  "\n\nPlease REMOVE all Floppy disks and\n"
      "REBOOT if you did not choose to start EGS!\n"
))

(set #ask-WhichCpu "\n For which CPU type do you wish to install the EGS-Software ?\n" )

(set #Normal_CPU "Plain Amiga with 68000 CPU")
(set #Money_CPU "Amiga with 68020/30/40 CPU")


(set #WhichCpu-help
(cat "\nIf you have a 68000 Amiga it is necessary to select the 68000 "
     "installation, because otherwise the EGS-Software will not able "
     "to start! If you have a 68020/30/40 you should select the "
     "corresponding button, because to install the special version "
     "of the EGS libraries for your Amiga \n"))

(set #prompt-userstartup "Add EGS commands to User-Startup...")

(set  #abort-multi-EGS-exist
(cat "No EGS-Software is installed, please try installation again and"
     "select the option >Basics< (or more) to install on your harddrive!"))

(set #ask-boardcfg "\n Which configuation of the EGS Boards do you want to install? \n" )

(set  #boardcfg-help
(cat  "\n"
      "There are several configurations of EGS-Boards possible in the Amiga. "
      "Listed here are only some of which the installer can handle automatically! "
      "If you would like to install a different configurations, please read the manual first!\n"
))
(set abort-path "Path %s dosen't exists ! ")

(set #BC_LEGS   "One EGS-28/24 Spectrum")
(set #BC_G110   "One EGS-110/24")
(set #BC_LL     "Two EGS-28/24 Spectrums")
(set #BC_G+L    "One EGS-110/24 and One EGS-28/24 Spectrum")

;=============================================================================

;=============================================================================
(if (= @language "deutsch")(
(set  #boardcfg-help
(cat  "\n"
      "Es sind verschiedene Konfigurationen von EGS-Karten im Amiga möglich ! "
      "Der Installer ist nur in der Lage die Angezeigten zu installieren, falls Sie "
      "eine andere Konfiguration haben, lesen Sie bitte das Benutzerhandbuch um "
      "Ihre Konfiguration herzustellen ! \n"
))
(set #ask-boardcfg "\n Welche Konfiguration von EGS-Karten möchten Sie installieren ? \n" )

(set  #abort-multi-EGS-exist
(cat "Es wurde noch keine EGS-Software installiert, bitte nochmal starten"
     " und mindestens die Option Basics auf die Festplatte installieren !"))

(set #bad-kick
(cat "\nEs ist eine Kickstart 2.04 oder größer"
     "für die Installation der EGS-Software nötig"
))

(set #on-error
(cat    "\n\n"
        "Die Installation wurde abgebrochen ODER "
        "der Abbruch durch einen Fehler hervorgerufen !\n\n"
        "Unglücklicherweise kann ein funktionierendes EGS-System "
        "nicht garaniert werden. Die Installation sollte wiederholt "
        "werden evtl. hilft das Lesen des Handbuches.  \n"
))

(set #ask-which-monitor
(cat "\n Welcher Monitor wird für die %s Karte benutzt ? \n"))

(set #which-monitor-help
(cat "\n"
     "Es es muß der Monitor für die Spectrum Karte ausgewählt werden. "
     "Auf diesem Monitor kann dann die hochauflösende Workbench oder der EGS "
     "Screen dargestellt werden.\n"
     "ACHTUNG ! WARNUNG !\n"
     "Sie können mit der Spectrum Karte Ihren Monitor erheblich schädigen,"
     "falls sie einen falschen Monitor auswählen. Zum Beispiel, können Sie NICHT "
     "einen IDEK Monitor auswählen, wenn Sie einen Commodore 1950 Monitor besitzen. "
     "Falls Sie es trotzdem versuchen und einen Screen von 1280x1024 in "
     "Non-Interlaced öffnen, können Sie Ihren 1950 zerstören ! "
     "Bitte achten Sie darauf, daß Sie evtl. erst einmal einen Monitor mit "
     "geringer Auflösung wählen (VGA), Sie können dann später im EGS-DisplayAdjust "
     "immer noch einen anderen Monitor auswählen ! \n"
))

(set #check
(cat "Überprüfe Festpaltte/System"
))

(set #wrong-libs
(cat  "\nHopela, da sind unbekannte EGS Libraries im System."
      "Die Installation ist nur für die Spectrum oder der EGS-110/24 "
      "Karte von GVP ! Bitte die EGS Libraries im Verzeichniss "
      "LIBS: löschen oder sichern und die Installation neu starten. \n"
))

(set #old-libs
(cat "\n"
     "Es wurden einige alte EGS Libraries im libs: Verzeichnis "
       "entdeckt. Für das neue EGS-System ist es notwendig, die alten "
       "Libraries zu löschen, da diese sonst anstelle der neuen "
       "geladen werden. \n"
     "Das alte EGS-110/24-System wird mit dem neuen EGS-System, "
     "EGS-Treibern und Libraries erneuert."
     "Falls keine EGS-110/24 Karte im System ist, sollte die "
     "Installation beendet werden."
))

(set #old-libs-help
(cat "\nEs kann weiter installiert werden >EGS-110 Update< "
     "dann werden die alten Libraries gelöscht."
         " >EGS-110/24 + Spectrum< installiert / Updated das alte "
     "EGS-System für die EGS-110/24 Karte und installiert "
     "eine Spectrum Karte."
))

(set #which-disk
(cat "\nAuf welchem Laufwerk soll EGS installiert werden ?\n"
))

(set #which-disk-help
(cat "\n"
     "Hier wird die Festplatte/Partition ausgewählt auf der"
     "die EGS-Dateien kopiert werden. \n\n"
     @askdir-help
))
(set #egs-exists
(cat "\nDas Zielverzeichnis %s existiert schon. "
       "Vielleicht wurde EGS schon mal installiert "
       "und es soll nur erneuert (Update) werden ? \n"
       "Oder es soll EGS-MultiGFX installiert werden -"
       "d.h. es sollen zwei EGS Karten parallel in the Amiga "
      "betrieben werden."
))

(set #egs-exists-help
(cat "\nBei >Update< wird das EGS Verzeichnis "
     " %s mit neuen Datei überkopiert.\n"
         "Falls >MultiGFX< installiert werden soll, werden "
     "nur neue Dateien in WBStartup hinzugefügt. "
))

(set #egs-rename
(cat "\nDas Zielverzeichnis %s existiert schon ! "
     "Sollen das Verzeichnis umbenannt werden ? "
     "Falls nicht, werden die alten Dateien überkopiert !"
))

(set #egs-rename-help
(cat "\nBei >Umbennen< wird das Verzeichnis %s "
     "in %s-OLD umbenannt.\n"
     "Bei >Nein< werden die alten Dateien überkopiert !"
))

(set #egs-rename-button
(cat "Umbenennen"
))

(set #NO
(cat " Nein "
))

(set #ask-disk1
(cat  "Bitte Diskette mit dem Namen %s in ein Diskettenlaufwerk legen."))

(set #ask-disk1-setup
(cat "EGS und andere Tools werden von der "
       "Diskette %s auf die Festplatte kopiert."
))

(set #multi-warning
(cat
     "\n               WARNUNG:                     \n"
     "Falls schon 2 EGS-Karten installiert wurden \n"
     "muß die egs:s/EGS.config Datei von Hand     \n"
     "abgeändert werden ! Siehe Handbuch unter    \n"
     "EGSConfig für mehr information.             \n"
))

(set #ask-monitors
(cat "\nWieviele Monitore werden benutzt ?\n"
))

(set #monitors-help1
(cat   "\n"
       "2 Monitore - Es wird ein Monitor an der %s Karte \n"
       "             und ein Monitor and an der Spectrum \n"
       "             Karte mit dem Pass-Through vom AMIGA \n"
       "             benutzt. \n"
       "3 Monitore - Es wird jeweils ein Monitor für die\n"
       "             Spectrum und %s Karte benutzt, \n"
       "             desweitern wird auch ein Monitor   \n"
       "             am AMIGA-RGB Ausgang benutzt ! \n\n\n\n"
))

(set #monitors-help2
(cat   "\n\n"
       "Falls ein A2000 benutzt wird, werden die Karten  "
       "von links nach rechts einkonfiguriert."
       "Im Falle eines A3000/A4000 werden die Erweiterungskarten"
       "von unten nach oben einkonfiguriert.\n"
       "Das spielt eine Rolle bei der Festlegung welche "
       "Spectrum Karte A oder B ist. Die Karte an der oberen (oder rechten) "
       "Seite wird als letzte Karte einkonfiguriert (also als Karte-B)."
))

(set  #OneMonitor   "1 Monitor - keine Mause zwischen den Karten")
(set  #TwoMonitor   "2 Monitor - Je einen an GFX-A(AMIGA) und B")
(set  #ThreeMonitor "3 Monitor - Je einen an GFX-A,B und AMIGA ")


(set #ask-2border
(cat "\nVon welcher Seite des %s Bildschirms soll \n"
        "die Maus auf den %s Bildschirms fahren ?\n"
))

(set #2border-help
(cat  "Die Maus kann zwischen der Spectrum Karte \n"
      "(AMIGA) und dem %s Bildschirm hin und her fahren !\n"
      "Es können alle 4 Richtungen ausgewählt werden !\n"
))


(set #Top       "Oben   - nach Oben ")
(set #Right     "Rechts - Rechts vom Bildschirm")
(set #Left      "Links  - Links vom Bildschirm")
(set #Bottom    "Unten  - nach Unten ")

(set #G110-3monitor-yourself
(cat "Leider muß die Konfiguration von EGS-110/24 \n"
     "und der Spectrum Karte mit 3 Monitoren von\n"
     "Ihnen selbst durchgeführt werden. \n"
))

(set #ask-Amiga-legs
(cat "\nVon welcher Seite des AMIGA Bildschirms soll \n"
        "die Maus auf den %s Bildschirm fahren ?\n"
))

(set #Amiga-legs-help
(cat  "Die Maus kann zwischen dem AMIGA Bildschirm\n"
      "und dem %s Bildschirm hin und her fahren !\n"
      "Es können alle 4 Richtungen ausgewählt werden !\n"
))

(set #ask-legs-legs
(cat "\nVon welcher Seite des %s Bildschirms soll \n"
        "die Maus auf den %s Bildschirm fahren ?\n"
))

(set #legs-legs-help
(cat  "Die Maus kann zwischen dem %s Bildschirm\n"
      "und dem %s Bildschirm hin und her fahren !\n"
      "Es können alle 4 Richtungen ausgewählt werden !\n"
))


(set #ask-legs-amiga
(cat "\nVon welcher Seite des %s Bildschirms soll \n"
        "die Maus auf den AMIGA Bildschirm fahren ?\n"
))

(set #legs-amiga-help
(cat  "Die Maus kann zwischen dem %s Bildschirm\n"
      "und dem AMIGA Bildschirm hin und her fahren !\n"
      "Es können alle 4 Richtungen ausgewählt werden !\n"
))

(set #exit-multi
(cat "\n\n Die MultiGFX ist jetzt installiert !\n"
     "Bitte entfernen Sie alle Disketten aus den \n"
     "Laufwerken und rebooten sie Ihren AMIGA ! \n"
))

(set #ask-pieces
(cat "Welche Packete der EGS-Software sollen installiert werden ?"
))

(set #pieces-help
(cat    "EGS-Basics      - EGS Treiber für Amiga,EGS,Bitmaps\n"
        "                  und Befehle. \n"
        "                  EGS-Basics > müssen < installiert!\n"
        "                  werden !\n"
        "EGS-Prefs       - Preferences für EGS.\n"
        "EGS-Utilities   - Utilities und Tools für EGS.\n"
        "EGS-Bilder      - Zwei 24-Bit Beispiel Bilder.\n"
        "EGS-Hook        - Bilder für den               \n"
        "                  Bildschirmhintergrund.\n"
        "\n"
        "\n\n\n\n"
        "EGS-Paint       - 24-Bit Mal-Programm \n"
        "                  Das Program ist speziell für\n"
        "                  die Spectrum Karte.\n"
        "EGS-RecoverDisk - Erstellt eine EGS Recover Disk.\n"
        "                  Falls nichtbenutzbare Screenmode \n"
        "                  gespeichert wurden und die Workbench\n"
        "                  nicht mehr erkennbar ist, stellt \n"
        "                  die Diskette den normal Zustand \n"
        "                  wieder her. Für mehr Informationen \n"
        "                  siehe im Handbuch unter RecoverDisk.\n"
))


(set  #abort-nomem
(cat  "Nicht genug Festplattenspeicher frei !\n"
      "Es ist ein  Minimum von %ld KBytes auf der\n"
      "Festplatte %s nötig, um alle ausgewählten \n"
      "Programme zu installieren ! \n"
))

(set  #abort-nooption
(cat  "\nEs wurde keine Option ausgewählt !\n"
      "\nBitte nochmal versuchen und eine  \n"
      "\nOption zum installieren auswählen ! "
))

(set #ask-2monitor
(cat "\nWieviele Monitore werden benutzt ?\n"
))

(set #2monitor-help




(cat " 1  Monitor - Der EGS Pass-Through wir benutzt ! \n"
     "              Der Monitor ist mit der Spectrum   \n"
     "              Karte verbunden und der Ausgang des\n"
     "              AMIGAs ist mit dem Eingang der     \n"
     "              Spectrum Karte verbunden.          \n"
     "\n"
     " 2  Monitor - Es wird 1 Monitor an der %s -Karte \n"
     "              benutzt und ein Monitor ist an dem \n"
     "              RGB-AMIGA Ausgang angeschlossen.   \n"
))

(set #2OneMon  "1 Monitor - verbunden mit %s.")
(set #2TwoMon  "2 Monitor - an AMIGA und %s.")

(set #ask-border-amiga-legs
(cat  "\nVon welcher Seite des AMIGA Bildschirm soll \n"
      "so es möglich sein auf den %s Bildschim zuwechseln ?\n"
))

(set #border-amiga-legs-help
(cat  "Die Maus kann zwischen dem AMIGA Bildschirm \n"
      "und dem %s Bildschirm bin und her wechseln !\n"
      "Das ist aus allen 4 Richtungen möglich !\n"
))

(set #ask-disk
(cat  "\nBitte Diskette mit dem Namen %s in ein Laufwerk legen.\n"
))

(set #disk1-help
(cat "Die EGS Libraries, Archive und Voreinstellungen"
       "werden auf Ihre Festplatte kopiert."
))

(set #disk2-help
(cat "Die EGS Prefs werden auf die Festplatte kopiert."
))

(set #utilities-help
(cat "Die EGS Utilities werden auf die Festplatte kopiert."
))

(set #tools-help
(cat "Die EGS Tools werden auf die Festplatte kopiert."
))

(set #hooks-help
(cat "Die EGS Hooks werden auf die Festplatte kopiert."
))

(set #pics-help
(cat "Die EGS Pictures werden auf die Festplatte kopiert."
))

(set #paint-help
(cat "Das EGS Paint wird auf die Festplatte kopiert."
))

(set #work-lha-egscolon
(cat "Installiere EGS-System ..."
))

(set #work-lha-archive
(cat "Installiere EGS-EnvArchive ..."
))

(set #work-lha-presets
(cat "Installiere EGS-Presets ..."
))

(set #work-lha-prefs
(cat "Installiere EGS-Prefs ..."
))

(set #work-lha-utilities
(cat "Installiere EGS-Utilities ..."
))
(set #work-lha-extras
(cat "Installiere EGS-Extras"
))

(set #work-lha-tools
(cat "Installiere EGS-Tools ..."
))

(set #work-lha-hooks
(cat "Installiere EGS-Hooks ..."
))

(set #work-lha-pics
(cat "Installiere Pictures ..."
))

(set #work-lha-paint
(cat "Installiere EGS-Paint ..."
))

(set #work-border
(cat "Installiere EGS-Mause Konfiguartion"
))

(set  #ask-patchss
 (cat    "Die alte \"startup-sequence\" wird nach \"startup-sequence.backup\" kopiert, "
         "und eine neue startup-sequence wird installiert.\n"
         "Dies ist nötig, um die EGS-Screens "
         "vor dem Öffnen der Workbench in die Amiga-Screenliste aufzunehmen.\n"
         "Der Unterschied zur alten \"startup-sequence\" ist, daß "
         "einige Programme vor dem Befehl IPrefs gestartet werden.\n"
))

(set #patchss-help
  (cat   "Um EGS automatisch zu starten, is es nötig die \n"
         "startup-sequence zu ändern. Es werden folgende\n"
         "Zeilen vor dem Befehl "IPrefs" eingefügt:   \n\n"
         ";BEGIN EGS                           \n"
         "c:cpu >nil: FASTROM                  \n"
         "c:assign egs: %segs/       \n"
         "c:assign libs: egs:libs add          \n"
         "egs:c/NoCacheZorro3 >nil:            \n"
         "egs/c/egsconfig file egs:s/EGS.config\n"
         "Wait 1 secs                          \n"
         ";END EGS                             \n"
))

(set #msg-g110-patchss
(cat  "Sie müssen Ihre startup-sequence von Hand \n"
      "ändern um EGS automatisch zu starten.    \n"
      "Bitten fügen Sie folgende Zeilen in Ihre  \n"
      "startup-sequence vor dem Befehl IPrefs ein:\n\n"
      ";BEGIN EGS                                \n"
      "c:cpu >nil: NOCACHE                       \n"
      "c:assign egs: %segs/            \n"
      "c:assign libs: egs:libs add               \n"
      "egs:c/GVPCPUCTRL >NIL: FASTROM MOVESSP    \n"
      "c:cpu >nil: CACHE                         \n"
      "egs:c/G110Init >nil: Auto CopyBack        \n"
      "egs/c/egsconfig file egs:s/EGS.config     \n"
      "egs:c/G110Init >nil: CopyBack             \n"
      "Wait 1 secs                               \n"
      ";END EGS                                  \n"
))

(set #msg-patchss
(cat  "Sie müssen Ihre startup-sequence von Hand \n"
      "ändern umd EGS automatisch zu starten.    \n"
      "Bitten fügen Sie folgende Zeilen in Ihre  \n"
      "startup-sequence vor dem Befehl IPrefs ein:\n\n"
      ";BEGIN EGS                                \n"
      "c:cpu >nil: FASTROM                       \n"
      "c:assign egs: %segs/            \n"
      "c:assign libs: egs:libs add               \n"
      "egs:c/NoCacheZorro3 >nil:                 \n"
      "egs/c/egsconfig file egs:s/EGS.config     \n"
      "Wait 1 secs                               \n"
      ";END EGS                                  \n"
))

(set #work-egsconfig "Installiere EGS-Monitor Konfiguartion")

(set #work-write-recdisk "Installiere Recover Disk startup-sequence")

(set #ask-recdisk
(cat "Bitte die Diskette %s in ein Laufwerk legen. \n\n"
     "Bitte versichern Sie sich, daß die Diskette NICHT\n"
     "schreibgeschützt ist !\n"
))

(set #recdisk-help
(cat "Die EGS-Recover-Disk wird benutzt, um die ScreenModes \n"
     "wieder in den Normalzustand zusetzen, falls falsche  \n"
     "Screenmodes für die EGS-Workbench oder EGS abgespeichert\n"
     "wurden. Das kann passieren, wenn zum Beispiel ein hoch-\n"
     "auflösender Screen für die Workbench abgespeichert \n"
     "wurde, der Monitor aber nur in der Lage ist Screens \n"
     "mit geringerer Frequenz darzustellen. In so einem Fall\n"
     "kann auf der Workbench nichts mehr erkennen und man muß  \n"
     "von der Recover Disk booten. Diese stellt die AMIGA     \n"
     "ScreenModes dann wieder her.                          \n"
))

(set #ask-startEGS
(cat    "\nUm EGS jetzt zu starten, bitte  \n\n"
        "           \"start\" drücken.           \n"
        "\nUm EGS erst nach einem Neustart  \n"
        "des Rechners zu starten, bitte    \n\n"
        "          \"beenden\" drücken.         \n"
))

(set #startEGS-help
(cat "\nNachdem der Start-Knopf gedrückt wurde,   \n"
       "ist es möglich EGS zu benutzen, ohne den  \n"
       "Rechner zu rebooten.                      \n"
       "Sie können auch \"beenden\" drücken, allerdings\n"
       "müssen Sie dann Ihren Amiga rücksetzen, um EGS\n"
       "zu starten !                              \n"
))

(set #start (cat "Start"))
(set #quit (cat "Beenden"))

(set #remove-floppy
(cat  "\n\nBitte die Diskette aus dem Laufwerk entfernen !\n\n"
))

(set #ask-WhichCpu "\n Für welchen CPU Typ soll die EGS-Software installiert werden ?\n" )

(set #Normal_CPU "Normalen Amiga mit 68000 CPU")
(set #Money_CPU "Amiga mit 68020/30/40 CPU")


(set #WhichCpu-help
(cat "Falls Sie einen 68000 Amiga besitzen, dann sollten Sie die 68000 "
     "zum Installieren auswählen. Die 68020/30/40 EGS-Software kann"
     "nicht auf einem 68000 instalieren werden !\n"
     "Wenn Sie einen A4000/A3000 oder ein A2000 mit Turbo-Karte besitzen "
     "sollten Sie die 68020/30/40 EGS-Software installieren, da diese "
     "für die Prozessoren kompiliert worden sind. \n"))

(set #prompt-userstartup "Ändere User-Startup")
(set abort-path "Pfad %s existiert nicht ! ")

(set #BC_LEGS   "Eine EGS-28/24 Spectrum")
(set #BC_G110   "Eine EGS-110/24")
(set #BC_LL     "Zwei EGS-28/24 Spectrums")
(set #BC_G+L    "Eine EGS-110/24 und eine EGS-28/24 Spectrum")


));if deutsch
;=============================================================================
;=============================================================================
                 ;*** Error / Abort Message
                 ;*** set up a error cleanup routine
(onerror (message #on-error))
;=============================================================================
(set monitor 0)
(set BoardForMonitor "")

(procedure WhichMonitor
(
 (set monitor
     (askchoice
     (prompt (#ask-which-monitor BoardForMonitor))
     (choices
               "Commodore C=1930"
               "Commodore C=1942"
               "Commodore C=1950"
               "Commodore C=1960"
               "Standard VGA"
               "Standard S-VGA"
               "Standard VESA 60Hz"
               "Standard VESA 72Hz"
               "PAL Monitor"
               "NTSC Monitor"
               "IDEK Multisync"
               "NEC Multisync"
               )
     (default 1)
     (help  #which-monitor-help @askoptions-help)
    ))
)); pro
;=============================================================================
(set MonitorFor 0)

(procedure CopyMonitor
(
 (set n 0)
 (while (set MonitorName
        (select n
             "/C1930"
             "/C1942"
             "/C1950"
             "/C1960"
             "/VGA"
             "/SVGA"
             "/VESA60Hz"
             "/VESA72Hz"
             "/PAL"
             "/NTSC"
             "/IDEK"
             "/NEC"
             ""))(
        (if (AND (= monitor n) (= MonitorFor LEGS))(
            (set hjob (cat "copy "TMP BIN MonitorName " to "))
            (set hjob (cat hjob EGS "egs/monitors/Prefs/" LEGSName ".mux.map2video"))
            (run hjob)
        ));if monitor

        (if (AND (= monitor n) (= MonitorFor G110))(
            (set hjob (cat "copy "TMP BIN MonitorName " to "))
            (set hjob (cat hjob EGS "egs/monitors/Prefs/G110.mux.map2video"))
            (run hjob)
        ));if monitor

       (set n (+ n 1))
  ));while
))

;=============================================================================
(set LEGS       0)
(set G110       1)
(set LEGS+LEGS  2)
(set G110+LEGS  3)
(set Multi 0)
                                        ;*** Ask EGS-Board type
(procedure AskBoard
(
  (set BoardCFG LEGS)

     (set BoardCFG
         (askchoice
         (prompt #ask-boardcfg )
         (choices
              #BC_LEGS
              #BC_G110
              #BC_LL
              #BC_G+L
           )
         (default 0)
         (help  #boardcfg-help)
      ))

   (if (= BoardCFG G110)(
       (set ANAME "EGS-110/24")
       (set BNAME "EGS-110/24")
       (set Multi 0)
    ))

   (if (= BoardCFG G110+LEGS)(
       (set ANAME "Spectrum")
       (set BNAME "EGS-110/24")
       (set Multi 0)
   ))

   (if (= BoardCFG LEGS)(
       (set ANAME "Spectrum")
       (set BNAME "Spectrum")
       (set Multi 0)
   ))

   (if (= BoardCFG LEGS+LEGS)(
       (set ANAME "Spectrum-A")
       (set BNAME "Spectrum-B")
       (set Multi 1)
   ))
))

;=============================================================================

(procedure Check_System_AND_Copy_Tools (
                                    ;*** Check KickStart Version
  (if (= @pretend 0)(

  (set os_ver (/ (getversion) $0000FFFF))

  (if (< os_ver 37)
      (abort #bad-kick))

  (askdisk
     (prompt (#ask-disk1 Disk1))
     (help   (#ask-disk1-setup Disk1))
     (dest Disk1)
  )                                 ;*** Copy df0:bin  SETUP for BASIC

  (copyfiles
     (source Disk1:)
     (dest TMP)
     (choices BIN )
  )

                                    ;*** Check WorkBench Version
  (set wb_ver (getenv "Workbench"))
  (set wb_ver (+ wb_ver 0.0))
  (if (> wb_ver 0)
       (set AutoMount 1))           ;*** neseccary for Mount ECON
;****
  (run "T:bin/cpu nocache nofastrom noburst nocopyback >env:cpu")
  (run "T:bin/cpu >nil: nodatacache ")
  (set cpuenv (getenv "cpu"))
                                    ;*** Check CPU for the EGS-libs and Blanker !
  ))

  (if (= cpuenv "System: 68040 68882 FastROM (INST: NoCache NoBurst) (DATA: NoCache NoBurst)\n")(
      (set WhichCpu 1)
  ))

  (if (= cpuenv "System: 68040 68882 (INST: NoCache NoBurst) (DATA: NoCache NoBurst)\n")(
      (set WhichCpu 1)
  ))

  (if (= cpuenv "System: 68040 (INST: NoCache NoBurst) (DATA: NoCache NoBurst)\n")(
      (set WhichCpu 1)
  ))

  (if (= cpuenv "System: 68030 68882 (INST: NoCache NoBurst) (DATA: NoCache NoBurst)\n")(
      (set WhichCpu 1)
  ))

  (if (= cpuenv "System: 68030 68882 FastROM (INST: NoCache NoBurst) (DATA: NoCache NoBurst)\n")(
      (set WhichCpu 1)
  ))

  (if (= cpuenv "System: 68030 (INST: NoCache NoBurst) (DATA: NoCache NoBurst)\n")(
      (set WhichCpu 1)
      (set NoFPU    1)
  ))

  (if (= @user-level 2)(
      (set WhichCpu
         (askchoice
             (prompt  #ask-WhichCpu)
             (help    #WhichCpu-help)
             (choices #Normal_CPU
                      #Money_CPU)
             (default  WhichCpu)
       ))
  ))

                                          ;*** TEST if there is a EGS Directoty

(if (exists "sys:libs/egs.library")(

    (working #check)
    (set chksum (getsum "sys:libs/egs.library"))

    (if (<> EGS110ID chksum)
         (exit #wrong-libs))

      (set old (askbool
                (prompt #old-libs)
                  (help   #old-libs-help)

       (choices "Update EGS 110/24" "EGS 110/24 + Spectrum");
   (default 0)))
                                    ;*** Delete Old egs.libraries
   (run DEL_OLD)

   (if (= old 0)(
       (set BoardCFG G110+LEGS)
       (set BNAME "EGS-110/24")
       (set ANAME "Spectrum")
       (set Multi 1)
    ))

   (if (= old 1)(
       (set BoardCFG G110)
       (set ANAME "EGS-110/24")
       (set BNAME "EGS-110/24")
       (set Multi 0)
   ))
))

))

;=============================================================================
(procedure Check_EGSdir (
                                   ;*** EGS DirAlread Exists
  (if (exists EGS_Dest)(
      (set Multi (askbool
                 (prompt (#egs-exists EGS_Dest))
                 (help   (#egs-exists-help EGS_Dest))
                 (choices "Multi EGS" "Update")
     ))

      (if (= Multi 0)(
          (set RE (askbool
                  (prompt  (#egs-rename EGS_Dest))
                  (help    (#egs-rename-help EGS_Dest EGS_Dest))
                  (choices #egs-rename-button #NO)
                  ))

          (if (= RE 1)(
               (set hjob (cat "rename " EGS_Dest " as " EGS "EGS-OLD"))
               (run hjob)
               (set hjob (cat "rename " EGS_Dest ".info as " EGS "EGS-OLD.info"))
               (run hjob)))
      ))

      (if (= Multi 1)
          (AskBoard))

   (if (= BoardCFG G110+LEGS)
      (set Multi 1))


  ))
))
;=============================================================================
(procedure Normal_Install(

(set ONE 0)
(set TWO 1)
(set TOP    0)
(set RIGHT  1)
(set LEFT   2)
(set BOTTOM 3)

  (set MonitorOpts
                                  ;*** How many Monitors TWO or One
     (askchoice
        (prompt   #ask-2monitor)
        (help    (#2monitor-help ANAME BNAME))
        (choices  (#2OneMon ANAME) (#2TwoMon BNAME))
        (default ONE)
     )
  )

  (if (= MonitorOpts TWO)(
                                  ;*** Border Question
  (set MouseBorder
     (askchoice
          (prompt  (#ask-border-amiga-legs ANAME))
          (help    (#border-amiga-legs-help ANAME))
              (choices #Top
                       #Right
                       #Left
                       #Bottom)
          (default RIGHT)
     ))
  )) ;IF

                                       ;****  EGS Border Config
  (working #work-border)
  (run WBBackup)
  (run WBDelete)

  (if (AND (= BoardCFG LEGS) (= MonitorOpts TWO))(
          (if (= MouseBorder TOP)
              (run Amiga_2_EGSaT))
          (if (= MouseBorder RIGHT)
              (run Amiga_2_EGSaR))
          (if (= MouseBorder LEFT)
              (run Amiga_2_EGSaL))
          (if (= MouseBorder BOTTOM)
              (run Amiga_2_EGSaB))
  ))

  (if (AND (= BoardCFG G110) (= MonitorOpts TWO))(
          (if (= MouseBorder TOP)
              (run Amiga_2_G110T))
          (if (= MouseBorder RIGHT)
              (run Amiga_2_G110R))
          (if (= MouseBorder LEFT)
              (run Amiga_2_G110L))
          (if (= MouseBorder BOTTOM)
              (run Amiga_2_G110B))
  ))
                                       ;*** EGS Monitor Prefs

    (if (= BoardCFG LEGS)(
            (set LEGSName "LEGSa")
            (set MonitorFor LEGS)
            (set BoardForMonitor ANAME)
            (WhichMonitor)
            (CopyMonitor)
    ))

    (if (= BoardCFG G110)(
            (set MonitorFor G110)
            (set BoardForMonitor BNAME)
            (WhichMonitor)
            (CopyMonitor)
    ))

  (run OnlyAmiga) ; Amiga driver
                                       ;**** EGS Config File
  (working #work-egsconfig)

  (if (AND (= MonitorOpts ONE) (= Multi 0))(
            (set hjob (cat TXT EGS CFGNAME))
            (run hjob)
            (if (= BoardCFG LEGS)(
                 (set hjob (cat EGSLegsa EGS CFGNAME))
                 (run hjob)
                 (set hjob (cat EGSLegsa+Amiga EGS CFGNAME))
                 (run hjob)))

            (if (= BoardCFG G110)(
                 (set hjob (cat EGSG110 EGS CFGNAME))
                 (run hjob)
                 (set hjob (cat EGSAmiga EGS CFGNAME))
                 (run hjob)))

            (set hjob (cat EGSWB EGS CFGNAME))
            (run hjob)

  ))
  (if (AND (= MonitorOpts TWO) (= Multi 0))(
            (set hjob (cat TXT EGS CFGNAME))
            (run hjob)
            (if (= BoardCFG LEGS)(
                 (set hjob (cat EGSLegsa EGS CFGNAME))
                 (run hjob)
                 (set hjob (cat EGSAmiga EGS CFGNAME))
                 (run hjob)))

            (if (= BoardCFG G110)(
                 (set hjob (cat EGSG110 EGS CFGNAME))
                 (run hjob)
                 (set hjob (cat EGSAmiga EGS CFGNAME))
                 (run hjob)))

            (set hjob (cat EGSWB EGS CFGNAME))
            (run hjob)
  ))

  (set hjob (cat COPYCONFIG EGS EGSS))
  (run hjob)

));procedure Normal_Install

;=============================================================================

(procedure MultiGFX_Install(

  (if (NOT (exists EGS_Dest))
     (abort #abort-multi-EGS-exist))

    (message #multi-warning)
                                          ;***  How many Monitors
    (set ONE   0)
    (set TWO   1)
    (set THREE 2)

    (set MonitorOpts
       (askchoice
           (prompt  #ask-monitors)
           (help    (#monitors-help1 ANAME BNAME) #monitor-help2)
           (choices #OneMonitor
                    #TwoMonitor
                    #ThreeMonitor)
           (default  1)
      ))

                                           ;*** Which Monitors

    (if (OR (= BoardCFG LEGS) (= BoardCFG LEGS+LEGS) (= BoardCFG G110+LEGS))(
            (set LEGSName "LEGSa")
            (set MonitorFor LEGS)
            (set BoardForMonitor ANAME)
            (WhichMonitor)
            (CopyMonitor)
    ))

    (if (OR (= BoardCFG G110) (= BoardCFG G110+LEGS))(
            (set BoardForMonitor BNAME)
            (set MonitorFor G110)
            (WhichMonitor)
            (CopyMonitor)
    ))

    (if (= BoardCFG LEGS+LEGS)(
            (set LEGSName "LEGSb")
            (set MonitorFor LEGS)
            (set BoardForMonitor BNAME)
            (WhichMonitor)
            (CopyMonitor)
    ))
                                            ;*** Set MouseBorder for 2 Monitore
    (set TOP    0)
    (set RIGHT  1)
    (set LEFT   2)
    (set BOTTOM 3)

    (if (= MonitorOpts TWO)(

     (set hjob (cat TXT EGS CFGNAME))
     (run hjob)

     (set hjob (cat EGSLegsa EGS CFGNAME))
     (run hjob)

     (if (= BoardCFG LEGS+LEGS)(
          (set hjob (cat EGSLegsb EGS CFGNAME))
          (run hjob)))

     (if (= BoardCFG G110+LEGS)(
          (set hjob (cat EGSG110 EGS CFGNAME))
          (run hjob)))

     (set hjob (cat EGSLegsa+Amiga EGS CFGNAME))
     (run hjob)
     (set hjob (cat EGSWB EGS CFGNAME))
     (run hjob)

    (set MouseBorder
       (askchoice
            (prompt  (#ask-2border ANAME BNAME))
            (help    (#2border-help ANAME BNAME))
            (choices #Top
                     #Right
                     #Left
                     #Bottom)
            (default RIGHT)
      ))

       (run WBBackup)
       (run WBDelete)

       (if (= BoardCFG LEGS+LEGS)(
           (if (= MouseBorder TOP)(
               (run Amiga_2_EGSaT)
               (run EGSa_2_EGSbT)))

           (if (= MouseBorder RIGHT)(
               (run Amiga_2_EGSaR)
               (run EGSa_2_EGSbR)))

           (if (= MouseBorder LEFT)(
               (run Amiga_2_EGSaL)
               (run EGSa_2_EGSbL)))

           (if (= MouseBorder BOTTOM)(
               (run Amiga_2_EGSaB)
               (run EGSa_2_EGSbB)))
       ));IF

       (if (= BoardCFG G110+LEGS)(
           (if (= MouseBorder TOP)(
               (run Amiga_2_G110T)
               (run G110_2_EGSaT)))

           (if (= MouseBorder RIGHT)(
               (run Amiga_2_G110R)
               (run G110_2_EGSaR)))

           (if (= MouseBorder LEFT)(
               (run Amiga_2_G110L)
               (run G110_2_EGSaL)))

           (if (= MouseBorder BOTTOM)(
               (run Amiga_2_G110B)
               (run G110_2_EGSaB)))
        ));IF

     )) ;MonitorOpts Two

                                         ;*** MouseBorder for 3 Montiors

    (if (= MonitorOpts THREE)(
     (set hjob (cat TXT EGS CFGNAME))
     (run hjob)
     (set hjob (cat EGSLegsa EGS CFGNAME))
     (run hjob)
                                         ;***LEGSaToAmiga

     (if (= BoardCFG LEGS+LEGS)(
          (set hjob (cat EGSLegsb EGS CFGNAME))
          (run hjob)))

     (if (= BoardCFG G110+LEGS)(
          (set hjob (cat EGSG110 EGS CFGNAME))
          (run hjob)))

     (set hjob (cat EGSAmiga EGS CFGNAME))
     (run hjob)
     (set hjob (cat EGSWB EGS CFGNAME))
     (run hjob)

;    (if (= BoardCFG G110)
;           (message #G110-3monitors-yourself))

    (set MouseBorder
       (askchoice
            (prompt   (#ask-Amiga-legs ANAME ))
            (help     (#Amiga-legs-help ANAME ))
            (choices #Top
                     #Right
                     #Left
                     #Bottom)
            (default RIGHT)
      ))

       (run WBBackup)
       (run WBDelete)

       (if (= MouseBorder TOP)
           (run Amiga_2_EGSaT))
       (if (= MouseBorder RIGHT)
           (run Amiga_2_EGSaR))
       (if (= MouseBorder LEFT)
           (run Amiga_2_EGSaL))
       (if (= MouseBorder BOTTOM)
           (run Amiga_2_EGSaB))

                                         ;*** EGSaToEGSb*OR*LEGStoG110

    (set MouseBorder
       (askchoice
            (prompt  (#ask-legs-legs ANAME BNAME ))
            (help    (#legs-legs-help ANAME BNAME))
            (choices #Top
                     #Right
                     #Left
                     #Bottom)
            (default RIGHT)
      ))


       (if (= BoardCFG LEGS+LEGS)(
            (if (= MouseBorder TOP)
                (run EGSa_2_EGSbT))
            (if (= MouseBorder RIGHT)
                (run EGSa_2_EGSbR))
            (if (= MouseBorder LEFT)
                (run EGSa_2_EGSbL))
            (if (= MouseBorder BOTTOM)
                (run EGSa_2_EGSbB))
        ));IF

       (if (= BoardCFG G110+LEGS)(
           (if (= MouseBorder TOP)
               (run Amiga_2_G110T)
               (run G110_2_EGSaT))
           (if (= MouseBorder RIGHT)
               (run Amiga_2_G110R)
               (run G110_2_EGSaR))
           (if (= MouseBorder LEFT)
               (run Amiga_2_G110L)
               (run G110_2_EGSaL))
           (if (= MouseBorder BOTTOM)
               (run Amiga_2_G110B)
               (run G110_2_EGSaB))
        ));IF

                                         ;*** EGSbToAmiga OR G110toAmiga

    (set MouseBorder
       (askchoice
            (prompt  (#ask-legs-amiga ANAME BNMAE ))
            (help    (#legs-amiga-help ANAME BNAME ))
            (choices #Top
                     #Right
                     #Left
                     #Bottom)
            (default RIGHT)
      ))

       (if (= BoardCFG LEGS+LEGS)(

           (if (= MouseBorder TOP)
               (run EGSb_2_AmigaT))
           (if (= MouseBorder RIGHT)
               (run EGSb_2_AmigaR))
           (if (= MouseBorder LEFT)
               (run EGSb_2_AmigaL))
           (if (= MouseBorder BOTTOM)
               (run EGSb_2_AmigaB))
       ))

       (if (= BoardCFG G110+LEGS)(

           (if (= MouseBorder TOP)
               (run Amiga_2_G110T))
           (if (= MouseBorder RIGHT)
               (run Amiga_2_G110R))
           (if (= MouseBorder LEFT)
               (run Amiga_2_G110L))
           (if (= MouseBorder BOTTOM)
               (run Amiga_2_G110B))

        ));IF

  )) ;MonitorOpts

    (run OnlyAmiga)


)); Procedure Install_MultiGFX

;=============================================================================
(procedure Get_Path(
                                      ;*** ASK Which Disk
  (set target
       (askdir
       (prompt #which-disk)
       (help   #which-disk-help)
       (default @default-dest))
  )
                                      ;*** Compelet path
  (set EGS_Dest (tackon target "EGS"))
  (set EGS (cat target "/"))
  (set @default-dest EGS_Dest)

  ((if (= (exists EGS) 0)
         (set EGS  (pathonly EGS))
  ))

  (if (= (exists EGS) 0)
         (abort (#abort-path  EGS))
         )

));procedure Path_And_CopyTools

;=============================================================================
(procedure Basic_Questions(
                                     ;*** BASIC Question
(set BASIC 0)
(set PREFS 1)
(set UTILS 2)
(set EXTRA 3)
(set PICS  4)
(set HOOKS 5)
(set PAINT 6)
(set RDISK 7)

(set #piece-basic        "EGS-Basics            900K")
(set #piece-prefs        "EGS-Prefs             500K")
(set #piece-utils        "EGS-Utilities/Tools   300K")
(set #piece-extra        "EGS-Extras            200K")
(set #piece-pics         "EGS-Pictures          900K")
(set #piece-hooks        "EGS-Hooks             150K")
(set #piece-paint        "EGS-Paint             250K")
(set #piece-rec          "EGS-RecoverDisk       1 Disk")

(set myopts
   (askoptions
      (prompt  #ask-pieces)
      (help    #pieces-help)
      (choices #piece-basic
               #piece-prefs
               #piece-utils
               #piece-extra
               #piece-pics
               #piece-hooks
               #piece-paint
               #piece-rec)
))


(if (AND (<> target "RAM:") (<> target "Ram:") (<> target "ram:"))(
    (set target_space (getdiskspace target))
    (set diskspace 0)
    (if (in myopts BASIC)  (set diskspace (+ diskspace 950)))
    (if (in myopts PREFS)  (set diskspace (+ diskspace 600)))
    (if (in myopts UTILS)  (set diskspace (+ diskspace 300)))
    (if (in myopts EXTRA)  (set diskspace (+ diskspace 700)))
    (if (in myopts PICS)   (set diskspace (+ diskspace 900)))
    (if (in myopts HOOKS)  (set diskspace (+ diskspace 150)))
    (if (in myopts PAINT)  (set diskspace (+ diskspace 250)))

    (set old.space  diskspace)
    (set target_space (/ target_space 1024))

    (if (<= target_space diskspace)
    (
         (abort  (#abort-nomem old.space target))
    ))
))
                                                 ;*** Test sys: Space

(if (in myopts BASIC)(
    (set target_space (getdiskspace SYS))
    (set diskspace 0)
    (if (in myopts BASIC)  (set diskspace (+ diskspace 300)))
    (set old.space  diskspace)
    (set target_space (/ target_space 1024))
    (if (<= target_space diskspace)
    (
         (abort  (#abort-nomem old.space SYS))
    ))
))

(if (AND (= 0 myopts) (= Multi 0))
      (abort  #abort-nooption))
));procedure Basic_Question

;=============================================================================
; Disk 1 EGSColon,EGSBlanker  (for 020) /Setup
;=============================================================================
(procedure #Ask_Disk_One(
           (askdisk                          ;** Ask for Install DIsk 1
              (prompt (#ask-disk Disk1))
              (help   #disk1-help)
              (dest Disk1)
           )
))
;=============================================================================
; Disk 2 EGSColon,EGSBlanker (for 000) /EGSSys /  EGSPrefs
;=============================================================================
(procedure #Ask_Disk_Two(
           (askdisk                          ;** Ask for Install DIsk 2
              (prompt (#ask-disk Disk2))
              (help   #disk2-help)
              (dest Disk2)
           )
))
;=============================================================================
; Disk 3 EGSUtils,EGSTools EGSExtras /EGS-Paint EGS-Env EGSPresets
;=============================================================================
(procedure #Ask_Disk_Three(
           (askdisk                          ;** Ask for Install Disk 3
               (prompt (#ask-disk Disk3))
               (help   #utilities-help)
              (dest Disk3)
            )
))
;=============================================================================
; Disk 4 EGSHooks,EGSPicutres
;=============================================================================
(procedure #Ask_Disk_Four(
           (askdisk                          ;** Ask for Install DIsk 4
              (prompt (#ask-disk Disk4))
              (help   #pics-help)
              (dest Disk4)
           )
))
;=============================================================================
(procedure Restore_EGSColon(
                                             ;*** EGSColon
  (#Ask_Disk_One)                             ;Disk 1

  (if (= WhichCpu 1)(
      (if (= @user-level 2)
          (set hjob (cat LHarc " >CON:0/0/640/100/EGS_Unarchive  -2 -m e " (cat Disk1: EGSCOLON ) EGS))
          (set hjob (cat LHarc " -2 -m e " (cat Disk1: EGSCOLON) EGS))
      )
      (run hjob)
  ))
      ;blanker mit FPU


  (#Ask_Disk_Two)                           ;Disk 2

  (working #work-lha-egscolon)
  (if (= @user-level 2)
      (set hjob (cat LHarc " >CON:0/0/640/100/EGS_Unarchive  -2 -m e " (cat Disk2: EGSSYS ) EGS))
      (set hjob (cat LHarc " -2 -m e " (cat Disk2: EGSSYS) EGS))
  )
      (run hjob)


  (if (= NoFPU 0)(

      (#Ask_Disk_Two)                           ;Disk 2

      (working #work-lha-egscolon)
      (if (= @user-level 2)
          (set hjob (cat LHarc " >CON:0/0/640/100/EGS_Unarchive  -2 -m e " (cat Disk2: EGSBLK) EGS))
          (set hjob (cat LHarc " -2 -m e " (cat Disk2: EGSBLK) EGS))
      )
      (run hjob)
  ))

  (if (= WhichCpu 0)(

      (#Ask_Disk_Two)                           ;Disk 2

      (working #work-lha-egscolon)
      (if (= @user-level 2)
          (set hjob (cat LHarc " >CON:0/0/640/100/EGS_Unarchive  -2 -m e " (cat Disk2: EGSCOLON00) EGS))
          (set hjob (cat LHarc " -2 -m e " (cat Disk2: EGSCOLON00) EGS))
      )
      (run hjob)
      ;blanker ohne FPU
  ))


)); procedure Restore_EGSColon

;=============================================================================
(procedure Restore_EGSPrefs(
                                                ;*** EGS Prefs
  (#Ask_Disk_Two)                                ;Disk 2

  (if (= @user-level 2)
      (set hjob (cat LHarc " >con:10/10/640/100/EGS_Unarchive  -2 -m e " (cat Disk2: EGSPREFS) EGS))
      (set hjob (cat LHarc " -2 -m e " (cat Disk2: EGSPREFS) EGS))
  )
  (run hjob)

)) ;procedure

;=============================================================================
(procedure Restore_EGSUtils(
                                       ;*** EGS Utilities
   (#Ask_Disk_Three)                    ;Disk 3

   (if (= @user-level 2)
       (set hjob (cat LHarc " >con:10/10/640/100/EGS_Unarchive  -2 -m e " (cat Disk3: EGSUTILS) EGS))
       (set hjob (cat LHarc " -2 -m e " (cat Disk3: EGSUTILS) EGS))
   )
   (run hjob)

                                      ;*** EGS TOOLS
   (working #work-lha-tools)
   (if (= @user-level 2)
       (set hjob (cat LHarc " >con:10/10/640/100/EGS_Unarchive  -2 -m e " (cat Disk3: EGSTOOLS) EGS))
       (set hjob (cat LHarc " -2 -m e " (cat Disk3: EGSTOOLS) EGS))
   )
   (run hjob)

)) ;procedure

;=============================================================================
(procedure Restore_EGSBlanker00(

  (#Ask_Disk_Three)                    ;Disk 3
                                       ;*** EGSBlanker for 000
  (working #work-lha-egscolon)
  (if (= NoFPU 1)(

      (#Ask_Disk_Three)

      (if (= @user-level 2)
          (set hjob (cat LHarc " >CON:0/0/640/100/EGS_Unarchive  -2 -m e " (cat Disk3: EGSBLK00) EGS))
          (set hjob (cat LHarc " -2 -m e " (cat Disk3: EGSBLK00) EGS))
      )
      (run hjob)
  ))

))

;=============================================================================
(procedure Restore_EGSEnv(
                                           ;*** EGS Env and Presets
(askdisk
   (prompt (#ask-disk Disk3 ))
   (help   #disk1-help)
   (dest Disk3)                            ;Disk 3
)

(if (= @user-level 2)
    (set hjob (cat LHarc " >con:10/10/640/100/EGS_Unarchive  -2 -m e " (cat Disk3: EGSENV) ENV))
    (set hjob (cat LHarc " -2 -m e " (cat Disk3: EGSENV) ENV))
)
(run hjob)


(if (= @user-level 2)
    (set hjob (cat LHarc " >con:10/10/640/100/EGS_Unarchive  -2 -m e " (cat Disk3: EGSPRE) PRE))
    (set hjob (cat LHarc " -2 -m e " (cat Disk3: EGSPRE) PRE))
)
(run hjob)

)); proc
;=============================================================================
(procedure Restore_EGSExtras(
                                          ;*** EGS Extra
  (#Ask_Disk_Three)                        ;Disk 3

  (if (= @user-level 2)
      (set hjob (cat LHarc " >con:10/10/640/100/EGS_Unarchive  -2 -m e " (cat Disk3: EGSEXTRA) EGS))
      (set hjob (cat LHarc " -2 -m e " (cat Disk3: EGSEXTRA) EGS))
  )
  (run hjob)

  (if (= @user-level 2)
      (set hjob (cat LHarc " >con:10/10/640/100/EGS_Unarchive  -2 -m e " (cat Disk3: EGSGAMES) EGS))
      (set hjob (cat LHarc " -2 -m e " (cat Disk3: EGSGAMES) EGS))
  )
  (run hjob)

));proc

;=============================================================================
(procedure Restore_EGSPaint(
                                                   ;*** EGS Paint
(askdisk                                           ;Disk 3
   (prompt (#ask-disk Disk3))
   (help   #paint-help)
   (dest Disk3)
)

(if (= @user-level 2)
    (set hjob (cat LHarc " >con:10/10/640/100/EGS_Unarchive  -2 -m e " (cat Disk3: EGSPAINT) EGS))
    (set hjob (cat LHarc " -2 -m e " (cat Disk3: EGSPAINT) EGS))
)
(run hjob)

)) ;proc
;=============================================================================
(procedure Restore_EGSHooks(
    (#Ask_Disk_Four)
                                                ;**** EGS Hooks
    (if (= @user-level 2)
        (set hjob (cat LHarc " >con:10/10/640/100/EGS_Unarchive  -2 -m e " (cat Disk4: EGSHOOKS) EGS))
        (set hjob (cat LHarc " -2 -m e " (cat Disk4: EGSHOOKS) EGS))
    )
    (run hjob)
))
;=============================================================================
(procedure Restore_EGSPics(
  (#Ask_Disk_Four)                               ;*** EGS Pics

  (if (= @user-level 2)
      (set hjob (cat LHarc " >con:10/10/640/100/EGS_Unarchive  -2 -m e " (cat Disk4: EGSPICS) EGS))
      (set hjob (cat LHarc " -2 -m e " (cat Disk4: EGSPICS) EGS))
  )
  (run hjob)
)) ;proc
;=============================================================================

;say hi !
(welcome)
(complete 0)
;*** The Point were it all happens, the START Point

(if (= @user-level 2)
    (AskBoard))

(Check_System_And_Copy_Tools)

(Get_Path)

(if (= Multi 0)
    (Check_EGSdir))

(Basic_Questions)
(complete 0)

(working #work-lha-egscolon)

(complete 10)

(if (in myopts BASIC)
     (Restore_EGSColon))

(if  (= Multi 1)
    (MultiGFX_Install))

(if (AND (= Multi 0) (IN myopts BASIC))
    (Normal_Install))

(working #work-lha-prefs)

(complete 15)

(if (in myopts PREFS)
     (Restore_EGSPrefs))

(working #work-lha-utilities)

(complete 25)
(if (in myopts UTILS)
     (Restore_EGSUtils))

(working #work-lha-archive)
(complete 30)

(if (in myopts BASIC)
     (Restore_EGSEnv))

(if (in myopts BASIC)
     (Restore_EGSBlanker00))

(working #work-lha-extras)
(complete 40)

(if (in myopts EXTRA)
     (Restore_EGSExtras))

(working #work-lha-paint)
(complete 50)

(if (in myopts PAINT)
     (Restore_EGSPaint))

(working #work-lha-hooks)
(complete 65)

(if (in myopts HOOKS)
     (Restore_EGSHooks))

(working #work-lha-pics)
(complete 70)

(if (in myopts PICS)
     (Restore_EGSPics))

(complete 80)

;===========================================================================

(if (in myopts BASIC)(
                                        ;*** EGS SETUP Infos
(set hjob (cat COPYINFO EGS))
(run hjob)

(if (= (exists "devs:monitors") 2)(
    (run COPYDEVS)                   ; copy PAL and NTSC-Monitors
    (run CopyECON)                   ; Copy econ.info to devs:DOSDrivers
))


(if (= (exists "sys:monitors") 2)(
     (run MountECON)                 ; Mount econ:
     (run COPYMONS)                  ; Copy Node-Names
     (startup "EGS-Spectrum"
     (prompt  #prompt-userstartup)
     (command "mount econ:")
     (help     @startup-help))
))

(complete 82)

   ;******************* Patch startup-sequence *******************************

(set YES 1)
(set NO  0)

(set PatchSS (askbool
             (prompt #ask-patchss)
             (help   (#patchss-help EGS))
))

(if (AND (= PatchSS YES) (OR (= BoardCFG LEGS) (= BoardCFG LEGS+LEGS)) (<= os_ver 39 ))(
         (set hjob (cat PATCH EGS))
         (set RET (run hjob))
))

(if (AND (= PatchSS YES) (OR (= BoardCFG G110) (= BoardCFG G110+LEGS)) )(
         (set hjob (cat PATCH EGS " G110"))
         (set RET (run hjob))
))

(if (AND (= PatchSS YES) (OR (= BoardCFG LEGS) (= BoardCFG LEGS+LEGS)) (>= os_ver 39 ))(
         (set hjob (cat PATCH EGS " NOFA" ))
         (set RET (run hjob))
))


(if (OR (= PatchSS NO) (<> RET 0))(

  (if (= BoardCFG G110)
              (message (#msg-g110-patchss EGS)))

  (if (<> BoardCFG G110)
              (message (#msg-patchss EGS)))

))
(complete 90)

)); IF BASICS  ********

   ;******************* EGS RecoverDisk  **************************************

(if (in myopts RDISK)
(
(set rd_data (cat TMP BIN "/startup-sequence"))
(set recdisk_vol "EGS-RecoverDisk")
(set sys_disk (getassign "sys" 'a'))
(set sys_env   (cat sys_disk "prefs/env-archive"))
(set sys_local (cat sys_disk "locale"))
(set sys_fonts (cat sys_disk "fonts"))

(working #work-write-recdisk)

(run "c:echo  >"rd_data" stack  20000 ")
(run "c:echo >>"rd_data" ECHO  EGS-Recover Disk   ")
(run "c:echo >>"rd_data" assign t:  ram: ")
(run "c:echo >>"rd_data" assign envarc: "sys_env" ")
(run "c:echo >>"rd_data" assign LOCALE: "sys_local" ")
(run "c:echo >>"rd_data" assign FONTS:  "sys_fonts" ")
(run "c:echo >>"rd_data" ")
(run "c:echo >>"rd_data" ECHO  Reset the WB-Screenmode ? (Y/N)")
(run "c:echo >>"rd_data" ASK -------------------------------:  ")
(run "c:echo >>"rd_data" IF WARN ")
(run "c:echo >>"rd_data" delete  >nil: envarc:sys/Screenmode.prefs")
(run "c:echo >>"rd_data" ENDIF ")
(run "c:echo >>"rd_data" ECHO  Reset the EGS-Screenmode ? (Y/N)  ")
(run "c:echo >>"rd_data" ASK --------------------------------:  ")
(run "c:echo >>"rd_data" delete >nil: envarc:egs/Screenmode.Prefs")
(run "c:echo >>"rd_data" ENDIF")
(run "c:echo >>"rd_data" ECHO  Please REMOVE the floppy disk ")
(run "c:echo >>"rd_data" ECHO  and REBOOT your machine OR hit RETURN for WB !")
(run "c:echo >>"rd_data" execute Como.startup ")
(run "c:echo >>"rd_data" ECHO  ")
(run "c:echo >>"rd_data" ECHO  ")

(complete 95)

(askdisk (prompt (#ask-recdisk recdisk_vol))
         (help    #recdisk-help )
         (dest    recdisk_vol)
)
(run CPYSTART)

))

   ;******************* Start EGS ********************************************

(if (AND (IN myopts BASIC) (= Multi 0) (= BoardCFG LEGS))(

    (if (<> BoardCFG G110)(
         (set RunEGS
              (askbool
              (prompt  #ask-startEGS)
              (help    #startEGS-help)
              (choices  #start #quit)))

    (if  (= RunEGS 1)(
        (working "\n\n         >>  Start EGS  <<             \n\n")

        (set PF (cat EGS "egs"))
        (set hjob (cat "assign  EGS: " PF ))
        (run hjob)
        (run CFGLIB)
        (run CFGENV)
        (run CONFIG)
        (run CFGAMIGA)

        (if (= MonitorOpts TWO)(
             (if (= MouseBorder TOP)
                 (run CFGTOP))
             (if (= MouseBorder RIGHT)
                 (run CFGRIGHT))
             (if (= MouseBorder LEFT)
                 (run CFGLEFT))
             (if (= MouseBorder BOTTOM)
                 (run CFGBOTTOM))
        ))
      ))
    )) ; if g110

)); IF BASICS  ********

(complete 100)
(run DELALL)

(if (= Multi 1)(
    (exit  #exit-multi)
))

(exit #remove-floppy)
(set @default-dest target)

   ;******************* E N D E **********************************************
