;*-----------------------------------------------------------*
;*  PowerUP & 060 Accelerator Disk V2.0  14/10/97            *
;*                                                           *
;*  Installer Revision by Claus Herrmann ©1997 for Phase5    *
;*                                                           *
;*  If you have any installer questions please let me know!  *
;*  Note : This installer is the ORIGINAL installer for      *
;*         the 060 and PowerUp Cards. It may not be altered, *
;*         copied or distributed in any other way. It may    *
;*         not be integrated/placed on ANY WEB/FILE -SERVER  *
;*         without given permission of the phase5 Support !  *
;*         Changes have to be reported TO phase5 Support     *
;*         and only phase5 Support can give PERMISIONS of    *
;*         releasing installer Scripts concerning PowerUp,   *
;*         SCSI and 060 Accelerator Disks.                   *
;*  eMail: claus@ufoo.phase5.de                              *
;*                                                           *
;*-----------------------------------------------------------*

(set cpu (database "cpu"))
(set #diskname (pathonly @icon))

;*-----------------------------------------------------------*
;* Intro stuff                                               *
;*-----------------------------------------------------------*

(set #w-message (cat "\n\n\nWe at Phase5 would like to\n\nThank You\n\nfor purchasing our Accelerator Card."
                     "\n\n\nThe Next Generation in Accelerator cards for the Amiga."
))

