
(complete 0)
(set @default-dest "SYS:")

; Texts

(set #Intro-Txt
(cat "\n\nWelcome to \n"
"THE SZENARION V2.06\n"
"HD Installation\n\n\n\n"
"1993-96 by Stefan Waschk\n\n"
"this is SHAREWARE!\n"
"see manual for registration or write to:\n"
"___________________________________________________\n"
"Stefan Waschk/Siegfriedstr.119/D-38106 Braunschweig\n\n"
))(set #Warning-Txt
(cat "\n\nWARNING!\n"
"--------\n\n"
"Szenarion requires 5 MB free on your disk \n\n"
"3MB RAM, >=Kick2.0, 68020++, AGA or FLICKERFIXER\n\n"
))(set #Path-Txt
(cat "Select a directory for\n"
"THE SZENARION V2.0"
))(set #Path-Help
(cat "\nThis section lets you choose the "
"target directory to install Szenarion. \n\n"
"Default is SYS:\n\n\n"
@askdir-help
))(set #Rename-Help
(cat "\n    If your AMIGA has an arithmetic unit (FPU),\n"
     "    rendering will take part much faster.\n"
     "    Basic A1200 and 68LCxx AMIGAs don`t have it!\n\n\n"
@rename-help
))(set #Screenmode-Help
(cat "\n    If you own a A1200, A4000 with the AGA chipset,\n"
     "    you must choose the EURO72 screenmode.\n\n"
     "    With A2000, A3000(..) and FLICKERFIXER, you have\n"
     "    to choose NTSCHIRESLACED!\n\n"
     "    PICASSOII-users can use both, but have to set\n"
     "    the refresh-time to one second. Scrolling will\n"
     "    be worse, for that isn't done by blitter!\n"
))(set #Editor-Help
(cat "\n    For editing character-files, You will\n"
     "    have to specify your ascii-editor. Default is\n"
     "    set to SYS:Tools/MEmacs\n\n"
     "    Write changes to the ENV/Szenarion.config file:\n\n"
     "    f.e. Path,Work:CED/CED\n"
))


; Main 

(message #Intro-Txt)
(message #Warning-Txt)
(set target 
(askdir (prompt #Path-Txt) (help #Path-Help) (default @default-dest) (newpath)
))

(set @default-dest target)

(copyfiles
(prompt "Copying to " #target)
(help @copy-files-help)
(source "")
(dest (tackon target "Szenarion"))
(pattern "szen_1.lha")
)

(complete 10)
(set #path1
(cat "Tools/lha x "
     (tackon target "Szenarion/szen_1.lha ")
     (tackon target "Szenarion/")
))

(run #path1
  (prompt "extracting file")
  (help "not available now")
)
(set #path1
(cat (tackon target "Szenarion/szen_1.lha")
))
(Delete #path1)

(complete 35)

(if (exists "szen_2.lha") 
  (
    (copyfiles
    (prompt "Copying to " #target)
    (help @copy-files-help)
    (source "")
    (dest (tackon target "Szenarion"))
    (pattern "szen_2.lha")
    )
  )
  (
    (message "\nInstert DISK II in drive\n\nDF0:\n___\n")
    (copyfiles
    (prompt "Copying to " #target)
    (help @copy-files-help)
    (source "DF0:")
    (dest (tackon target "Szenarion"))
    (pattern "szen_2.lha")
    )
    (message "\nReinstert DISK I in drive\n\nDF0:\n___\n")
  )
)

(complete 50)

(set #path1
(cat "Tools/lha x " 
     (tackon target "Szenarion/szen_2.lha ")     
     (tackon target "Szenarion/")
))

(run #path1
  (prompt "extracting file")
  (help "not available now")
)
(complete 65)

(set #path1
(cat (tackon target "Szenarion/szen_2.lha")
))
(Delete #path1)

(if (exists "szen_3.lha") 
  (
    (copyfiles
    (prompt "Copying to " #target)
    (help @copy-files-help)
    (source "")
    (dest (tackon target "Szenarion"))
    (pattern "szen_3.lha")
    )
  )
  (
    (message "\nInstert DISK III in drive\n\nDF0:\n___\n")
    (copyfiles
    (prompt "Copying to " #target)
    (help @copy-files-help)
    (source "DF0:")
    (dest (tackon target "Szenarion"))
    (pattern "szen_3.lha")
    )
    (message "\nReinstert DISK I in drive\n\nDF0:\n___\n")
  )
)

(complete 83)

(set #path1
(cat "Tools/lha x " 
     (tackon target "Szenarion/szen_3.lha ")     
     (tackon target "Szenarion/")
))

(run #path1
  (prompt "extracting file")
  (help "not available now")
)
(complete 84)

(set #path1
(cat (tackon target "Szenarion/szen_3.lha")
))
(Delete #path1)

(complete 85)
(
  if ( askbool
        (prompt "You can choose between the \nenglish dictionary\n and \n dem deutschen Wrterbuch\n__________________________________\nInstall the english one?" )
        (help #Rename-Help)
     )
  (
    (if (exists "szen_E.lha") 
      (
            (copyfiles
              (prompt "Copying to " #target)
              (help @copy-files-help)
              (source "")
              (dest (tackon target "Szenarion"))
              (pattern "szen_E.lha")
            )
      )
      (
            (message "\nInstert DISK III in drive\n\nDF0:\n___\n")
            (copyfiles
              (prompt "Copying to " #target)
              (help @copy-files-help)
              (source "DF0:")
              (dest (tackon target "Szenarion"))
              (pattern "szen_E.lha")
            )
            (message "\nReinstert DISK I in drive\n\nDF0:\n___\n")
         )
      )
      (complete 92)

      (set #path1
      (cat "Tools/lha x " 
        (tackon target "Szenarion/szen_E.lha ")     
        (tackon target "Szenarion/")
      ))
      (run #path1
        (prompt "extracting file")
        (help "not available now")
      )
      (complete 93)
      (set #path1
        (cat (tackon target "Szenarion/szen_E.lha")
      ))
      (Delete #path1)
  )
  (
    (if (exists "szen_D.lha") 
      (
            (copyfiles
              (prompt "Copying to " #target)
              (help @copy-files-help)
              (source "")
              (dest (tackon target "Szenarion"))
              (pattern "szen_D.lha")
            )
      )
      (
            (message "\nInstert DISK III in drive\n\nDF0:\n___\n")
            (copyfiles
              (prompt "Copying to " #target)
              (help @copy-files-help)
              (source "DF0:")
              (dest (tackon target "Szenarion"))
              (pattern "szen_D.lha")
            )
            (message "\nReinstert DISK I in drive\n\nDF0:\n___\n")
         )
      )
      (complete 92)

      (set #path1
      (cat "Tools/lha x " 
        (tackon target "Szenarion/szen_D.lha ")     
        (tackon target "Szenarion/")
      ))
      (run #path1
        (prompt "extracting file")
        (help "not available now")
      )
      (complete 93)
      (set #path1
        (cat (tackon target "Szenarion/szen_D.lha")
      ))
      (Delete #path1)
  )
)


(complete 96)
(startup "Szenarion"
	(prompt "Some commands will be added to your \"s:user-startup\" file.")
	(help @startup-help)
	(command "assign Szenarion: \"" (tackon target "Szenarion") "\"\n")
)

(complete 97)

(set #path2
(cat (tackon target "Szenarion/ENV/Szenarion.config")
))

(
  if ( askbool
        (prompt "now modifying the SCREENMODE. EURO72(AGA)\nor NTSCHIRESLACED (FLICKERFIXER) is possibe.\n\n____________________________________\nDo you want to open EURO72 screens?" )
        (help #Screenmode-Help)
     )
  (
     (set #path1
     (cat (tackon target "Szenarion/ENV/Szenarion.config.AGA")
     ))
     (Rename #path1 #path2)
     (Delete #path1)
     (set #path1
     (cat (tackon target "Szenarion/ENV/Szenarion.config.noAGA")
     ))
     (Delete #path1)
  )
  (
     (set #path1
     (cat (tackon target "Szenarion/ENV/Szenarion.config.noAGA")
     ))
     (Rename #path1 #path2)
     (Delete #path1)
     (set #path1
     (cat (tackon target "Szenarion/ENV/Szenarion.config.AGA")
     ))
     (Delete #path1)
  )
)

(complete 98)

(set #path2
(cat (tackon target "Szenarion/RKSim")
))
(set #path3
(cat (tackon target "Szenarion/RFEditor")
))
(
  if ( askbool
        (prompt "now installing the SZEMARION tools\n\nRKSim & RFEditor\n__________________________________\nDoes your AMIGA have a FPU ?" )
        (help #Rename-Help)
     )
  (
     (set #path1
     (cat (tackon target "Szenarion/RKSim.68020MMU")
     ))
     (Rename #path1 #path2)

     (set #path1
     (cat (tackon target "Szenarion/RFEditor.68020MMU")
     ))
     (Rename #path1 #path3)

     (set #path1
     (cat (tackon target "Szenarion/RKSim.68020noMMU")
     ))
     (Delete #path1)

     (set #path1
     (cat(tackon target "Szenarion/RFEditor.68020noMMU")
     ))
     (Delete #path1)
  )
  (
     (set #path1
     (cat (tackon target "Szenarion/RKSim.68020noMMU")
     ))
     (Rename #path1 #path2)

     (set #path1
     (cat (tackon target "Szenarion/RFEditor.68020noMMU")
     ))
     (Rename #path1 #path3)

     (set #path1
     (cat (tackon target "Szenarion/RKSim.68020MMU")
     ))
     (Delete #path1)

     (set #path1
     (cat (tackon target "Szenarion/RFEditor.68020MMU")
     ))
     (Delete #path1)
  )
)
(complete 99)
(set #path1
(cat target
     "Szenarion.info"
))

(copyfiles
(prompt "Copying to " #target)
(help @copy-files-help)
(source "")
(dest target)
(pattern "info")
)

(set #path1
(cat (tackon target "Szenarion.info")
))
(set #path2
(cat (tackon target "info")
))
(message #Editor-Help)

(rename #path2 #path1)

(complete 100)