;*-----------------------------------------------------------*
;* Setze Defaults fuer die Strings   ---* English            *
;*-----------------------------------------------------------*
 (set #yes "Yes")
 (set #no "No")


 (set #destchoice (cat "Please select where you wish to put the 060 Programs. "
                        "A directory called '060Tools' will be created, if there is not one there already."
  ))

  (set #exitmsg (cat "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "\n   Have fun with our Produkt \n"
                     "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
  ))

  (set #ask-PRG "Which 060 Software would you like to install ?")
  (set #ask-HLP (cat "\nWhich 060 Software would you like to install ?\n"
                     "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"
                     "Here you find some small little Utilities, which "
                     "should help you to work with this Computer. "
                     "You will also find programs for programmers. "
  ))

  (set #ask-PRG1 "For which card you would like to install this software ?")
  (set #ask-HLP1 (cat "\nFor which card you would like to install this software ?\n"
                     "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"
                     "Dont use SOFTWARE which is not DESIGNED for "
                     "your CPU Card ! "
                     "Other software can harm your software and your "
                     "hardware !!!!!!!!!! "
  ))

  (set #060-Abfrage1  " CYBERSTORM MKI/II/III & BLIZZARD 2060 & BLIZZARD 1260")
  (set #PPC-Abfrage1  " CYBERSTORM PPC & BLIZZARD 603e+ & BLIZZARD 2604")

  (set #060-todo      " 68060.library - Activate 060 Emu.")
  (set #PPC-todo      " ppc.library   - Activate PPC -Only PowerUP-")
  (set #CGuard-todo   " CyberGuard    - Enforcer for 060.")
  (set #CSnoop-todo   " CyberSnooper  - Show Library Emulation.")
  (set #CPatch-todo   " CyberPatcher  - Emulate FPU Commands.")

  (set #yes-CGuard      "Yes   - Install Cyberguard")
  (set #no-CGuard       "No    - Dont Install Cyberguard")
  (set #ask-CGuard (cat "Would you like to install CyberGuard ?\n\n"
                        "CyberGuard gives you the same Opportunities "
                        "as the Enforcer V37 for 030/040 Processor. "
                        "This program is only for the Expert-Programer "
                        "useful. He can easily port his programs to work "
                        "with the 060."
  ))

  (set #yes-CSnoop      "Yes   - Install CyberSnoop")
  (set #no-CSnoop       "No    - Dont Install CyberSnoop")
  (set #ask-CSnoop (cat "Would you like to install the CyberSnoop ?\n\n"
                        "CyberSnoop gives the programer "
                        "the oportunity to find out which assembler commands "
                        "are not supported bythe 060 ! "
  ))

  (set #yes-CPatch      "Yes   - Install CyberPatcher")
  (set #no-CPatch       "No    - Dont Install CyberPatcher")
  (set #ask-CPatch (cat "Would you like to install CyberPatcher ?\n\n"
                        "CyberPatcher emulates some of the FPU-commands. "
                        "When a program which is recognized by CyberPatcher "
                        "it is sped up. "
  ))

  (set #060-Abfrage1  " CYBERSTORM MKI/II/III & BLIZZARD 2060 & BLIZZARD 1260")
  (set #PPC-Abfrage1  " CYBERSTORM PPC & BLIZZARD 603e+ & BLIZZARD 2604")

(transcript "Installation for \"PowerUP / 68060er Disk")

;*-----------------------------------------------------------*
;* Setze Defaults fuer die Strings   ---* Deustch            *
;*-----------------------------------------------------------*

(if (= @language "deutsch")
   
  (set #w-message (cat "\n\n\nWir möchten Ihnen für den \n\nKauf unseres Produktes danken.\n\n Ihr Phase5 - Team"
                     "\n\n\nDie nächste Generation von Prozessor Karten für den Amiga."
  ))

  (set #yes "Ja")
  (set #no "Nein")

  (set #exitmsg (cat "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
                     "\n Viel Spass mit unserem Produkt \n"
                     "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
  ))

  (set #ask-PRG "Welche 060-Software wollen Sie installieren ?")
  (set #ask-HLP (cat "\nWelche 060-Software wollen Sie installieren ?\n"
                     "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"
                     "Hier sehen Sie eine Auswahl von verschiedenen Programmen, "
                     "die Sie bei der täglichen Arbeit unterstützen sollen. Es sind "
                     "aber auch Programme dabei, die den Programmierer unter uns "
                     "nur interessieren."
  ))

  (set #ask-PRG1 "Fuer welche Karte von uns moechten Sie die Software installieren ?")
  (set #ask-HLP1 (cat "\nWelche Karte von uns steckt in Ihrem Rechner ?\n"
                     "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"
                     "Welche Karte haben Sie sich gekauft ? Sie duerfen "
                     "unter keinen Umstaenden die Software mixen ! "
                     "Den nur wo PowerPC draufsteht, ist auch ein "
                     "PowerPC drinnen !"
  ))

  (set #060Abf1  " CS MKI/II/III & B2060 & B1260")
  (set #PPCAbf1  " CS PPC & B603e+ & B2604")

  (set #060-todo      " 68060.library - Activate 060 Emu.")
  (set #PPC-todo      " ppc.library   - Activate PPC (Only PowerUP)")
  (set #CGuard-todo   " CyberGuard    - Enforcer for 060.")
  (set #CSnoop-todo   " CyberSnooper  - Show Library Emulation.")
  (set #CPatch-todo   " CyberPatcher  - Emulate FPU Commands.")

  (set #yes-CGuard      "Ja   - Installiere Cyberguard")
  (set #no-CGuard       "Nein - Installiere kein Cyberguard")
  (set #ask-CGuard (cat "Möchten Sie CyberGuard installieren?\n\n"
                        "CyberGuard gibt Ihnen die gleichen Möglichkeiten "
                        "wie der Enforcer V37 für 030/040 Prozessor Besitzer. "
                        "Dieses Programm ist nur für den Profi-Programmierer "
                        "nützlich, der seine Programme für den 060 Prozessor "
                        "umschreiben will."
  ))

  (set #yes-CSnoop      "Ja   - Installiere CyberSnoop")
  (set #no-CSnoop       "Nein - Installiere kein CyberSnoop")
  (set #ask-CSnoop (cat "Möchten Sie CyberSnoop installieren?\n\n"
                        "CyberSnoop ermöglicht Ihnen sowohl als Programmierer, "
                        "als auch nicht Programmierer (Erfahrung sollten Sie aber "
                        "im Umgang mit dem AMIGA haben !) die Befehle Ihrer Programme "
                        "die nicht vom 060 unterstützt werden sichtbar zu machen."
  ))

  (set #yes-CPatch      "Ja   - Installiere CyberPatcher")
  (set #no-CPatch       "Nein - Installiere kein CyberPatcher")
  (set #ask-CPatch (cat "Möchten Sie CyberPatcher installieren?\n\n"
                        "CyberPatcher emuliert Softwaremässig alle FPU-Befehle, "
                        "die sich im 060er Prozessor nicht mehr befinden."
                        "Es werden aber aus Systemgründen nur die häufigsten Befehle "
                        "emuliert."
  ))

  (set #yes-PPC        "Ja   - Installiere PPC.Library")
  (set #no-PPC         "Nein - Installiere keine PPC:Library")
  (set #ask-PPC   (cat "Möchten Sie die PPC.Library installieren?\n\n"
                        "Die ppc.library bildet die Kommunikationsschnittstelle "
			"zwischen Ihrem Amiga Betriebssystem und Ihrer PowerPC "
			"Karte."
  ))
)

  (set #060Abf1  " CS MKI/II/III & B2060 & B1260")
  (set #PPCAbf1  " CS PPC & B603e+ & B2604")

(message #w-message)

(welcome)

(set #exitmessage1 " Die Installations ist fertisch ! (so wie ich!)")

;*-----------------------------------------------------------*
;* Install - Main                                            *
;*-----------------------------------------------------------*
 (set Abfrage
   (askchoice
     (choices #060Abf1 #PPCAbf1)
     (prompt #ask-PRG1)
     (help   #ask-HLP1)
     (default 0)
   )
 )
 (set ToDo
   (askoptions
     (choices #CGuard-todo #CSnoop-todo #CPatch-todo )
     (prompt #ask-PRG)
     (help   #ask-HLP)
     (default 7)
   )
 )

;*-----------------------------------------------------------*
;* GRUNDVERZWEIGUNG 2.STUFE - MAIN                           *
;*-----------------------------------------------------------*

(if (<> ToDo 0)
 (
   (set whereTEMP
     (askdir 
       (prompt #destchoice)
       (help @askdir-help)
       (default "SYS:")
     )
   )

   (if (< (exists (tackon whereTEMP "060Tools")) 2)
       (makedir (tackon whereTEMP "060Tools") (infos))
   )
   (if (< (exists (tackon whereTEMP "060Tools/Docs")) 2)
       (makedir (tackon whereTEMP "060Tools/Docs") (infos))
   )
   (set where (tackon whereTEMP "060Tools"))
   (set @default-dest where)

;*-----------------------------------------------------------*
;* 68060.library & 68040.library(Fake) installieren !        *
;*-----------------------------------------------------------*
     (  
         (if (< (exists "libs:68040old.library") 2)
              (copyfiles (source "libs:68040.library") (dest "libs:") (newname "68040old.library") )
              (copyfiles (source (tackon #diskname "libs/68040.library")) (dest "libs:"))
         )
         (copyfiles (source (tackon #diskname "libs/68060.library"))  (dest (tackon where "libs:"))) 
         (copyfiles (source (tackon #diskname "c/cpu060"))  (dest (tackon where "c:"))) 
         (copyfiles (source (tackon #diskname "c/rom2fast"))  (dest (tackon where "c:"))) 
     )
   (if (= Abfrage 1) 
     (  
         (copyfiles (source (tackon #diskname "ppc/libs/ppc.library"))  (dest (tackon where "libs:"))) 
         (copyfiles (source (tackon #diskname "ppc/libs/ppcdiss.library"))  (dest (tackon where "libs:")))  
         (if (< (exists (tackon whereTEMP "PPCTools")) 2)
             (makedir (tackon whereTEMP "PPCTools") (infos))
         )
         (if (< (exists (tackon whereTEMP "PPCTools/Docs")) 2)
             (makedir (tackon whereTEMP "PPCTools/Docs") (infos))
         )
         (if (< (exists (tackon whereTEMP "PPCTools/PPCDebug")) 2)
             (makedir (tackon whereTEMP "PPCTools/PPCDebug") (infos))
         )
         (copyfiles (source (tackon #diskname "ppc/readme.txt")) (dest (tackon whereTEMP "PPCTools/Docs")) (ALL) (INFOS) ) 
         (copyfiles (source (tackon #diskname "ppc/releasenotes.txt")) (dest (tackon whereTEMP "PPCTOOLS/Docs")) (ALL) (INFOS) ) 
         (copyfiles (source (tackon #diskname "ppc/ToolsDebug")) (dest (tackon whereTEMP "PPCTOOLS/PPCDebug")) (ALL) (INFOS) ) 
     )
   )

;*-----------------------------------------------------------*
;* CyberGuard kopieren !                                     *
;*-----------------------------------------------------------*
   (if (IN ToDo 1) 
     (  
      (set CGuard
           (askchoice
           (choices #yes-CGuard #no-CGuard)
           (prompt #ask-CGuard)
           (help #ask-CGuard (tackon #diskname "Docs/CyberG") (tackon where "Docs"))
           (default 0)
           )
      )

      (if (= CGuard 0)
        (
         (if (< (exists (tackon where "CyberGuard")) 2)
             (makedir (tackon where "CyberGuard") (infos))
         )
         (copyfiles (source (tackon #diskname "CyberTools/CyberGuard")) (dest (tackon where "CyberGuard"    )) (ALL) (INFOS))
        )
      )
     ))

;*-----------------------------------------------------------*
;* CyberSnoop kopieren !                                     *
;*-----------------------------------------------------------*
   (if (IN ToDo 2) 
     (  
      (set CSnoop
           (askchoice
           (choices #yes-CSnoop #no-CSnoop)
           (prompt #ask-CSnoop)
           (help #ask-CSnoop)
           (default 0)
           )
      )

      (if (= CSnoop 0)
        (
          (copyfiles (source (tackon #diskname "CyberTools/CyberSnooper")) (dest where) (ALL) (INFOS) )
          (copyfiles (source (tackon #diskname "Docs/CyberSnooper.doc"))       (dest (tackon where "Docs/")) (ALL) (INFOS) )
        )
      )
     ))

;*-----------------------------------------------------------*
;* CyberPatch kopieren !                                     *
;*-----------------------------------------------------------*
   (if (IN ToDo 2) 
     (  
      (set CPatch
           (askchoice
           (choices #yes-CPatch #no-CPatch)
           (prompt #ask-CPatch)
           (help #ask-CPatch)
           (default 0)
           )
      )
      (if (= CPatch 0)
        (
          (copyfiles (source (tackon #diskname "CyberTools/CyberPatcher")) (dest where) (ALL) (INFOS) )
          (copyfiles (source (tackon #diskname "Docs/CyberPatcher.doc"))   (dest (tackon where "Docs/")) (ALL) (INFOS) )
        )
      )
     ))

;*-----------------------------------------------------------*
;* Ende des Main                                             *
;*-----------------------------------------------------------*

  )
)

;*-----------------------------------------------------------*
;* Ende der Installation                                     *
;*-----------------------------------------------------------*

(message #exitmsg)
